Page 1 of 1

Custom Status Color not working

Posted: 29 Jul 2020, 10:57
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

Re: Custom Status Color not working

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

Code: Select all

70:,ready
is wrong. Remove the comma.

Re: Custom Status Color not working

Posted: 29 Jul 2020, 11:16
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

Re: Custom Status Color not working

Posted: 29 Jul 2020, 11:22
by atrol
Which MantisBT version do you use?

Re: Custom Status Color not working

Posted: 29 Jul 2020, 11:32
by tesan-man
atrol wrote: 29 Jul 2020, 11:22 Which MantisBT version do you use?
Version 2.24.0

Re: Custom Status Color not working

Posted: 29 Jul 2020, 14:43
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

Re: Custom Status Color not working

Posted: 29 Jul 2020, 16:00
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.

Re: Custom Status Color not working

Posted: 29 Jul 2020, 22:23
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

Re: Custom Status Color not working

Posted: 30 Jul 2020, 08:45
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

Re: Custom Status Color not working

Posted: 31 Jul 2020, 06:57
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.