Custom status for single project

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
Dawn
Posts: 10
Joined: 27 Oct 2006, 15:10

Custom status for single project

Post by Dawn »

Hi,

Is there a possibility to add a custom status just for a single project and if yes, how it can be done, what do I have to change on the config?

It woulde be really nice to read a feedback because I really need this information.

At the moment I'm using Mantis 1.0.1.

Greets and best regards,
Dawn
MTenzer
Posts: 6
Joined: 24 Jul 2007, 06:54
Location: Germany

possible with 1.0.8

Post by MTenzer »

Hi Dawn!
In 1.0.8 you can create a custom field and assign it to a certain project. You can also specify which values this field is allowed to have.
Is this what you're thinking of ?
Dawn
Posts: 10
Joined: 27 Oct 2006, 15:10

Post by Dawn »

Hi MTenzer,

Thanks a lot for your fast answer :)

No perhaps you missunderstood me. There is a status field on every entry. The types of status are defined per default "open,closed,...." and so on. What I want is to add a new status to this selection. And to do that only for a single project - not for all...

Regards,
Dawn
MTenzer
Posts: 6
Joined: 24 Jul 2007, 06:54
Location: Germany

Post by MTenzer »

Not a big deal, I'm always watching the forum ;-)

Okay, i got your point.
This is somewhat too sophisticated for me.

All I know is:
- for an additional custom status, you have to patch the source code
- to to that for a certain project you might have to do some IF-coding

Anyone here to explain it better ? ;-)
deboutv
Posts: 507
Joined: 15 Jan 2007, 14:31
Location: La Ciotat, FRANCE
Contact:

Post by deboutv »

MTenzer wrote:Not a big deal, I'm always watching the forum ;-)

Okay, i got your point.
This is somewhat too sophisticated for me.

All I know is:
- for an additional custom status, you have to patch the source code
No
- to to that for a certain project you might have to do some IF-coding

Anyone here to explain it better ? ;-)
Take a look here, and apply it with the $g_status_enum_string or $g_resolution_enum_string.
Want more plugins to customize Mantis?
=> http://deboutv.free.fr/mantis/

Mantis: 1.1.0, 1.1.0a2
PHP: 5.0.4
SQL: MySQL 5.0.19
OS: Linux
Dawn
Posts: 10
Joined: 27 Oct 2006, 15:10

Post by Dawn »

Thanks a lot for your very fast answers. What a service :)

Then I understand it correctly: Its possible to add a new status (via config) but if I want it for a single project, I've to patch the code everywhere where for the project-id is asked?

Regards,
Dawn
deboutv
Posts: 507
Joined: 15 Jan 2007, 14:31
Location: La Ciotat, FRANCE
Contact:

Post by deboutv »

If you want to change only for one project, don't change the actual value in the config_inc.php (or config_default_inc.php) and go to the bugtracker, click on Manage then Manage Configuration and use the configuration report page to add your modification. something like this:

User: ALL_USER
Project: Select your project
Configuration option: status_enum_string
Type: string
And then enter the new value in the last field.
Want more plugins to customize Mantis?
=> http://deboutv.free.fr/mantis/

Mantis: 1.1.0, 1.1.0a2
PHP: 5.0.4
SQL: MySQL 5.0.19
OS: Linux
mkornatzki
Posts: 8
Joined: 10 Nov 2005, 19:36

Post by mkornatzki »

hi, i tried the advise and made an entry for new status ("10:status_1:20:status_2") in the legend there are now 2 status.

what should i have to do for new caption? the legend show "new feedback"
roleary
Posts: 6
Joined: 25 Jul 2007, 19:03

Post by roleary »

You would have to change a couple of things to have a new caption. First, a little lesson:

The list of statuses is contained in the status_enum_string, as you know, and can be configured in the Manage Configuration page, as you have done.

The list of status captions is contained in a string, called $s_status_enum_string. This string is currently contained in the lang/strings_english.txt (or whatever language you use). To override this string, which you want to do to change the caption, you must create a new file in the root mantis directory. Name this file "custom_strings_inc.php". In this file, put something like:

Code: Select all

<?php
$s_status_enum_string = '10:status_1,20:status_2';
?>
Please use the quotes and semi-colon as I've indicated. One important thing to note here is that these captions are global, not project specific. So, what you want to do for your custom status for one project, is create a new status number. For example: 10:status_1,21:new_status

Do that in both the configuration and the strings, and everything should be as you want.

- O
mkornatzki
Posts: 8
Joined: 10 Nov 2005, 19:36

Post by mkornatzki »

thanks for the answer.

the point is that this topic describe how to set a status for one project.

if i change the file i made the changes for all projects.
roleary
Posts: 6
Joined: 25 Jul 2007, 19:03

Post by roleary »

if i change the file i made the changes for all projects.
That's not true. You've changed the list of captions, which is global, but you can still pick which ones you use on a per-project basis.
mkornatzki
Posts: 8
Joined: 10 Nov 2005, 19:36

Post by mkornatzki »

sorry, you are right (and for my poor english).

i described not exactly what i mean.

you can make a change on a per project base and only define 10 and 20 for your status. but you can not define the caption for this values on a project but only in a global manner. shure i can define 11 and 21 and the next project 12 and 22...

if you have many projects it can get complicated to configure the captions in the global file. it would be nice if you can also store the caption in the database on a per project base.

at this time it is not a requirement for me to have so much status i only tried this possibility of configuration.
Post Reply