Can't change the statuses name

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
mehdib92
Posts: 3
Joined: 22 Apr 2018, 22:35

Can't change the statuses name

Post by mehdib92 »

Hi,

I want to change all the statuses name in my mantis 2.13.

I have follow those explanations http://manual.mantisbt.org/docs/master/ ... tatus.html but it doesn't work.

When I go to the Manage Workflow Transitions page, all the statuses have the default name.

Here is the content of my config/custom_stings_inc.php file :

Code: Select all

<?
switch( $g_active_language ) 
{
	case 'french':
		$s_status_enum_string = '10:Nouveau,20:Sur test,30:Corrections sur test,40:Ok pour Prod,50:En Prod,90:Fermé';


		$s_new_bug_title = 'Nouveau';
		$s_new_bug_button = 'Nouveau';
		$s_email_notification_title_for_status_bug_new = 'Le bogue suivant est NOUVEAU.';
		
		$s_on_test_bug_title = 'Sur TEST';
		$s_on_test_bug_button = 'Sur TEST';
		$s_email_notification_title_for_status_bug_on_test = 'Le bogue suivant est prêt à être testé sur le serveur de TEST.';
		
		$s_need_test_corrections_bug_title = 'Le bogue a besoin de corrections sur TEST';
		$s_need_test_corrections_bug_button = 'Corrections sur TEST';
		$s_email_notification_title_for_status_bug_need_test_corrections = 'Le bogue suivant a besoin de corrections sur TEST.';
		
		$s_ok_for_prod_bug_title = 'Mettre en PROD';
		$s_ok_for_prod_bug_button = 'Mettre en PROD';
		$s_email_notification_title_for_status_bug_ok_for_prod = 'Le bogue suivant est prêt à être mit en PROD.';
		
		$s_on_prod_bug_title = 'Sur la PROD';
		$s_on_prod_bug_button = 'Sur la PROD';
		$s_email_notification_title_for_status_bug_on_prod = 'La correction est en PROD.';
		
		$s_closed_bug_title = 'Le bogue est fermé';
		$s_closed_bug_button = 'Fermé';
		$s_email_notification_title_for_status_bug_closed = 'Le bogue suivant est FERME.';
		break;

	default: # english
		$s_status_enum_string = '10:Nouveau,20:Sur test,30:Corrections sur test,40:Ok pour Prod,50:En Prod,90:Fermé';

		$s_new_bug_title = 'Nouveau';
		$s_new_bug_button = 'Nouveau';
		$s_email_notification_title_for_status_bug_new = 'Le bogue suivant est NOUVEAU.';
		
		$s_on_test_bug_title = 'Sur TEST';
		$s_on_test_bug_button = 'Sur TEST';
		$s_email_notification_title_for_status_bug_on_test = 'Le bogue suivant est prêt à être testé sur le serveur de TEST.';
		
		$s_need_test_corrections_bug_title = 'Le bogue a besoin de corrections sur TEST';
		$s_need_test_corrections_bug_button = 'Corrections sur TEST';
		$s_email_notification_title_for_status_bug_need_test_corrections = 'Le bogue suivant a besoin de corrections sur TEST.';
		
		$s_ok_for_prod_bug_title = 'Mettre en PROD';
		$s_ok_for_prod_bug_button = 'Mettre en PROD';
		$s_email_notification_title_for_status_bug_ok_for_prod = 'Le bogue suivant est prêt à être mit en PROD.';
		
		$s_on_prod_bug_title = 'Sur la PROD';
		$s_on_prod_bug_button = 'Sur la PROD';
		$s_email_notification_title_for_status_bug_on_prod = 'La correction est en PROD.';
		
		$s_closed_bug_title = 'Le bogue est fermé';
		$s_closed_bug_button = 'Fermé';
		$s_email_notification_title_for_status_bug_closed = 'Le bogue suivant est FERME.';
		break;
}
It seems that my custom_stings_inc.php is not loaded because I tried to add a die at the beginning of the file and it doesn't work. Nothing in my log file too...

Does anybody know there the problem can comes from ?

Thanks
atrol
Site Admin
Posts: 8376
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Can't change the statuses name

Post by atrol »

mehdib92 wrote: 22 Apr 2018, 22:52content of my config/custom_stings_inc.php file
Should be custom_strings_inc.php
Please use Search before posting and read the Manual
mehdib92
Posts: 3
Joined: 22 Apr 2018, 22:35

Re: Can't change the statuses name

Post by mehdib92 »

Sorry, it's a typing error. My file is named custom_strings_inc.php.

I have made a little step forward.

On the view page, if I want to change the status, the list contains the right statuses but not translated. And on the Workflow configuration page, I have @25@, @35@, etc...

Here is my config_inc.php

Code: Select all

$g_status_enum_string = '10:new,25:on_test,35:need_test_corrections,45:ok_for_prod,55:on_prod,90:closed';

