I'm currently using Mantis 1.1.2 and am wondering if there is an easy way to do this. The manual shows a way to do this, but I had trouble with it. The manual page is also 3 years old. Is there a tutorial for this and/or can someone update the manual.
I'm interested in statuses like testing and ready for production.
Thank you,
Micah
Creating custom statuses
Moderators: Developer, Contributor
Re: Creating custom statuses
I was interested in this a while back and researched it some. I never implemented it, but here are the changes I think would need to be made. Hopefully someone else can confirm. The settings below are for a new status of "In progress". Replace with your status name.
add/update to custom_constant_inc.php:
<?php
define ( 'IN_PROGRESS', 70 );
?>
add/update to custom_strings_inc.php:
<?php
if ( lang_get_current() == 'english' ) {
$s_status_enum_string = '10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,70:in progress,80:resolved,90:closed';
$s_in_progress_bug_button = "Issue In Progress";
$s_in_progress_bug_title = "Set Issue In Progress";
$s_email_notification_title_for_status_bug_in_progress = "The following issue is IN PROGRESS.";
}
?>
add/update to config_inc.php:
$g_status_enum_string = '10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,70:in_progress,80:resolved,90:closed';
$g_status_colors['in progress'] = '#C7E3FF';
$g_status_enum_workflow[IN_PROGRESS] = '20:feedback,30:acknowledged,40:confirmed,50:assigned,80:resolved,90:closed';
add/update to custom_constant_inc.php:
<?php
define ( 'IN_PROGRESS', 70 );
?>
add/update to custom_strings_inc.php:
<?php
if ( lang_get_current() == 'english' ) {
$s_status_enum_string = '10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,70:in progress,80:resolved,90:closed';
$s_in_progress_bug_button = "Issue In Progress";
$s_in_progress_bug_title = "Set Issue In Progress";
$s_email_notification_title_for_status_bug_in_progress = "The following issue is IN PROGRESS.";
}
?>
add/update to config_inc.php:
$g_status_enum_string = '10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,70:in_progress,80:resolved,90:closed';
$g_status_colors['in progress'] = '#C7E3FF';
$g_status_enum_workflow[IN_PROGRESS] = '20:feedback,30:acknowledged,40:confirmed,50:assigned,80:resolved,90:closed';
-Joe
Mantis Version: 1.1.2
Disclaimer: Answers are based on the Mantis version above and may be inaccurate for newer/older versions which may have different configuration options and/or functionality.
Mantis Version: 1.1.2
Disclaimer: Answers are based on the Mantis version above and may be inaccurate for newer/older versions which may have different configuration options and/or functionality.
Re: Creating custom statuses
What problems did you run into?
I created a new status just now by following this, with no problems at all (except that in step 4 I defined the workflow transitions through the GUI rather than editing config_inc.php).
[MantisBT 1.2.0a2]
I created a new status just now by following this, with no problems at all (except that in step 4 I defined the workflow transitions through the GUI rather than editing config_inc.php).
[MantisBT 1.2.0a2]
Re: Creating custom statuses
olegos wrote:What problems did you run into?
I created a new status just now by following this, with no problems at all (except that in step 4 I defined the workflow transitions through the GUI rather than editing config_inc.php).
[MantisBT 1.2.0a2]
I had trouble seeing the new status. I'll try the steps the last poster showed and see if it helps.
Thanks,
Micah
[Mantis 1.1.2]
Re: Creating custom statuses
It worked great! Thank you!micah26 wrote:olegos wrote:What problems did you run into?
I created a new status just now by following this, with no problems at all (except that in step 4 I defined the workflow transitions through the GUI rather than editing config_inc.php).
[MantisBT 1.2.0a2]
I had trouble seeing the new status. I'll try the steps the last poster showed and see if it helps.
Thanks,
Micah
[Mantis 1.1.2]
Micah
Re: Creating custom statuses
One caveat: I just spent several hours trying to figure out why the example didn't work with the current stable download. I had updated from 0.19, and the upgrade went fine. It seemed as if Mantis was not looking in config_inc.php to pull in my new workflow entries.
After running Mantis through the debugger, it turns out that Mantis will not look at your workflow configs if there is already a setting in the mantis_config_table in the database. config_get will never go to the settings files if the database has already cached status_enum_workflow.
The workaround is to delete the item from the cache:
Mantis will then look at your config file for this information, and you can go into Manage pages to finish configuring the workflow.
After running Mantis through the debugger, it turns out that Mantis will not look at your workflow configs if there is already a setting in the mantis_config_table in the database. config_get will never go to the settings files if the database has already cached status_enum_workflow.
The workaround is to delete the item from the cache:
Code: Select all
delete from mantis_config_table where config_id = 'status_enum_workflow';
Re: Creating custom statuses
I ran into a similar problem months ago and I think it's better not to use the config file at all when possible to avoid confusion, my config_inc.php has only few lines, only the ones I can't configure via web interface.torenware wrote:config_get will never go to the settings files if the database has already cached status_enum_workflow.
The workaround is to delete the item from the cache:Mantis will then look at your config file for this information, and you can go into Manage pages to finish configuring the workflow.Code: Select all
delete from mantis_config_table where config_id = 'status_enum_workflow';
Re: Creating custom statuses
so i want to ask something about the states
in
my_view_page.php
how can i add to the states bar (the colored one) the new state i just add
thansk a lot for the help .
in
my_view_page.php
how can i add to the states bar (the colored one) the new state i just add
thansk a lot for the help .
Re: Creating custom statuses
If you are following the given instructions how to add a new status, you don't have to do anything more.
The new status will appear in bar without any further modification.
The new status will appear in bar without any further modification.
Re: Creating custom statuses
SO i only add in the gui state the right workflow and then the colores bar just update my badtetsunami wrote:so i want to ask something about the states
in
my_view_page.php
how can i add to the states bar (the colored one) the new state i just add
thansk a lot for the help .