Trouble with custom status

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
seb57
Posts: 1
Joined: 31 Mar 2015, 11:21

Trouble with custom status

Post by seb57 »

I tried to add custom status by following the instructions of the mantis manuel "Customizing Status Values" :
https://www.mantisbt.org/docs/master-1. ... IZE.STATUS

... but absolutely nothing changes in mantis !

The new status "95:canceled", that i want to add, becomes visible as @95@ (insteal of "canceled") only if i set this option in the Manage Configuration page :
status_enum_string = '10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,90:closed,95:canceled'

(type : string / projet : the one concerned / user : all users)

It looks like the 3 "custom" files (that i created in the main mantis directory) are totally ignored.
What is your feeling about this ?
Can i add / set new status only through the Manage Configuration page !?

my mantis version is 1.2.19 (database 183)

Thanks for your help !

Seb J.


Here are the detailed modifications that i made (for each step of the manual) :

* Step 1 : Define the new status to in the file custom_constants_inc.php (in the main MantisBT directory)

Code: Select all

<?php
# Custom status code
define( 'CANCELED', 95 );
?>
* Step 2 : Define the new status in the enumeration, as well as the corresponding color code in the file config_inc.php (in the main mantisbt directory)

Code: Select all

<?php
# Revised enum string with new status
 $g_status_enum_string = '10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,80:resolved,90:closed,95:canceled';

 # Status color additions
 $g_status_colors['canceled'] = '#ACE7AE';
?>
* Step 3 : Define the required translation strings for the new status, for each language used in the installation in the file custom_strings_inc.php (in the main mantisbt directory)

Code: Select all

<?php
# Translation for Custom Status Code: cancel
switch( $g_active_language ) {

       case 'french':  
	$s_status_enum_string = '10:nouveau,20:commentaire,30:accepté,40:confirmé,50:affecté,80:réalisé,95:annulé';
		
		$s_canceled_bug_title = 'Annuler le bogue';
		$s_canceled_bug_button = 'Annuler le bogue';
		$s_email_notification_title_for_status_bug_canceled = 'Le bogue suivant a été annulé';
		
		break;

	default: # english
		$s_status_enum_string = '10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,80:resolved,90:closed,95:canceled';

		$s_canceled_bug_title = 'Mark bug canceled';
		$s_canceled_bug_button = 'Cancel bug';
		$s_email_notification_title_for_status_bug_testing = 'The following issue has been canceled';

		break;
}
?>
* Step 4 : Add the new status to the workflow in the Manage Workflow Transitions page
=> Done

*Step 4 : Check and update existing workflow configurations
=> Done, no 'status_enum_workflow' option is set in the Manage Configuration Report page (for any projet ou user)
atrol
Site Admin
Posts: 8375
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Trouble with custom status

Post by atrol »

seb57 wrote: It looks like the 3 "custom" files (that i created in the main mantis directory) are totally ignored.
I am quite sure you are working in the wrong directory.
Add the following line to one of the files and visit a page

Code: Select all

die ("Hello here I am");
Do you see the message?
Please use Search before posting and read the Manual
Post Reply