Custom Status Applies to all projects view but not to some o

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
5-Star-Lotus-Stly

Custom Status Applies to all projects view but not to some o

Post by 5-Star-Lotus-Stly »

I am unable to get all of the projects to acknowledge my custom status.
Mantis 1.2.15

The all projects view is correct, but it seems like there are project specific settings overriding this, and I can't find the config files where this is happening.
From Config_inc.php

Code: Select all

 	$g_status_enum_string = '10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,60:awaiting sign off,70:release runway,71:released,80:resolved,90:closed';
	$g_status_colors['assigned'] = '#FB8FF0';
	$g_status_colors['feedback'] = '#33CC66';
	$g_status_colors['release runway'] = '#99FFFF';
	$g_status_colors['released'] = '#669999';
	$g_status_colors['awaiting sign off'] = '#990000';
  
From Config_defaults_inc.php

Code: Select all

$g_status_enum_string = '10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,60:awaiting sign off,70:release runway,71:released,80:resolved,90:closed';
$g_status_colors		= array( 
	
									 
									'new'			=> '#FFFFFF', # red,
									'assigned'		=> '#CDEB8B', # blue
									'feedback'		=> '#6bba70', # purple
									'coding/testing' 	=> '#bedb39',									
									'confirmed'		=> '#7388oa', # yellow
									'resolved'		=> '#cceedd', # buish-green
									'release runway' 	=> '#C3D9FF',
									'released'		=> '#87A0a4',
									'internal signoff' 	=> '#B02B2C',
									'demoed' 		=> '#4096ee', 	# light gray
									'closed'		=> '#3f4c6b',);
From Custom_strings_inc

Code: Select all

default: # english
		$s_status_enum_string = '10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,60:awaiting sign off,70:release runway,71:released,80:resolved,90:closed';

		$s_Release_Runway_bug_title = 'Mark issue Release Runway';
		$s_Release_Runway_bug_button = 'Ready for Release Runway';
		
		$s_awaiting_sign_off_title = 'Mark issue awaiting sign off';
		$s_Release_Runway_bug_button = 'Ready for awaiting sign off';
		
		$s_Released_bug_title = 'Mark issue Released';
		$s_Released_bug_button = 'Release Her';

		$s_email_notification_title_for_status_bug_testing = 'The following issue is ready for TESTING.';
		break;
From custom_constants_inc

Code: Select all

define( 'AWAITING SIGN OFF', 60 );
	define( 'RELEASE RUNWAY', 70 );
	define( 'RELEASED', 71 );
atrol
Site Admin
Posts: 8531
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Custom Status Applies to all projects view but not to so

Post by atrol »

First of all: You should never change config_defaults_inc.php.
All configuration is done in config_inc.php and in database

Check page Manage > Manage Configuration for any settings that might override your settings.
The all projects view is correct, but it seems like there are project specific settings overriding this
Where do you get which problem?
Please use Search before posting and read the Manual
5-Star-Lotus-Stly

Re: Custom Status Applies to all projects view but not to so

Post by 5-Star-Lotus-Stly »

I saved a clean copy of the Config_defaults_inc, but I have been working with it trying to get the settings to take. Basically, in the top right cornet of the screen you have the view drop down with all projects at the top of the list and then individual projects underneath. When I have all projects selected, the view is correct. When I choose "project 1" or "project 2" the custom statuses and the custom colors are ignored. I can easily restore the original config_defaults_inc if you'd like. I actually tried adding the custom status as string value for each project in Manage > Manage Configuration, and there was no change.

All Users | All Projects | status_enum_string | string | '10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,60:awaiting sign off,70:release runway,71:released,80:resolved,90:closed'

I can start over with a clean install if you want.

EDiT: Actually, I think I misunderstood your reply. It's actually the legend bar I'm trying to change. It will show the custom statues in All projects view, but in the individual projects, i.e. project 1, project 2, etc, it shows different status bar legends. That's what I'm trying to make homogenous.

EDIT2: I was able to fix this by clearing the workflow settings in Manage -> Manage Configuration-> workflow threshold ->Delete Project Specific Settings for all the projects, and the legend will be the same. I looked at the function html_status_legend and it looks like it checks to see if a status is included in the workflow and generates an array of only the used statuses, then uses that array to print the legend. Still, it seems like if someone didn't know PHP, they would have a lot of trouble figuring that out. Could we update the documentation to make it more apparent?
atrol
Site Admin
Posts: 8531
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Custom Status Applies to all projects view but not to so

Post by atrol »

5-Star-Lotus-Stly wrote:Could we update the documentation to make it more apparent?
Submitting a patch is always a good idea, as it increases the chances of improvement eventually making it into MantisBT core. All contributions are welcome and greatly appreciated.

Patch submissions can be made in several ways. In the order of preference:

1. Send us a Pull Request on our Github repository [1]
2. Attach a GIT patch to an issue that you filed at [2]
3. Attach a Unified Diff, clearly specifying the patch's base release

Kindly avoid to upload entire modified files.

[1] https://github.com/mantisbt/mantisbt
[2] http://www.mantisbt.org/bugs
Please use Search before posting and read the Manual
5-Star-Lotus-Stly

Re: Custom Status Applies to all projects view but not to so

Post by 5-Star-Lotus-Stly »

On further review, making the changes in the configuration field in my above post doesn't seem to always update the database. Can anyone else verify that?
gpr

Re: Custom Status Applies to all projects view but not to so

Post by gpr »

Hi,

I encontered a problem like you.
I have to add a new status.
For me it's OK, bu in dropdown menus in GUI, it's appears like this : @71@
You said (and i saw it in many posts) that you edit :

"Custom_strings_inc.php" and "custom_constants_inc.php"

In my mantis directory, version 1.2.15, theses 2 files don't exist...
Could you say me more about it ?

I did a search with find /var/www -name custom_str* without result...

I search to define the definition of my new status with ID=71
atrol
Site Admin
Posts: 8531
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Custom Status Applies to all projects view but not to so

Post by atrol »

5-Star-Lotus-Stly wrote:On further review, making the changes in the configuration field in my above post doesn't seem to always update the database. Can anyone else verify that?
I assume you mean configuration file (not field)?
I assume also that you expect that changes in file config_inc.php are stored in database?
This is not how configuration works in MantisBT.

Most of the options can be set in config_inc.php or in database (using the various manage pages or the generic manage > manage configuration page)
Values stored in database override values in config_inc.php
I recommend database configuration if you want to set options for a special project but not all projects, or a special user, but not all users.

This is how it works:

1) look for specified configuration option in database for current user and current project.
2) if not found, look for specified configuration option in database for current user and all projects
3) if not found, look for specified configuration option in database for all users and current project
4) if not found, look for specified configuration option in database for all users and all projects
5) if not found, look for specified configuration option in config_inc.php (where you might have some code to distinguish between projects and/or users)
6) if not found, look for specified configuration option in config_defaults_inc.php
Please use Search before posting and read the Manual
atrol
Site Admin
Posts: 8531
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Custom Status Applies to all projects view but not to so

Post by atrol »

gpr wrote: I encontered a problem like you.
For me it's OK, bu in dropdown menus in GUI, it's appears like this : @71@
"Custom_strings_inc.php" and "custom_constants_inc.php"
In my mantis directory, version 1.2.15, theses 2 files don't exist...
This is a complete other problem.
You have to create the files, they don't exist.
Please read documentation http://www.mantisbt.org/docs/master-1.2 ... IZE.STATUS and open another new topic if you still encounter issues after exactly following the given instructions.
Please use Search before posting and read the Manual
Post Reply