Adding new value to g_status_enum_string - without altering exiting data

Post about your customizations to share with others.

Moderators: Developer, Contributor

Post Reply
shanthini.g
Posts: 44
Joined: 31 May 2017, 12:45

Adding new value to g_status_enum_string - without altering exiting data

Post by shanthini.g »

Hi,

We would like to add a new status 'deployed' between 'resolved' and 'closed'

We tried as below but this is not working
$g_status_enum_string = '10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,80:resolved,85:deployed,90:closed';

If we try the below this is working. But all existing records with ‘resolved’ status seems to be changed to ‘deployed’
'10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,70:resolved, 80:deployed,90:closed'

Or can we do as below
To use the setting - '10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,70:resolved, 80:deployed,90:closed'
To use update query and change the value in the corresponding field for status ID's from 80 to 70 (in back-end)

Could you please suggest how can we achieve this without altering exiting data

Thanks
cas
Posts: 1586
Joined: 11 Mar 2006, 16:08
Contact:

Re: Adding new value to g_status_enum_string - without altering exiting data

Post by cas »

Your initial setup should work ( with 85 defined as "deployed".
Did you follow the instructions in full for adding a status ( see admin-guide as of page 82 on enumerations) ?
In addition, you also should review the workflow.
shanthini.g
Posts: 44
Joined: 31 May 2017, 12:45

Re: Adding new value to g_status_enum_string - without altering exiting data

Post by shanthini.g »

Hi

Please review the settings I did in 'config_inc.php' and 'custom_strings_inc.php' as below and suggest if I need to do any corrections.

In 'config_inc.php'
----------------------
# Customize workflow status
# Custom status code
define( 'DEPLOYED', 85 );

$g_status_enum_string = '10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,80:resolved,85:deployed,90:closed';
# Customize status colors
$g_status_colors['deployed'] = '#ACE7AE';

$g_status_enum_workflow[NEW_] ='30:acknowledged,20:feedback,40:confirmed,50:assigned,80:resolved';
$g_status_enum_workflow[FEEDBACK] ='30:acknowledged,40:confirmed,50:assigned,80:resolved';
$g_status_enum_workflow[ACKNOWLEDGED] ='40:confirmed,20:feedback,50:assigned,80:resolved';
$g_status_enum_workflow[CONFIRMED] ='50:assigned,20:feedback,30:acknowledged,80:resolved';
$g_status_enum_workflow[ASSIGNED] ='20:feedback,30:acknowledged,40:confirmed,80:resolved';
$g_status_enum_workflow[DEPLOYED] ='90:closed';
$g_status_enum_workflow[RESOLVED] ='85:deployed,90:closed,20:feedback,50:assigned';
$g_status_enum_workflow[CLOSED] ='20:feedback,50:assigned';

In custom_strings_inc.php
-------------------------------
# Customize workflow status
$s_status_enum_string = '10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,80:resolved,85:deployed,90:closed';
# 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 now deployed';

Thanks
Starbuck
Posts: 219
Joined: 14 Feb 2006, 02:53
Location: USA
Contact:

Re: Adding new value to g_status_enum_string - without altering exiting data

Post by Starbuck »

FWIW, I just looked through it closely and it looks good to me.

I see you don't have an In Progress status, so tasks go directly from Assigned to Resolved and you don't care exactly when someone is actually working on it - if it's assigned then it's assumed to be in progress. Other than this question about flow, it all looks technically perfect.

HTH
If you want Mantis to work differently, use or create a plugin. Visit the Plugins forums.
Ask developers to create a plugin that you need - and motivate them to help you!
shanthini.g
Posts: 44
Joined: 31 May 2017, 12:45

Re: Adding new value to g_status_enum_string - without altering exiting data

Post by shanthini.g »

Hi,
As of now I have not included 'In progress' status. I will include in future if needed.
By my status drop down is not showing 'Deployed'. is there any reasons for this.
Thanks
Starbuck
Posts: 219
Joined: 14 Feb 2006, 02:53
Location: USA
Contact:

Re: Adding new value to g_status_enum_string - without altering exiting data

Post by Starbuck »

To be clear, are you trying to move a ticket from Resolved to Deployed?
Based on the workflow settings, no status other than Resolved allows moving forward to Deployed ... which makes sense.
If you want Mantis to work differently, use or create a plugin. Visit the Plugins forums.
Ask developers to create a plugin that you need - and motivate them to help you!
shanthini.g
Posts: 44
Joined: 31 May 2017, 12:45

Re: Adding new value to g_status_enum_string - without altering exiting data

Post by shanthini.g »

Hi
Yes. The flow will be Resolved-> Deployed
Thanks
shanthini.g
Posts: 44
Joined: 31 May 2017, 12:45

Re: Adding new value to g_status_enum_string - without altering exiting data

Post by shanthini.g »

Hi,
Could you please suggest what may be the issue if we define 85 as "deployed"
Thanks
Post Reply