Custom Status Color not working

Post about your customizations to share with others.

Moderators: Developer, Contributor

Post Reply
tesan-man
Posts: 6
Joined: 29 Jul 2020, 10:44

Custom Status Color not working

Post by tesan-man »

Good morning

I have added some custom status fields to my installation, and they work fine except the colors are being ignored. I followed the procedure in the documentation,but all are just showing up as black. I have tried clearing the browser cache, etc but they are still black.

In config.inc I have put:

Code: Select all

$g_status_enum_string = '10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,60:testing,70:,ready,80:resolved,90:closed';

# Status color additions
$g_status_colors['testing'] = '#007399';
$g_status_colors['ready'] = '#CCFFEE';
$g_status_colors['resolved'] = '#00FF00';
Note: I tried to change an existing status (resolved) and that doesn't change either - it remains the standard pale green.

I created a custom_constants_inc.php with the following:

Code: Select all

	
	define( 'TESTING', 60 );	
	define( 'READY', 70 );
Anyone have any suggestions why the colors are not working

Thanks

Martin
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Custom Status Color not working

Post by atrol »

No time to have a deeper look, but at least

Code: Select all

70:,ready
is wrong. Remove the comma.
Please use Search before posting and read the Manual
tesan-man
Posts: 6
Joined: 29 Jul 2020, 10:44

Re: Custom Status Color not working

Post by tesan-man »

atrol wrote: 29 Jul 2020, 11:09 No time to have a deeper look, but at least

Code: Select all

70:,ready
is wrong. Remove the comma.
Many thanks - I'd checked that lots of times and still missed it.

Sadly however, correcting the error hasn't fixed the color problem.

Martin
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Custom Status Color not working

Post by atrol »

Which MantisBT version do you use?
Please use Search before posting and read the Manual
tesan-man
Posts: 6
Joined: 29 Jul 2020, 10:44

Re: Custom Status Color not working

Post by tesan-man »

atrol wrote: 29 Jul 2020, 11:22 Which MantisBT version do you use?
Version 2.24.0
tesan-man
Posts: 6
Joined: 29 Jul 2020, 10:44

Re: Custom Status Color not working

Post by tesan-man »

Puzzlingly I have tried changing the status colors in config_defaults_inc.php and that doesn't change them either, even after clearing the browser cache.

Martin
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Custom Status Color not working

Post by atrol »

Never ever change config_defaults_inc.php, all configuration is done in config/config_inc.php.

Are you sure you are changing the right file?
Maybe there a multiple folders with Mantis on your system.
Please use Search before posting and read the Manual
tesan-man
Posts: 6
Joined: 29 Jul 2020, 10:44

Re: Custom Status Color not working

Post by tesan-man »

atrol wrote: 29 Jul 2020, 16:00 Never ever change config_defaults_inc.php, all configuration is done in config/config_inc.php.
I only changed it as an experiment.
atrol wrote: 29 Jul 2020, 16:00 Are you sure you are changing the right file?
Maybe there a multiple folders with Mantis on your system.
The rest of the customisation in the file works, such as the $g_status_enum_string string, etc So it is hard to see why the colors wouldn't also work. And I certainly can't find any other folders.

Martin
tesan-man
Posts: 6
Joined: 29 Jul 2020, 10:44

Re: Custom Status Color not working

Post by tesan-man »

Morning

Well despite clearing the browser cache, and hard refresh the mantis page, the colors did not work. So this morning I tried logging in with a different browser, and they do work. So I remain puzzled, but at least I now know it is a browser issue of some sort.

Thanks for your input.

BTW I think it is a great product

Thanks

Martin
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Custom Status Color not working

Post by atrol »

tesan-man wrote: 30 Jul 2020, 08:45but at least I now know it is a browser issue of some sort.
Might be caused by some browser addon.
Not sure you tried clearing again the browser cache after you fixed the configuration issue.
Please use Search before posting and read the Manual
Post Reply