Creating custom statuses

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
micah26
Posts: 3
Joined: 17 Nov 2008, 07:33

Creating custom statuses

Post by micah26 »

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
jb_mantis
Posts: 63
Joined: 14 Oct 2008, 12:41
Location: Columbus, Ohio, USA

Re: Creating custom statuses

Post by jb_mantis »

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';
-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.
olegos
Posts: 72
Joined: 12 Mar 2007, 20:24

Re: Creating custom statuses

Post by olegos »

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]
micah26
Posts: 3
Joined: 17 Nov 2008, 07:33

Re: Creating custom statuses

Post by micah26 »

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]
micah26
Posts: 3
Joined: 17 Nov 2008, 07:33

Re: Creating custom statuses

Post by micah26 »

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]
It worked great! Thank you!
Micah
torenware
Posts: 1
Joined: 24 Mar 2009, 07:06

Re: Creating custom statuses

Post by torenware »

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:

Code: Select all

delete from mantis_config_table where config_id = 'status_enum_workflow';
Mantis will then look at your config file for this information, and you can go into Manage pages to finish configuring the workflow.
duwil
Posts: 46
Joined: 08 Jul 2008, 12:14

Re: Creating custom statuses

Post by duwil »

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:

Code: Select all

delete from mantis_config_table where config_id = 'status_enum_workflow';
Mantis will then look at your config file for this information, and you can go into Manage pages to finish configuring the workflow.
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.
tetsunami
Posts: 26
Joined: 21 Apr 2010, 14:45

Re: Creating custom statuses

Post by tetsunami »

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 . :P
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Creating custom statuses

Post by atrol »

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.
Please use Search before posting and read the Manual
tetsunami
Posts: 26
Joined: 21 Apr 2010, 14:45

Re: Creating custom statuses

Post by tetsunami »

tetsunami 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 . :P
SO i only add in the gui state the right workflow and then the colores bar just update :mrgreen: my bad
Post Reply