Page 1 of 1

Adding custom priority and severity

Posted: 14 May 2014, 13:34
by janboen
Hi,
I added this to config_inc.php
# --- Custom strings
# --- Revised enum string with new priority ---
$g_priority_enum_string = '5:NA,10:NONE,20:LOW,30:NORMAL,40:HIGH,50:URGENT,60:IMMEDIATE';

# --- Revised enum string with new severity ---
$g_severity_enum_string = '5:TASK,10:FEATURE,20:TRIVIAL,30:TEXT,40:TWEAK,50:MINOR,60:MAJOR,70:CRASH,80:BLOCK';

I created:
custom_constants_inc.php
<?php
# --- constants ---

# custom priority
define( 'NA', 5 );

# custom severity
define ('task', 5 );
?>

custom_strings_inc.php
<?
# Translation for Custom priority and severity
switch( $g_active_language ) {

default: # english
$s_priority_enum_string = '5:NA,10:none,20:low,30:normal,40:high,50:urgent,60:immediate';
$s_severity_enum_string = '5:task,10:feature,20:trivial,30:text,40:tweak,50:minor,60:major,70:Crash,80:BLOCK';

break;
}
?>


Running
MantisBT Version 1.2.17
Schema Version 183

BUT in Mantis it shows the extra value of @5@ in both priority and severity.
What have I done wrong?

Thanks,

Jan

Re: Adding custom priority and severity

Posted: 21 May 2014, 12:25
by janboen
Hi,

Can anyone have a look please!
My question is straightforward.
I followed the instructions, at least I think I did, but it's not working.

Thanks,


Jan

Re: Adding custom priority and severity

Posted: 25 May 2014, 17:09
by atrol
I tried your code and didn't get any problem.
Maybe there is more than one custom_strings_inc.php on our system?
Add the following line to the file to find out if you are changing the right file

Code: Select all

die ("Hello");
After that you should just get a "Hello" when viewing an issue.

Re: Adding custom priority and severity

Posted: 27 May 2014, 15:02
by janboen
Hi atrol,

Nope just 1 custom_strings_inc.php and that is at /var/www/html/mantisbt/custom_strings_inc.php.
I added your line of code and I get die ("Hello"); on the screen.

Any other suggestion?

Thanks,


Jan

Re: Adding custom priority and severity

Posted: 28 May 2014, 07:10
by atrol
No idea at the moment.
Maybe you can try Mantis2Go to reproduce the issue?