Unable to Add a Custom Status in Mantis 2.5.1

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
saayid
Posts: 20
Joined: 04 Nov 2013, 12:04

Unable to Add a Custom Status in Mantis 2.5.1

Post by saayid »

Hello All,

I have performed a fresh install of Mantis 2.5.1 in my Laptop and i have been trying to add a simple Custom Status but seems like the customization added is not being recognized. I have been using Mantis 1.2.19 and added custom statuses/roles etc successfully without any issue. I am unable to figure out what is wrong if anything has changed in the way the customization code needs to be added. I would appreciate if anyone can help me point out where i have gone wrong.

OS: Windows 7
Mantis Version:2.5.1
XAMPP: 5.6.24(xampp-win32-5.6.24-1-VC11-installer)

Apache/2.4.23 (Win32) OpenSSL/1.0.2h PHP/5.6.24
Database client version: libmysql - mysqlnd 5.0.11-dev - 20120503 - $Id: 76b08b24596e12d4553bd41fc93cccd5bac2fe7a $
PHP extension: mysqli
PHP version: 5.6.24


1.Installed XAMPP and then installed Mantis 2.5.1

2. Reference Link: http://www.mantisbt.org/docs/master-1.2 ... tatus.html

In HTDOCS added

Code: Select all

a)  custom_constants_inc.php

<?php
	# Custom status code
	define( 'TESTING', 60 );
b) config_inc.php

Code: Select all

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

     # Status color additions
     $g_status_colors['testing'] = '#ACE7AE';
c) custom_strings_inc.php

Code: Select all

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

	case 'french':
		$s_status_enum_string = '10:nouveau,20:commentaire,30:accepté,40:confirmé,50:affecté,60:à tester,80:résolu,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;
}
3. Restarted XAMPP and Logged in Mantis and checked Manage Configuration< Workflow Transitions and i cannot see the New Status 'TESTING'


I have tried following the Mantis Bug Tracker Administration Guide for adding custom access level as well but the result was the same. Maybe i am wrong but the files i have added seemed not to be considered. How could i check the same?[/color]
Saayid Rahim
Systems Analyst
Quality Assurance Group
Qatar Fertiliser Company, Mesaieed

Mantis BT Ver 1.2.19, Windows 2012 R2
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Unable to Add a Custom Status in Mantis 2.5.1

Post by atrol »

saayid wrote:a fresh install of Mantis 2.5.1
1.Installed XAMPP and then installed Mantis 2.5.1

2. Reference Link: http://www.mantisbt.org/docs/master-1.2 ... tatus.html
So you should use the right manual for this version.
Use the one that comes with your installation or browse online https://www.mantisbt.org/docs/master/en ... l-desktop/

Your first problem is that you did not create the custom_* files in folder config of your installation.
Please use Search before posting and read the Manual
saayid
Posts: 20
Joined: 04 Nov 2013, 12:04

Re: Unable to Add a Custom Status in Mantis 2.5.1

Post by saayid »

Thank you Atrol for the prompt response,

Following your advise i have made the corrections and i have been able to view the custom status appear , however testing shows as @60@ but when i view the drop down values in Workflow Transition's i am able to see the custom status testing appear. I have searched the forum and found a post (viewtopic.php?f=3&t=21695) , still the observation persists. I am wondering where i could have gone wrong. In the Production install of version 1.2.19 i have been able to add custom statuses without this issue, however i am unable to solve the current problem.

I have included the code that has been placed in Config folder and also screen shot of the manage page. How can i resolve this issue as this is a show stopper for our migration to 2.5.1.
Snap 2017-07-11 at 22.44.08.png
Snap 2017-07-11 at 22.44.08.png (62.31 KiB) Viewed 10218 times
custom_constants_inc.php

Code: Select all

<?php
	# Custom status code
	define( 'TESTING', 60 );
	define( 'UAT', 62 );
custom_strings_inc.php

Code: Select all

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

	case 'french':
		$s_status_enum_string = '10:nouveau,20:commentaire,30:accepté,40:confirmé,50:affecté,60:à tester,62:à uat,80:résolu,90:fermé';

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

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

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

		$s_testing_bug_title = 'Mark issue Ready for Testing';
		$s_testing_bug_button = 'Ready for Testing';
		$s_uat_bug_title = 'Mark issue Ready for UAT';
		$s_uat_bug_button = 'Ready for UAT';
		

		$s_email_notification_title_for_status_bug_testing = 'The following issue is ready for TESTING.';
		$s_email_notification_title_for_status_bug_uat = 'The following issue is ready for uat.';
		break;
}
config_inc

Code: Select all

<?php
$g_hostname               = 'localhost';
$g_db_type                = 'mysqli';
$g_database_name          = 'mbt';
$g_db_username            = 'sqa';
$g_db_password            = 'pass';

$g_default_timezone       = 'Europe/Berlin';

$g_crypto_master_salt     = 'luIb60eDS6iockUSaKvLSaMgN2kq9wzldWe6zlzN4JM=';

# Revised enum string with new 'testing' status
$g_status_enum_string = '10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,60:testing,62:uat,80:resolved,90:closed';

# Status color additions
$g_status_colors['testing'] = '#ACE7AE';
$g_status_colors['uat'] = '#ACE7AE';
[/color]
Saayid Rahim
Systems Analyst
Quality Assurance Group
Qatar Fertiliser Company, Mesaieed

Mantis BT Ver 1.2.19, Windows 2012 R2
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Unable to Add a Custom Status in Mantis 2.5.1

Post by atrol »

I am not able to reproduce the issue.
I tried with English, German and French (see screen shot) language settings.
Attachments
Workflow.png
Workflow.png (77.52 KiB) Viewed 10038 times
Please use Search before posting and read the Manual
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Unable to Add a Custom Status in Mantis 2.5.1

Post by atrol »

Please use Search before posting and read the Manual
umoov
Posts: 1
Joined: 15 Jun 2018, 07:09

Re: Unable to Add a Custom Status in Mantis 2.5.1

Post by umoov »

I had similar issue. In custom_strings_inc.php I had to change:

default: # english
$g_status_enum_string = '10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,60:in progress,70:in review,80:resolved,85:ready for qa,90:closed';

to

default: # english
$s_status_enum_string = '10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,60:in progress,70:in review,80:resolved,85:ready for qa,90:closed';

And the the problem was solved

N.B.:$g_status_enum_string was wrong. The correct one is $s_status_enum_string
JeffStark
Posts: 1
Joined: 19 Jun 2019, 17:44

Re: Unable to Add a Custom Status in Mantis 2.5.1

Post by JeffStark »

Hello,

I've the same issue. When I select the added status, I get the errors: APPLICATION WARNING #300: String "CORRECTED_Code_Review_Assignment_PENDING_bug_title" not found APPLICATION WARNING #300: String "CORRECTED_Code_Review_Assignment_PENDING_bug_button" not found. I also tried to set the following in in custom_strings_inc.php:
$s_CORRECTED_Code_Review_Assignment_PENDING_bug_title and $s_CORRECTED_Code_Review_Assignment_PENDING_bug_button but nothing worked. What could be the solution?
Thanks.
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Unable to Add a Custom Status in Mantis 2.5.1

Post by atrol »

Double check that you followed exactly the steps described at https://www.mantisbt.org/docs/master/en ... ize.status
Please use Search before posting and read the Manual
Post Reply