Customize Severity?

Post about your customizations to share with others.

Moderators: Developer, Contributor

Post Reply
maloyd1

Customize Severity?

Post by maloyd1 »

Hi,

I would like to add a level called "Enhancement" to the Severity field. Has anyone done this or something similiar and could help?

Thanks.
MTW
Posts: 13
Joined: 02 Sep 2005, 08:44
Contact:

adding new severity level

Post by MTW »

In constant_inc.php search for severity and add your define
In config_inc.php search $g_severity_enum_string and add the description
In strings_yourlanguage.txt search $s_severity_enum_string and add the translation

After that you should search all files in your mantis directory to see if new added severity will not damage the application

:)

Ta Daaa

MTW
maloyd1

Damage??

Post by maloyd1 »

Can you explain what you mean by damage the app?

Since this severity type is not currently available, I guess I don't understand how it would damage the app?

Thanks for the help.
maloyd1

Damage??

Post by maloyd1 »

Can you explain what you mean by damage the app?

Since this severity type is not currently available, I guess I don't understand how it would damage the app?

Thanks for the help.
MTW
Posts: 13
Joined: 02 Sep 2005, 08:44
Contact:

Post by MTW »

Hi,

I mean that I do not know all the mantis application in detail, in this particular case I have no idea of where and how the severity field is used/tested if it is treated as a string or a integer and so on..
so any modification could introduce new bugs.

You should check yourself to see if your customization will interact with some other mantis code

example:
If, for some reasons, there is a fixed structure of n elements to load the descriptions, adding one or more to the list will raise some errors..
(this is only an example)

byez

MTW
Narcissus
Developer
Posts: 338
Joined: 17 Feb 2005, 09:45

Post by Narcissus »

So long as you add the severity correctly, there won't be a problem.

The only thing you really need to be sure to do is to assign a new value to the severity (do not 'bump' another one). The database stores all of it's severities as an integer. That means that whilever you're adding severities with new integer values there won't be a problem.

Hope that helps.
fredckp
Posts: 4
Joined: 01 Jun 2005, 05:50

Post by fredckp »

I make the following changes, but I still not seeing the dropdown list changes when I submit a bug form. Any advice is appreciated.

Regards,
Fred

core/constant_inc.php
# severity
define( 'SUGGESTION', 10 );
define( 'LOW', 20 );
define( 'MEDIUM', 30 );
define( 'HIGH', 40 );
define( 'SHOWSTOPPER', 50 );

config_defaults_inc.php
$g_severity_enum_string = '10:suggestion,20:low,30:medium,40:high,50:showstopper';

lang/strings_english.txt
$s_severity_enum_string = '100:suggestion,110:low,120:medium,130:high,140:showstopper';
atomoid
Posts: 108
Joined: 18 Aug 2005, 00:46
Location: santa cruz, ca

Post by atomoid »

Since there is already a "feature" selection under the severity menu, maybe all you want to do is rename that to "Enhancement", as opposed to ADDing another field (since they mean the same thing anyway). In this case the job is distgustingly simple, so for example I did the following to customize:

...mantis/lang/strings_english.txt -- line 287:
$s_severity_enum_string = '10:Enhancement,20:trivial,30:text,40:Minor,50:Moderate,60:Serious,70:Crash,80:block';
Narcissus
Developer
Posts: 338
Joined: 17 Feb 2005, 09:45

Post by Narcissus »

fredckp:

Any reason you chose those > 100 numbers in $s_severity_enum_string? I think they are supposed to match the $g_severity_enum_string and constants...
Post Reply