Page 1 of 1

Status name change

Posted: 08 Nov 2021, 08:34
by FKR_div_09
Hello Team!

Our MantisBT is in French. I've never dealt with PHP before, a total noob.

What I want is to modify the names of the different statuses.
I checked https://www.mantisbt.org/docs/master/en ... tatus.html, I assume it's the place to go and the inputs to add, but what I want is not to add any new statuses ; just change the names of the existing ones. Pure cosmetics change only.

Could you kindly explain me where to start on the above link when I just want to modify the names of the statuses, please?

MantisBT version: 2.21.1
PHP version: 7.3.31

Thanks for your support!
François

Re: Status name change

Posted: 09 Nov 2021, 09:23
by cas
Just follow the same steps. In case of adding, simply adjust the names :mrgreen:

Re: Status name change

Posted: 11 Nov 2021, 10:00
by FKR_div_09
Thanks, Cas.

So, I'm following the whole process described on the help page, create the 'testing' status 60 so that I can create in subfolder 'config' the file custom_strings_inc.php with the right status names in 's_status_enum_string'?
<?php
# Translation for Custom Status Code: testing
switch( $g_active_language ) {

case 'french':
$s_status_enum_string = '10:nouveau (DCH),20:attente infos (Client),30:accepté,40:confirmé,50:affecté (DCH),60:en test,80:résolu (Client),90:fermé';

$s_testing_bug_title = 'Mettre le bogue en test';
$s_testing_bug_button = 'A tester';

$s_email_notification_title_for_status_bug_testing = 'Le bogue suivant est prêt à être TESTE.';
break;

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

$s_testing_bug_title = 'Mark issue Ready for Testing';
$s_testing_bug_button = 'Ready for Testing';

$s_email_notification_title_for_status_bug_testing = 'The following issue is ready for TESTING.';
break;
}
Is this s_status_enum_string in this newly created file the only place where I should change the status names? Or this should be modified in other places too?

Thank you!

Re: Status name change

Posted: 11 Nov 2021, 10:45
by cas
If you only want to modify the names, you do the following:
create core\custom_strings_inc.php with this content

Code: Select all

<?php
$s_status_enum_string = '10:nouveau (DCH),20:attente infos (Client),30:accepté,40:confirmé,50:affecté (DCH),80:résolu (Client),90:fermé';
?>

Re: Status name change

Posted: 11 Nov 2021, 11:01
by FKR_div_09
Awesome, thank you. :D

Re: Status name change

Posted: 06 Dec 2021, 09:44
by FKR_div_09
cas wrote: 11 Nov 2021, 10:45 If you only want to modify the names, you do the following:
create core\custom_strings_inc.php with this content

Code: Select all

<?php
$s_status_enum_string = '10:nouveau (DCH),20:attente infos (Client),30:accepté,40:confirmé,50:affecté (DCH),80:résolu (Client),90:fermé';
?>
Hello again,

I tried the above, ended up with no change in the statuses but loss of the current statuses color.
Removing custom_strings_inc.php from core folder brought our website back to normal.

I assume I'm missing a few steps in the process, just adding this file won't make the status name change?
Should I do something directly on the web interface Admin-Config pages too?
I have seen warnings for users of translated versions (here: French), perhaps it makes the change a bit more complex?

Edit: Please have a look at the file enclosed, perhaps I should have this added in 'config' subfolder too, so it allows the change, as described in your Admin Guide 7.5.3 https://mantisbt.org/docs/master/en-US/ ... ize.status?

In any case, thanks a lot for the support.

Re: Status name change

Posted: 06 Dec 2021, 11:12
by cas
in the config_inc.php you should have:
$g_status_enum_string = '10:nouveau (DCH),20:attente infos (Client),30:accepté,40:confirmé,50:affecté (DCH),80:résolu (Client),90:fermé';
and in the custom_strings_inc.php:
$s_status_enum_string = '10:nouveau (DCH),20:attente infos (Client),30:accepté,40:confirmé,50:affecté (DCH),80:résolu (Client),90:fermé';

That should be enough :mrgreen: