upgrade from 1.3.5 to 2.7.0 and status codes weird

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
mushu
Posts: 349
Joined: 04 Jan 2017, 17:41

upgrade from 1.3.5 to 2.7.0 and status codes weird

Post by mushu »

Windows Server 2012 R2
PHP 5.6
Mantis 2.7.0

Created new directory for new version, installed archive, copied over config files including custom_ files in config directory and after minor config tweaks everything seems to be working great, except some of the tickets show @##@ where "##" is the value of one of the four custom statuses we added. I Read The Friendly Manual and made sure I followed every step but it still will not consistently show those statuses in the dropdowns. What am I missing?

Code: Select all

J:\MantisBT270\config>type custom_constants_inc.php
<?php
        # Custom status codes
        define( 'DEFERRED', 15 );
        define( 'DESIGN', 60 );
        define( 'DEVELOPMENT', 70 );
        define( 'TESTING', 85 );
#       define( 'PRODUCTION', 110 );
and

Code: Select all

J:\MantisBT270\config>type custom_strings_inc.php
<?php
        $s_status_enum_string = '10:new,15:deferred,20:feedback,30:acknowledged,40:confirmed,50:assigned,60:design,70:development,80:resolved,85:testing,90:closed';
        $s_design_bug_title = 'Currently in Design';
        $s_design_bug_button = 'Put in Design';
        $s_email_notification_title_for_status_bug_design = 'The following issue is in DESIGN.';
        $s_deferred_bug_title = 'Currently Deferred';
        $s_deferred_bug_button = 'Put in Deferred';
        $s_email_notification_title_for_status_bug_deferred = 'The following issue is DEFERRED.';
        $s_development_bug_title = 'Currently in Development';
        $s_development_bug_button = 'Put in Development';
        $s_email_notification_title_for_status_bug_development = 'The followingissue is in DEVELOPMENT.';
        $s_testing_bug_title = 'Currently in Testing';
        $s_testing_bug_button = 'Put in Testing';
        $s_email_notification_title_for_status_bug_testing = 'The following issue is in TESTING.';
#       $s_production_bug_title = 'Currently in Production';
#       $s_production_bug_button = 'Put in Production';
#       $s_email_notification_title_for_status_bug_production = 'The following issue is in PRODUCTION.';
Thoughts?
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: upgrade from 1.3.5 to 2.7.0 and status codes weird

Post by atrol »

To be sure that you have the right file in the right folder, add the follow line to file custom_strings_inc.php

Code: Select all

die ("Hello");
Do you get now nothing more than "Hello" when accessing a page?
Please use Search before posting and read the Manual
mushu
Posts: 349
Joined: 04 Jan 2017, 17:41

Re: upgrade from 1.3.5 to 2.7.0 and status codes weird

Post by mushu »

Yes, that just prints Hello on a blank screen.

The strange (to me) thing is that only some of the tickets have those @nn@ in the status drop downs, while others do not. Perhaps that is a hint at the problem?

EDIT: I just noticed that the status code box colors are black for those weird statuses in the "view issues" screen. Perhaps the fact that I left out the color codes in my config file is a factor? Are those required?
mushu
Posts: 349
Joined: 04 Jan 2017, 17:41

SOLVED: upgrade from 1.3.5 to 2.7.0 and status codes weird

Post by mushu »

THAT WAS IT. If you define custom status codes you MUST also add corresponding color codes to your config file, otherwise the new status codes won't work and will just show @nn@ where "nn" is the value of the status. Might be a good idea to put that in the docs as a required action, would have saved me a day or so.
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: upgrade from 1.3.5 to 2.7.0 and status codes weird

Post by atrol »

Thanks for telling the solution.

But I don't see at the moment how this could explain
mushu wrote:The strange (to me) thing is that only some of the tickets have those @nn@ in the status drop downs, while others do not.
Please use Search before posting and read the Manual
mushu
Posts: 349
Joined: 04 Jan 2017, 17:41

Re: upgrade from 1.3.5 to 2.7.0 and status codes weird

Post by mushu »

Because only those tickets that were in one of the four status codes that had no colors assigned would show the @nn@ in their dropdowns. Oddly, all other tickets simply ignored those four statuses and their dropdowns looked fine (except were obviously missing all four "uncolored" statuses.) Yep, weird. But everything works great now.
Post Reply