how to edit the drop down options for priority, severity etc

Post about your customizations to share with others.

Moderators: Developer, Contributor

Post Reply
PHPycho
Posts: 13
Joined: 16 Mar 2007, 10:31

how to edit the drop down options for priority, severity etc

Post by PHPycho »

Hello forums !!
I would like to know how to edit the options in drop down for priority, severity etc in the page of "bug_report_page.php" .
Because i would like to add some new options and edit some existing ones..
I would be very greatful if someone gives a hint, suggestions etc.
Thanks in advance to all of you !!
Narcissus
Developer
Posts: 338
Joined: 17 Feb 2005, 09:45

Post by Narcissus »

PHPycho
Posts: 13
Joined: 16 Mar 2007, 10:31

Post by PHPycho »

Thanks for the help Narcissus
I successfully made the changes severity and priority..
I want to add options for category dropdown...
I saw the option "add category" but that is applicable to only the related project under which you created the category..
I want some global option applicable to all categories..

Thanks in advance to all of you !!
Narcissus
Developer
Posts: 338
Joined: 17 Feb 2005, 09:45

Post by Narcissus »

There's no way that I know of that let's you create 'global categories'. In reality, categories are generally fairly unique to each project (or so I thought!).

So, unless you're willing to hack the code yourself, I would suggest looking into the option of adding a custom field with the 'global' values you want, then adding that custom field to all of your projects.
complx
Posts: 2
Joined: 23 Apr 2007, 14:12

Same right answer, in a simpler form

Post by complx »

I found the enumerations page (linked above) to be helfpul, but a bit vague.

I thought it might be helpful if I posted a boiled-down version of the solution. However, if anyone needs the complete details on everything that affects the list of options (such as priorities), absolutely go to the enumerations page.


The manual describes all of the files involved in setting the values, but you don't need to change _everything_. IF, for example, you only need to change the textual names of Mantis' issue priorities, then you only need to change the text that will be displayed in the language being used. (Mantis is localized, so it will show different text for each language.

First, look in ../mantis/lang/strings_english.txt (for example) for the variable you want to change. I wanted to change priority labels, so I eventually found

Code: Select all

$s_priority_enum_string = '10:none,20:low,30:normal,40:high,50:urgent,60:immediate';
Next, make this file:

../mantis/custom_strings_inc.php

And add your new variable:

Code: Select all

if ( lang_get_current() === 'english' ) {
  $s_priority_enum_string = '10:someday,20:long-term project,30:within 1 week,40:tomorrow,50:NOW,60:The president wants it!';
}
Remove the IF statement if you don't care about replacing the values for all languages.
Post Reply