#Définition des couleurs des nouveaux statuts
$g_status_colors['on_test'] = '#F3E2A9';
$g_status_colors['need_test_corrections'] = '#E0701A';
$g_status_colors['ok_for_prod'] = '#6B67F2';
$g_status_colors['on_prod'] = '#6B67FF';

#Definition des changements de statuts possibles pour nos nouveaux statuts
$g_status_enum_workflow[ON_TEST] ='15:new,35:need_test_corrections,45:ok_for_prod,55:on_prod,95:closed';
$g_status_enum_workflow[NEED_TEST_CORRECTIONS] ='10:new,25:on_test,45:ok_for_prod,55:on_prod,95:closed';
$g_status_enum_workflow[OK_FOR_PROD] ='10:new,25:on_test,35:need_test_corrections,55:on_prod,95:closed';
$g_status_enum_workflow[ON_PROD] ='10:new,55:on_prod,95:closed';

#Paramètres pour la page my_views.php
$g_bug_on_test_status_threshold = ON_TEST;
$g_bug_need_test_corrections_status_threshold = NEED_TEST_CORRECTIONS;
$g_bug_ok_for_prod_status_threshold = OK_FOR_PROD;
$g_bug_on_prod_status_threshold = ON_PROD;
My custom_constants_inc.php page :

Code: Select all

<?php
define( 'ON_TEST', 25 );
define( 'NEED_TEST_CORRECTIONS', 35 );
define( 'OK_FOR_PROD', 45 );
define( 'ON_PROD', 55 );
My custom_strings_inc.php

Code: Select all

<?
switch( $g_active_language ) 
{
	case 'french':
		$s_status_enum_string = '10:Nouveau,25:Sur test,35:Corrections sur test,45:Ok pour Prod,55:En Prod,90:Fermé';
		
		$s_on_test_bug_title = 'Sur TEST';
		$s_on_test_bug_button = 'Sur TEST';
		$s_email_notification_title_for_status_bug_on_test = 'Le bogue suivant est prêt à être testé sur le serveur de TEST.';
		
		$s_need_test_corrections_bug_title = 'Le bogue a besoin de corrections sur TEST';
		$s_need_test_corrections_bug_button = 'Corrections sur TEST';
		$s_email_notification_title_for_status_bug_need_test_corrections = 'Le bogue suivant a besoin de corrections sur TEST.';
		
		$s_ok_for_prod_bug_title = 'Mettre en PROD';
		$s_ok_for_prod_bug_button = 'Mettre en PROD';
		$s_email_notification_title_for_status_bug_ok_for_prod = 'Le bogue suivant est prêt à être mit en PROD.';
		
		$s_on_prod_bug_title = 'Sur la PROD';
		$s_on_prod_bug_button = 'Sur la PROD';
		$s_email_notification_title_for_status_bug_on_prod = 'La correction est en PROD.';
		break;

	default: # english
		$s_status_enum_string = '10:Nouveau,25:Sur test,35:Corrections sur test,45:Ok pour Prod,55:En Prod,90:Fermé';
		
		$s_on_test_bug_title = 'Sur TEST';
		$s_on_test_bug_button = 'Sur TEST';
		$s_email_notification_title_for_status_bug_on_test = 'Le bogue suivant est prêt à être testé sur le serveur de TEST.';
		
		$s_need_test_corrections_bug_title = 'Le bogue a besoin de corrections sur TEST';
		$s_need_test_corrections_bug_button = 'Corrections sur TEST';
		$s_email_notification_title_for_status_bug_need_test_corrections = 'Le bogue suivant a besoin de corrections sur TEST.';
		
		$s_ok_for_prod_bug_title = 'Mettre en PROD';
		$s_ok_for_prod_bug_button = 'Mettre en PROD';
		$s_email_notification_title_for_status_bug_ok_for_prod = 'Le bogue suivant est prêt à être mit en PROD.';
		
		$s_on_prod_bug_title = 'Sur la PROD';
		$s_on_prod_bug_button = 'Sur la PROD';
		$s_email_notification_title_for_status_bug_on_prod = 'La correction est en PROD.';
		break;
}
atrol
Site Admin
Posts: 8376
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Can't change the statuses name

Post by atrol »

mehdib92 wrote: 22 Apr 2018, 22:52I tried to add a die at the beginning of the file and it doesn't work.
This must work.
If not, there is a typo in your filename or your are working in the wrong directory or your webserver does not have permissions to read the file.
Please use Search before posting and read the Manual
mehdib92
Posts: 3
Joined: 22 Apr 2018, 22:35

Re: Can't change the statuses name

Post by mehdib92 »

I have my answer. My file custom_strings_inc.php started with <? instead of <?php
atrol
Site Admin
Posts: 8376
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Can't change the statuses name

Post by atrol »

Thanks for telling the solution.

Learning every day what users can do wrong :wink:
Please use Search before posting and read the Manual
Post Reply