View Issue Details

IDProjectCategoryView StatusLast Update
0007833mantisbtcustomizationpublic2012-12-30 09:19
Reporteredwardgao Assigned Todregad  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionno change required 
Summary0007833: Customer Constants Do not work
Description

We customerized a "Return" status and reset those constants:
20:acknowledged,30:assigned,40:in_progress,50:to_test,60:returned,80:resolved,90:closed

In: custom_constant_inc.php, we defined:
define( 'ACKNOWLEDGED', 20 );
define( 'ASSIGNED', 30 );
define( 'IN_PROGRESS', 40 );
define( 'TO_TEST', 50 );
define( 'RETURNED', 60 );
define( 'RESOLVED', 80 );
define( 'CLOSED', 90 );

But every time we assign issues to users, the status will be changed to "To_Test" instead of "'ASSIGNED'".

It looks like mantis is still set the value to "50" instead of 30.

Steps To Reproduce

define "'ASSIGNED' as other number, and other status to be 50.

TagsNo tags attached.

Activities

exk72

exk72

2007-03-16 18:26

reporter   ~0014199

have you also altered $g_status_enum_string

vboctor

vboctor

2007-03-17 02:49

manager   ~0014205

What is $g_bug_assigned_status set to? It is probably set to ASSIGNED, which at this stage is set to 50.

The idea is to define new constants in custom_constant_inc.php. I would introduce MYASSIGNED status and use it instead of ASSIGNED.

edwardgao

edwardgao

2007-03-19 08:03

reporter   ~0014211

Thank you very much for your help:

exk72,
I defined :
$s_status_enum_string = '10:new,20:acknowledged,30:assigned,40:in progress,50:to test,60:returned,80:resolved,90:closed';

vboctor,
And I did not change the $g_bug_assigned_status in the config_inc. It is still:

Status to assign to the bug when assigned.

$g_bug_assigned_status = ASSIGNED;

But I can not understand that I have defined "ASSIGNED" as 30 in the custome_constant_inc.php. Why $g_bu_assigned_status is set to 50 instead of 30 at this stage?

edwardgao

edwardgao

2007-03-19 08:17

reporter   ~0014212

Currently, I have to set it to be 30 instead of "ASSIGNED" in the config_inc.php. I know it is kind of stupid. But I really want to use "ASSIGNED", Do you think there will be any potential trouble?
$g_bug_assigned_status = 30;

By the way, it may be helpful to post my customization here. Do you think there will be big problems with my customization? Thanks a lot.

config_inc.php:

20:acknowledged,30:assigned,40:in_progress,50:to_test,60:returned,80:resolved,90:closed

$g_status_enum_workflow[NEW_] = '20:acknowledged,30:assigned,40:in_progress,50:to_test,80:resolved';
$g_status_enum_workflow[ACKNOWLEDGED] = '30:assigned,40:in_progress,50:to_test';
$g_status_enum_workflow[ASSIGNED] = '40:in_progress,50:to_test';
$g_status_enum_workflow[IN_PROGRESS] =  '30:assigned,50:to_test';
$g_status_enum_workflow[TO_TEST] = '60:returned,80:resolved';
$g_status_enum_workflow[RETURNED] = '40:in_progress,50:to_test';
$g_status_enum_workflow[RESOLVED] = '60:returned,90:closed';
$g_status_enum_workflow[CLOSED] = '60:returned';

$g_status_colors['new'] = '#ffd850'; # orange
$g_status_colors['acknowledged'] = '#ffffb0'; # yellow
$g_status_colors['assigned'] = '#c8c8ff'; # blue
$g_status_colors['in progress'] = '#c8c8ff'; # blue
$g_status_colors['to test'] = '#ffa0a0'; # red
$g_status_colors['returned'] = '#7a7aff'; # dark blue

$g_access_levels_enum_string = '10:viewer,25:reporter,40:updater,50:vendor,55:developer,70:manager,90:administrator';

$g_access_levels_enum_string = '10:viewer,25:user,40:model office,50:vendor,55:developer,70:manager,90:administrator';

$g_status_enum_string   = '10:new,20:acknowledged,30:assigned,40:in progress,50:to test,60:returned,80:resolved,90:closed';
$g_bug_assigned_status = 30;

custom_strings_inc.php:

$s_access_levels_enum_string = '10:viewer,25:reporter,40:updater,50:vendor,55:developer,70:manager,90:administrator';

$s_access_levels_enum_string = '10:viewer,25:user,40:model office,50:vendor,55:developer,70:manager,90:administrator';

$s_status_enum_string   = '10:new,20:acknowledged,30:assigned,40:in progress,50:to test,60:returned,80:resolved,90:closed';

$s_in_progress_bug_title = 'Set Issue As In Progress';
$s_in_progress_bug_button = 'Set As In Progress';
$s_to_test_bug_title = 'Set Issue To Test';
$s_to_test_bug_button = 'Set To Test';
$s_returned_bug_title = 'Return Issue';
$s_returned_bug_button = 'Return Issue';

custom_constant_inc.php:

# access levels
define( 'USER',         25 );
define( 'MODEL_OFFICE',         40 );
define( 'VENDOR',           50 );

# status
define( 'ACKNOWLEDGED',         20 );
define( 'ASSIGNED',     30 );
define( 'IN_PROGRESS',          40 );
define( 'TO_TEST',      50 );
define( 'RETURNED',     60 );
define( 'RESOLVED',         80 );
define( 'CLOSED',           90 );
dregad

dregad

2012-12-19 19:07

developer   ~0034582

Over 5 years later ;-)

The problem is due to your trying to redefine an existing constant ASSIGNED (=50 in constant_inc.php).