Page 1 of 1

Some problems with the new status

Posted: 14 Apr 2022, 12:59
by Vadman
Hello,

After adding a new status, it is not possible to transfer it to status "closed".

1. Add new status to config_inc.php. In my case it's "test"

Code: Select all

$g_status_enum_string = '10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,80:resolved,90:closed,100:test';

$g_status_colors = array('new'		=> '#fcbdbd',
			'feedback'	=> '#e3b7eb',
			'acknowledged'	=> '#ffcd85',
			'confirmed'	=> '#fff494',
			'assigned'	=> '#c2dfff',
			'resolved'	=> '#d2f5b0',
			'closed'	=> '#c9ccc4',
			'test'		=> '#caedef');
2. Add translation strings for the new status in custom_strings_inc.php

Code: Select all

<?php
switch( $g_active_language ) {
    case 'russian':
	$s_status_enum_string = '10:новая,20:обратная связь,30:признана,40:подтверждена,50:назначена,80:решена,90:закрыта,100:тест';
	$s_test_bug_title = 'Задача в тестировании';
	$s_test_bug_button = 'Задача в тестировании';
	$s_email_notification_title_for_status_bug_test = 'Следующая задача в Тестировании:';
    break;

    default: # english
	$s_status_enum_string = '10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,80:resolved,90:closed,100:test'; 
	$s_test_bug_title = 'Test Issue';
	$s_test_bug_button = 'Test Issue';
	$s_email_notification_title_for_status_bug_test = 'The following issue has been TESTED';
    break;
}
3. Go to Manage -> Manage Configuration -> Workflow Transitions
4. Put necessary checkbox for the new status. In my case it's "feedback" and "closed"
workflow.jpg
workflow.jpg (254.03 KiB) Viewed 17525 times
5. Create new issue and change status on "test"

There is no problem when i change status from "test" to "feedback".
But when i change status from "test" to "closed" - i have an error
error.jpg
error.jpg (16.85 KiB) Viewed 17525 times

Access Level of my user = administrator

I tried do everything like in Admin_Guide:
- create custom_constants_inc.php with new status
- use $g_status_enum_workflow for all status
But the result is similar.

I have already asked this question in Bugtracker - 29858
But advice "introduce this "test" status somewhere between "assigned" and "resolved"" is not suitable for me

Re: Some problems with the new status

Posted: 17 Apr 2022, 11:23
by atrol
Vadman wrote: 14 Apr 2022, 12:59 But advice "introduce this "test" status somewhere between "assigned" and "resolved"" is not suitable for me
As told in the note of the issue, you don't have to do it, but it's the easiest way.
Without that, there are some more customization options you have to change, e.g. status where an issue becomes read only, treshold which access level is allowed to change read-only issues, ...
The first one you would have to change is $g_bug_closed_status_threshold as it's prevented at the moment to close an issue if the current status is >= $g_bug_closed_status_threshold

Re: Some problems with the new status

Posted: 18 Apr 2022, 12:48
by Vadman
Thanks for your help, Atrol!

I didn't find a description of $g_bug_closed_status_threshold
That's why i've added in config_inc.php:

Code: Select all

$g_bug_closed_status_threshold = 'resolved';
And everything started working! :)

But I don't understand what the effect of values for parameter $g_bug_closed_status_threshold. I tried different values (resolved, closed, test) and the result was not change.

Re: Some problems with the new status

Posted: 18 Apr 2022, 17:44
by atrol
You have to set the threshold to the integer value of the status, e. g.

Code: Select all

$g_bug_closed_status_threshold = 100;

Re: Some problems with the new status

Posted: 19 Apr 2022, 08:38
by Vadman
Thanks!

Re: Some problems with the new status

Posted: 26 Apr 2022, 14:07
by Vadman
Found a new problems :)

If i try to close the issue with "Close" button
close.jpg
close.jpg (98.65 KiB) Viewed 17318 times

The issue go to status "Test", not to "Close"