Mantis v 1.2.11
Hi guys,
I wanted to customize the bug_report_page.php (report issue page) and change the dropdowns for the Priority: section
I want to have "low / medium / high" instead of the default of none,low,normal,high,urgent,immediate.
Does anyone know how to do this?
I have edited the bug_report_page.php before to remove sections such as "steps to reproduce" but in this case I don't want to hide a section, I just want to make an adjustment.
Thanks for any and all help
cheers
changing "priority" dropdown in the report issue page
Moderators: Developer, Contributor
-
newmantisuser
- Posts: 68
- Joined: 06 Aug 2012, 18:13
changing "priority" dropdown in the report issue page
- Attachments
-
- Untitled.png (8.43 KiB) Viewed 10546 times
-
newmantisuser
- Posts: 68
- Joined: 06 Aug 2012, 18:13
Re: changing "priority" dropdown in the report issue page
I have since figured out how to do it. If anyone is interested here is how.
1. edit the core/constraint_inc.php and add the following to the Priority defned area
# priority
define( 'NONE', 10 );
define( 'LOW', 20 );
define( 'NORMAL', 30 );
define( 'HIGH', 40 );
define( 'URGENT', 50 );
define( 'IMMEDIATE', 60 );
define( 'MEDIUM', 70 );
2. edit the config_defaults_inc.php and search for “MantisBT Enum” and replace the line with the following:
$g_priority_enum_string = '20:low,70:medium,40:high';
3. edit lang/strings_english.txt and add the following to the Priority section:
$s_priority_enum_string = '10:none,20:low,30:normal,40:high,50:urgent,60:immediate,70:medium';
Check your work. The Priority dropdown is now changed to low,medium,high
1. edit the core/constraint_inc.php and add the following to the Priority defned area
# priority
define( 'NONE', 10 );
define( 'LOW', 20 );
define( 'NORMAL', 30 );
define( 'HIGH', 40 );
define( 'URGENT', 50 );
define( 'IMMEDIATE', 60 );
define( 'MEDIUM', 70 );
2. edit the config_defaults_inc.php and search for “MantisBT Enum” and replace the line with the following:
$g_priority_enum_string = '20:low,70:medium,40:high';
3. edit lang/strings_english.txt and add the following to the Priority section:
$s_priority_enum_string = '10:none,20:low,30:normal,40:high,50:urgent,60:immediate,70:medium';
Check your work. The Priority dropdown is now changed to low,medium,high
- Attachments
-
- Untitled.png (9.64 KiB) Viewed 10539 times
-
newmantisuser
- Posts: 68
- Joined: 06 Aug 2012, 18:13
Re: changing "priority" dropdown in the report issue page
The issue I am having now is that since I have undefined 'normal' in config_defaults_inc.php
$g_priority_enum_string = ‘40:high,70:medium,20:low';
now when I go to view issues, under the Priority section I see @30@. I can fix this by re-adding the "30:normal" entry to config_defaults_inc.php but then when you select the priority when reporting a new issue, I have two "medium" options in the dropdown because I defined a new entry called 70:medium in core/constraint_inc.php.
going forward, if I were to add a new entry it shows up was "medium" and not @30@ which is ok. I'm thinking this is happening because the old mantis system never used a priority drop down so it is defaulting to @30@ which WAS defined as 'normal' but I have since removed that reference in config_defaults_inc.php.
Is there a way to set all the OLD bug entries to priority "medium" besides manually editing them?
$g_priority_enum_string = ‘40:high,70:medium,20:low';
now when I go to view issues, under the Priority section I see @30@. I can fix this by re-adding the "30:normal" entry to config_defaults_inc.php but then when you select the priority when reporting a new issue, I have two "medium" options in the dropdown because I defined a new entry called 70:medium in core/constraint_inc.php.
going forward, if I were to add a new entry it shows up was "medium" and not @30@ which is ok. I'm thinking this is happening because the old mantis system never used a priority drop down so it is defaulting to @30@ which WAS defined as 'normal' but I have since removed that reference in config_defaults_inc.php.
Is there a way to set all the OLD bug entries to priority "medium" besides manually editing them?
- Attachments
-
- Untitled.png (28.88 KiB) Viewed 10535 times
Re: changing "priority" dropdown in the report issue page
I don't have time for a deeper look.
Start reading how to implement a new status
http://www.mantisbt.org/docs/master-1.2 ... IZE.STATUS
It works nearly the same way for priority.
You should never change any existing source code of MantisBT to avoid problems when updating to newer versions.
Use config_inc.php, custom_constants_inc.php, custom_strings_inc.php instead of changing config_defaults_inc.php, constant_inc.php and strings_english.txt
If you want to have MEDIUM as a priority between NORMAL and HIGH you should define it as 35, not 70
70 would mean that the priority is higher than IMMEDIATE (60)
Start reading how to implement a new status
http://www.mantisbt.org/docs/master-1.2 ... IZE.STATUS
It works nearly the same way for priority.
You should never change any existing source code of MantisBT to avoid problems when updating to newer versions.
Use config_inc.php, custom_constants_inc.php, custom_strings_inc.php instead of changing config_defaults_inc.php, constant_inc.php and strings_english.txt
If you want to have MEDIUM as a priority between NORMAL and HIGH you should define it as 35, not 70
70 would mean that the priority is higher than IMMEDIATE (60)
-
newmantisuser
- Posts: 68
- Joined: 06 Aug 2012, 18:13
Re: changing "priority" dropdown in the report issue page
Thanks for the reply Atrol I appreciate the link.
Will let you know if I run into problems.
Cheers
Will let you know if I run into problems.
Cheers
-
newmantisuser
- Posts: 68
- Joined: 06 Aug 2012, 18:13
Re: changing "priority" dropdown in the report issue page
HI Atrol,
Yeah that suggestion did not work for me. I was stuck on step 3 and 4.
I'll stick with my method for now
Yeah that suggestion did not work for me. I was stuck on step 3 and 4.
I'll stick with my method for now