Add New Status - Please Help
Posted: 18 Sep 2013, 20:21
Hello,
I am trying add five new statuses in Mantis version 1.2.15 and request some assistance please.
I desire an open workflow, such that any status can transition to any other status.
I hope to add these new statuses:
‘deferred’ color code #A4D3EE
‘fixed’ color code #EED8AE
‘deployed’ color code #9AFF9A
‘bug remains’ color code #FFBBFF
‘rejected’ color code #FFA500
I still hope to use these default statuses:
New
Acknowledged
Feedback
Closed
I prefer not to use these default statuses in the workflow or have them shown in lists as available selections for status.
Confirmed
Assigned
Resolved
Here is my desired workflow.
$s_status_enum_string = '10:new,20:acknowledged,30:fixed,40:deployed,50:closed,60:deferred,70:feedback,80:bug remains,90:rejected';
Any advice or assistance on the changes that would need to be made and how to do this would be most appreciated, as I have limited developer support on this.
Here is the proposed changes and code, based on information found in the below thread. Please note this post was in 2008, so I’m concerned that the code below is still compatible with mantis 1.2.15.
http://www.mantisbt.org/forums/viewtopi ... tus#p47493
Note I defined colors for all the desired statuses, however default colors for the default statuses still desired for use are acceptable.
Step 1
Rename customization file "config_inc.php" to "custom_config_inc.php" in the main "mantis" directory.
> mv config_inc.php custom_config_inc.php
Step 2
Create a new "config_inc.php" file in the main "mantis" directory. It should contain the following lines only.
<?php
require_once('custom_config_inc.php');
?>
Step 3
[I would like the user to have the ability to change the bug from any state to any state freely, with the exception of new, which should only transition to either acknowledged, deferred, feedback, or rejected, all of which should be able to transition back to new.]
[I am not sure if all statuses should be included here, or only the statuses being changed or added. Below I only included statutes being changed or added.]
Create the file "custom_constant_inc.php" in the main "mantis" directory.
<?php
# Customized new status
define ('fixed', 30);
define ('deployed', 40);
define ('deferred', 60);
define ('bug remains', 80);
define ('rejected', 90);
?>
Step 4
Create the file "custom_strings_inc.php" in the main "mantis" directory. It should contain the following lines. If the file also exists, add the following lines to the end of the file.
<?php
# Customize workflow status
$s_status_enum_string = '10:new,20:acknowledged,30:fixed,40:deployed,50:closed,60:deferred,70:feedback,80:bug remains,90:rejected';
# Customize status fixed
$s_fixed_bug_button = 'fixed';
$s_fixed_bug_title = 'Set Issue to fixed';
$s_email_notification_title_for_status_bug_fixed = "The following issue is fixed";
# Customize status deployed
$s_deployed_bug_button = 'deployed';
$s_deployed_bug_title = 'Set Issue to deployed';
$s_email_notification_title_for_status_bug_deployed = "The following issue is deployed";
?>
# Customize status deferred
$s_deferred_bug_button = 'deferred';
$s_deferred_bug_title = 'Set Issue to deferred';
$s_email_notification_title_for_status_bug_deferred = "The following issue is deferred";
?>
# Customize status bug remains
$s_bug_remains_bug_button = 'bug remains';
$s_bug_remains_bug_title = 'Set Issue to bug remains';
$s_email_notification_title_for_status_bug_bug_remains = "The following issue is set to bug remains";
?>
# Customize status rejected
$s_rejected_bug_button = 'rejected';
$s_rejected_bug_title = 'Set Issue to rejected';
$s_email_notification_title_for_status_bug_rejected = "The following issue is set to rejected";
?>
Step 5
5. Modify the file "custom_config_inc.php" in the main "mantis" directory. This file should have been created by the first step. Add the following lines to the end of the file.
# Customize status & workflow
$s_status_enum_string = '10:new,20:acknowledged,30:fixed,40:deployed,50:closed,60:deferred,70:feedback,80:bug remains,90:rejected';
# Customize next available status in workflow
$g_status_enum_workflow[NEW_] = '10:new,20:acknowledged,30:fixed,40:deployed,50:closed,60:deferred,70:feedback,80:bug remains,90:rejected';
$g_status_enum_workflow[ACKNOWLEDGED] = '10:new,20:acknowledged,30:fixed,40:deployed,50:closed,60:deferred,70:feedback,80:bug remains,90:rejected';
$g_status_enum_workflow[FIXED] = '10:new,20:acknowledged,30:fixed,40:deployed,50:closed,60:deferred,70:feedback,80:bug remains,90:rejected';
$g_status_enum_workflow[DEPLOYED] = '10:new,20:acknowledged,30:fixed,40:deployed,50:closed,60:deferred,70:feedback,80:bug remains,90:rejected';
$g_status_enum_workflow[CLOSED] = '10:new,20:acknowledged,30:fixed,40:deployed,50:closed,60:deferred,70:feedback,80:bug remains,90:rejected';
$g_status_enum_workflow[DEFERRED] = '20:acknowledged,30:fixed,40:deployed,50:closed,60:deferred,70:feedback,80:bug remains,90:rejected';
$g_status_enum_workflow[FEEDBACK] = '10:new,20:acknowledged,30:fixed,40:deployed,50:closed,60:deferred,70:feedback,80:bug remains,90:rejected';
$g_status_enum_workflow[BUG REMAINS] = '10:new,20:acknowledged,30:fixed,40:deployed,50:closed,60:deferred,70:feedback,80:bug remains,90:rejected';
$g_status_enum_workflow[REJECTED] = '10:new,20:acknowledged,30:fixed,40:deployed,50:closed,60:deferred,70:feedback,80:bug remains,90:rejected';
# Customize status colors
$g_status_colors['new'] = '#FFFFFF';
$g_status_colors['acknowledged'] = '#FFE7BA';
$g_status_colors['fixed'] = ' #CDAA7D';
$g_status_colors['deployed'] = '#9AFF9A';
$g_status_colors['closed'] = #D6D6D6';
$g_status_colors['deferred'] = '#A4D3EE';
$g_status_colors['feedback'] = '# FFBBFF';
$g_status_colors['bug remains'] = '# FFFF00';
$g_status_colors['rejected'] = '#FFA500';
I am trying add five new statuses in Mantis version 1.2.15 and request some assistance please.
I desire an open workflow, such that any status can transition to any other status.
I hope to add these new statuses:
‘deferred’ color code #A4D3EE
‘fixed’ color code #EED8AE
‘deployed’ color code #9AFF9A
‘bug remains’ color code #FFBBFF
‘rejected’ color code #FFA500
I still hope to use these default statuses:
New
Acknowledged
Feedback
Closed
I prefer not to use these default statuses in the workflow or have them shown in lists as available selections for status.
Confirmed
Assigned
Resolved
Here is my desired workflow.
$s_status_enum_string = '10:new,20:acknowledged,30:fixed,40:deployed,50:closed,60:deferred,70:feedback,80:bug remains,90:rejected';
Any advice or assistance on the changes that would need to be made and how to do this would be most appreciated, as I have limited developer support on this.
Here is the proposed changes and code, based on information found in the below thread. Please note this post was in 2008, so I’m concerned that the code below is still compatible with mantis 1.2.15.
http://www.mantisbt.org/forums/viewtopi ... tus#p47493
Note I defined colors for all the desired statuses, however default colors for the default statuses still desired for use are acceptable.
Step 1
Rename customization file "config_inc.php" to "custom_config_inc.php" in the main "mantis" directory.
> mv config_inc.php custom_config_inc.php
Step 2
Create a new "config_inc.php" file in the main "mantis" directory. It should contain the following lines only.
<?php
require_once('custom_config_inc.php');
?>
Step 3
[I would like the user to have the ability to change the bug from any state to any state freely, with the exception of new, which should only transition to either acknowledged, deferred, feedback, or rejected, all of which should be able to transition back to new.]
[I am not sure if all statuses should be included here, or only the statuses being changed or added. Below I only included statutes being changed or added.]
Create the file "custom_constant_inc.php" in the main "mantis" directory.
<?php
# Customized new status
define ('fixed', 30);
define ('deployed', 40);
define ('deferred', 60);
define ('bug remains', 80);
define ('rejected', 90);
?>
Step 4
Create the file "custom_strings_inc.php" in the main "mantis" directory. It should contain the following lines. If the file also exists, add the following lines to the end of the file.
<?php
# Customize workflow status
$s_status_enum_string = '10:new,20:acknowledged,30:fixed,40:deployed,50:closed,60:deferred,70:feedback,80:bug remains,90:rejected';
# Customize status fixed
$s_fixed_bug_button = 'fixed';
$s_fixed_bug_title = 'Set Issue to fixed';
$s_email_notification_title_for_status_bug_fixed = "The following issue is fixed";
# Customize status deployed
$s_deployed_bug_button = 'deployed';
$s_deployed_bug_title = 'Set Issue to deployed';
$s_email_notification_title_for_status_bug_deployed = "The following issue is deployed";
?>
# Customize status deferred
$s_deferred_bug_button = 'deferred';
$s_deferred_bug_title = 'Set Issue to deferred';
$s_email_notification_title_for_status_bug_deferred = "The following issue is deferred";
?>
# Customize status bug remains
$s_bug_remains_bug_button = 'bug remains';
$s_bug_remains_bug_title = 'Set Issue to bug remains';
$s_email_notification_title_for_status_bug_bug_remains = "The following issue is set to bug remains";
?>
# Customize status rejected
$s_rejected_bug_button = 'rejected';
$s_rejected_bug_title = 'Set Issue to rejected';
$s_email_notification_title_for_status_bug_rejected = "The following issue is set to rejected";
?>
Step 5
5. Modify the file "custom_config_inc.php" in the main "mantis" directory. This file should have been created by the first step. Add the following lines to the end of the file.
# Customize status & workflow
$s_status_enum_string = '10:new,20:acknowledged,30:fixed,40:deployed,50:closed,60:deferred,70:feedback,80:bug remains,90:rejected';
# Customize next available status in workflow
$g_status_enum_workflow[NEW_] = '10:new,20:acknowledged,30:fixed,40:deployed,50:closed,60:deferred,70:feedback,80:bug remains,90:rejected';
$g_status_enum_workflow[ACKNOWLEDGED] = '10:new,20:acknowledged,30:fixed,40:deployed,50:closed,60:deferred,70:feedback,80:bug remains,90:rejected';
$g_status_enum_workflow[FIXED] = '10:new,20:acknowledged,30:fixed,40:deployed,50:closed,60:deferred,70:feedback,80:bug remains,90:rejected';
$g_status_enum_workflow[DEPLOYED] = '10:new,20:acknowledged,30:fixed,40:deployed,50:closed,60:deferred,70:feedback,80:bug remains,90:rejected';
$g_status_enum_workflow[CLOSED] = '10:new,20:acknowledged,30:fixed,40:deployed,50:closed,60:deferred,70:feedback,80:bug remains,90:rejected';
$g_status_enum_workflow[DEFERRED] = '20:acknowledged,30:fixed,40:deployed,50:closed,60:deferred,70:feedback,80:bug remains,90:rejected';
$g_status_enum_workflow[FEEDBACK] = '10:new,20:acknowledged,30:fixed,40:deployed,50:closed,60:deferred,70:feedback,80:bug remains,90:rejected';
$g_status_enum_workflow[BUG REMAINS] = '10:new,20:acknowledged,30:fixed,40:deployed,50:closed,60:deferred,70:feedback,80:bug remains,90:rejected';
$g_status_enum_workflow[REJECTED] = '10:new,20:acknowledged,30:fixed,40:deployed,50:closed,60:deferred,70:feedback,80:bug remains,90:rejected';
# Customize status colors
$g_status_colors['new'] = '#FFFFFF';
$g_status_colors['acknowledged'] = '#FFE7BA';
$g_status_colors['fixed'] = ' #CDAA7D';
$g_status_colors['deployed'] = '#9AFF9A';
$g_status_colors['closed'] = #D6D6D6';
$g_status_colors['deferred'] = '#A4D3EE';
$g_status_colors['feedback'] = '# FFBBFF';
$g_status_colors['bug remains'] = '# FFFF00';
$g_status_colors['rejected'] = '#FFA500';