Page 1 of 1
Mantis v2.1 custom status
Posted: 14 Feb 2017, 19:24
by peetervois
Hi have migrated to Mantis v2.1 from v1.3 and the custom status is kind of screwed up. I have added special steps into work flow and seems the custom_constraints_inc.php is no longer used or something else is going on instead. The statuses shown in configuration for example are shown as: ... assigned, @60@, @70@, resolved ... This is wrong and resolved is not actually resolved but must show testing instead.
It seems to me that I need to update the hardcoded configuration to match with the 2.1 version but I was unable to find "tips and tricks" for it. Please help.
My custom_constants_inc.php
Code: Select all
...
# Custom status code
define( 'WORKING', 60 );
define( 'TESTING', 80 );
define( 'RESOLVED', 70 );
...
My config_inc.php
Code: Select all
...
# --- status codes ---
# Revised enum string with new 'testing' status
$g_status_enum_string = '10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,60:working,70:resolved,80:testing,90:closed';
# Status color additions
$g_status_colors['working'] = '#fbe04d';
$g_status_colors['testing'] = '#ACE7AE';
...
Re: Mantis v2.1 custom status
Posted: 14 Feb 2017, 20:47
by atrol
peetervois wrote:Seems the custom_constraints_inc.php is no longer used
I am not aware that MantisBT ever used such a file. You should certainly ensure that custom_strings_inc.php is copied from your 1.3 installation to your 2.1 installation.
Re: Mantis v2.1 custom status
Posted: 15 Feb 2017, 07:48
by peetervois
Sorry, I fixed the filename in one place of my message but forgot in another, it is custom_constants_inc.php. The custom_strings_inc.php is in place too:
Code: Select all
# Translation for Custom Status Code: testing
switch( $g_active_language ) {
default: # english
$s_status_enum_string = '10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,60:working,70:resolved,80:testing,90:closed';
$s_working_bug_title = 'Start working with issue';
$s_working_bug_button = 'Starting to Work';
$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;
}
Re: Mantis v2.1 custom status
Posted: 15 Feb 2017, 11:14
by atrol
To be complete sure that you copied custom_strings_inc.php to the right folder, add the following line to the file
Code: Select all
die ("Hello from custom_strings_inc.php");
After that you should see just "Hello from custom_strings_inc.php" when opening any MantisBt page.
Re: Mantis v2.1 custom status
Posted: 16 Feb 2017, 12:54
by peetervois
Thanks for replying. The die() was not working. I have found from guthub, that the file must be under config/ directory now. I moved it there and now the states are OK again.
I have also found, that in the documentation the file name is with capital ..._Inc.php not ...inc.php. The inc must be written with lowercase according to the source code.
Re: Mantis v2.1 custom status
Posted: 16 Feb 2017, 13:11
by atrol
peetervois wrote:that the file must be under config/ directory now.
They are in config since 1.3. Maybe you used a beta version of 1.3 before.
peetervois wrote:I have also found, that in the documentation the file name is with capital ..._Inc.php not ...inc.php.
I searched, but did not find. Where did you find the capital _Inc?
Re: Mantis v2.1 custom status
Posted: 17 Feb 2017, 06:30
by peetervois
Is it readme.md at
https://github.com/mantisbt/mantisbt where the _Inc.php is with capital I ?
Re: Mantis v2.1 custom status
Posted: 17 Feb 2017, 07:29
by atrol
Re: Mantis v2.1 custom status
Posted: 17 Feb 2017, 08:07
by peetervois
Appears you are right. I started to copy and paste the text here to realize that my web browser does render the dot on top of the i so closely htat it appears as capital. Sorry.
Re: Mantis v2.1 custom status
Posted: 17 Feb 2017, 08:34
by atrol
Thanks for the feedback.
This looks really strange and is hard to read.