Customization of status values
Moderators: Developer, Contributor
Customization of status values
I had installed Mantis 1.2.8 Version and tried customize some status values.
Requirement:
Want to add few more values for "Status"
Could anybody help me, how to do it please...
Regards,
Phani
Requirement:
Want to add few more values for "Status"
Could anybody help me, how to do it please...
Regards,
Phani
-
sonc
Re: Customization of status values
I've readed documentation, nowhere I found customization for ONLY 1 project.
I've done each step to customize status_enum_string.
I've managed workflow.
Everythink is fine.
Now i'd like that to customize user interface in html_api.php
I need to customize "function html_status_legend()" for displaying 'dynamic' legend status bar.
If a status is used in the workflow from selected projects than legend bar display this status.
For all projects and projects that not implements new status, no displaying complete status bar.
Thanks for help
I've done each step to customize status_enum_string.
I've managed workflow.
Everythink is fine.
Now i'd like that to customize user interface in html_api.php
I need to customize "function html_status_legend()" for displaying 'dynamic' legend status bar.
If a status is used in the workflow from selected projects than legend bar display this status.
For all projects and projects that not implements new status, no displaying complete status bar.
Thanks for help
-
Hockeytown
- Posts: 21
- Joined: 28 Oct 2010, 18:08
Re: Customization of status values
This link to the guide only states that the Status can be customized but doesn't say much else. Keep in mind I will not only be adding new Statuses but removing several of the existing ones to suit our needs. Most of the customizations I've done in our new Mantis 1.2.9 installation have been done on the following 3 files only:
\manitsbt\config_defaults_inc.php
\mantis\lang\strings_english.txt
\mantis\core\constant_inc.php
When adding/removing Statuses are there any other files affected? Anything else I should be aware of when doing this?
Re: Customization of status values
Never change this file, use config_inc.php for such kind of customizationsHockeytown wrote: \manitsbt\config_defaults_inc.php
Never change this file, use custom_strings_inc.php for such kind of customizationsHockeytown wrote: \mantis\lang\strings_english.txt
Never change this file, use custom_constants_inc.php for such kind of customizationsHockeytown wrote: \mantis\core\constant_inc.php
Not in documentation, but my recommendation:
Use page "Manage" > "Manage Configuration" > "Workflow Transitions" instead of setting $g_status_enum_workflow.
Removing statuses is possible.Hockeytown wrote: When adding/removing Statuses are there any other files affected? Anything else I should be aware of when doing this?
You have to adjust the following options in config_inc.php (read config_defaults_inc.php for explaination)
Code: Select all
$g_hide_status_default = CLOSED;
$g_bug_submit_status = NEW_;
$g_bug_assigned_status = ASSIGNED;
$g_bug_reopen_status = FEEDBACK;
$g_bug_feedback_status = FEEDBACK;
$g_bug_readonly_status_threshold = RESOLVED;
$g_bug_resolved_status_threshold = RESOLVED;
$g_bug_closed_status_threshold = CLOSED;Re: Customization of status values
If an exapmle would be of any help:
I renamed 3 of the existing states and created an additional one. That changed ticket states
from '10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,80:resolved,90:closed'
to '10:new,20:reopened,30:confirmed,40:deferred,50:assigned, 60:to be tested,80:resolved,90:closed'
changes made in config_inc.php:
in custom_constants_inc.php:
in custom_strings_inc.php:
I renamed 3 of the existing states and created an additional one. That changed ticket states
from '10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,80:resolved,90:closed'
to '10:new,20:reopened,30:confirmed,40:deferred,50:assigned, 60:to be tested,80:resolved,90:closed'
changes made in config_inc.php:
Code: Select all
# --- additional stati ---
$g_status_enum_string =
'10:new,20:reopened,30:confirmed,40:deferred,50:assigned, 60:to be tested,80:resolved,90:closed';
$g_status_colors = array( 'new' => '#ffa0a0', # red,
'reopened' => '#ff50a8', # purple
'confirmed' => '#ffffb0', # yellow
'deferred' => '#ffd850', # orange
'assigned' => '#c8c8ff', # blue
'to be tested' => '#ace7ae', // green
'resolved' => '#cceedd', # buish-green
'closed' => '#e8e8e8'); # light gray
# Status Settings
$g_hide_status_default = CLOSED;
$g_bug_submit_status = NEW_;
$g_bug_assigned_status = ASSIGNED;
$g_bug_reopen_status = REOPENED;
$g_bug_feedback_status = ASSIGNED;
$g_bug_readonly_status_threshold = RESOLVED;
$g_bug_resolved_status_threshold = RESOLVED;
$g_bug_resolution_fixed_threshold = RESOLVED;
$g_bug_resolution_not_fixed_threshold = UNABLE_TO_DUPLICATE;
# workflow definition
$g_status_enum_workflow[NEW_] = '20:reopened,30:confirmed,40:deferred,50:assigned,60:to be tested';
$g_status_enum_workflow[REOPENED] = '10:new,30:confirmed,40:deferred,50:assigned,60:to be tested';
$g_status_enum_workflow[CONFIRMED] = '20:reopened,40:deferred,50:assigned,60:to be tested';
$g_status_enum_workflow[DEFERRED] = '20:reopened,50:assigned,60:to be tested';
$g_status_enum_workflow[ASSIGNED] = '20:reopened,60:to be tested,90:closed';
$g_status_enum_workflow[TEST] = '10:new,20:reopened,50:assigned,80:resolved,90:closed';
$g_status_enum_workflow[RESOLVED] = '50:assigned,60:to be tested,90:closed';
$g_status_enum_workflow[CLOSED] = '50:assigned';
Code: Select all
/**
* MantisBT custom stati
*/
define ( 'DEFERRED', 40 );
define ( 'TEST', 60 );
Code: Select all
/**
* MantisBT custom stati
*/
if ( lang_get_current() == 'german' ) {
$s_status_enum_string = '10:neu,20:wiedereröffnet,30:bestätigt,40:zurückgestellt,50:zugewiesen,60:zu testen,80:behoben,90:geschlossen';
$s_to_be_tested_bug_button = "fertig zum Test";
$s_to_be_tested_bug_title = "zum Test übergeben";
$s_email_notification_title_for_status_bug_to_be_tested = "Ticket ist bearbeitet und fertig zum Test.";
$s_reopened_bug_button = "wiedereröffnen";
$s_reopened_bug_title = "Eintrag wieder öffnen";
$s_email_notification_title_for_status_bug_reopened = "Ticket wurde wieder geöffnet.";
$s_deferred_bug_button = "zurückstellen";
$s_deferred_bug_title = "Eintrag später bearbeiten";
$s_email_notification_title_for_status_bug_deferred = "Ticket wurde zurückgestellt.";
}
else {
$s_status_enum_string = '10:new,20:reopened,30:confirmed,40:deferred,50:assigned, 60:to be tested,80:resolved,90:closed';
$s_to_be_tested_bug_button = "Issue Ready to Test";
$s_to_be_tested_bug_title = "Set Issue Ready to Test";
$s_email_notification_title_for_status_bug_to_be_tested = "The following issue is ready TO BE TESTED.";
$s_reopened_bug_button = "reopen ticket";
$s_reopened_bug_title = "Reopen Issue";
$s_email_notification_title_for_status_bug_reopened = "The following issue was REOPENED.";
$s_deferred_bug_button = "postpone";
$s_deferred_bug_title = "Postphone Issue";
$s_email_notification_title_for_status_bug_deferred = "The following issue was POSTPONED.";
}
Re: Customization of status values
Hello,
I am a new member and I really need your help.
I am using Mantis two weeks ago and I have many things to ask:
1. I defined two projects, and for each one I defined the statuses and they are completely different, but when I defined the statuses of teh second project I missed the statuses of the first project why? and what about the number in (20:new for example ) means?? because I used to put this number as I want but I saw that when I used 11 for example teh status is not showing on and if I change the number it will be OK why?
And shall I have to write if statement to be able to show the two project statuses??
2. How can link issue attribute to another one? I mean the following:
If the user shows "issue new) then new attributes have to be shown and the user has to fill and if he moved to "issue confirmd for example" some more attributes have to be shown to be filled by the user so how to do that??
3. How can I change the taps (view issues, report issues .....) specifically for each project ???????
I really need your help ....
Thank you in advance ...
Rocky
I am a new member and I really need your help.
I am using Mantis two weeks ago and I have many things to ask:
1. I defined two projects, and for each one I defined the statuses and they are completely different, but when I defined the statuses of teh second project I missed the statuses of the first project why? and what about the number in (20:new for example ) means?? because I used to put this number as I want but I saw that when I used 11 for example teh status is not showing on and if I change the number it will be OK why?
And shall I have to write if statement to be able to show the two project statuses??
2. How can link issue attribute to another one? I mean the following:
If the user shows "issue new) then new attributes have to be shown and the user has to fill and if he moved to "issue confirmd for example" some more attributes have to be shown to be filled by the user so how to do that??
3. How can I change the taps (view issues, report issues .....) specifically for each project ???????
I really need your help ....
Thank you in advance ...
Rocky
Re: Customization of status values
Hello again,
From where you are using the status color codes?
Regards,
Rocky
From where you are using the status color codes?
Regards,
Rocky
Re: Customization of status values
Hello,
Could anyone please answer my questions??
I really need that and I am not able to do it alone ...
Regards,
Rocky
Could anyone please answer my questions??
I really need that and I am not able to do it alone ...
Regards,
Rocky
-
pay2play
Re: Customization of status values
The status color codes are set to their default in config_defaults_inc:
$g_status_colors = array( 'new' => '#fcbdbd', // red (scarlet red #ef2929)
'feedback' => '#e3b7eb', // purple (plum #75507b)
'acknowledged' => '#ffcd85', // orange (orango #f57900)
'confirmed' => '#fff494', // yellow (butter #fce94f)
'assigned' => '#c2dfff', // blue (sky blue #729fcf)
'resolved' => '#d2f5b0', // green (chameleon #8ae234)
'closed' => '#c9ccc4'); // grey (aluminum #babdb6)
Use your config_inc file to change the status colors to your preference.
$g_status_colors = array( 'new' => '#fcbdbd', // red (scarlet red #ef2929)
'feedback' => '#e3b7eb', // purple (plum #75507b)
'acknowledged' => '#ffcd85', // orange (orango #f57900)
'confirmed' => '#fff494', // yellow (butter #fce94f)
'assigned' => '#c2dfff', // blue (sky blue #729fcf)
'resolved' => '#d2f5b0', // green (chameleon #8ae234)
'closed' => '#c9ccc4'); // grey (aluminum #babdb6)
Use your config_inc file to change the status colors to your preference.