Moddifing the bottom status bar

Post about your customizations to share with others.

Moderators: Developer, Contributor

Post Reply
Reivaj
Posts: 27
Joined: 11 Nov 2014, 16:48

Moddifing the bottom status bar

Post by Reivaj »

I have success with the adding of a new status, but I can't change the bottom bar of the

Code: Select all

view_all_bug_page.php
, here you have an image:


Image

Thank you very much in advance!!!!
Reivaj
Posts: 27
Joined: 11 Nov 2014, 16:48

Re: Moddifing the bottom status bar

Post by Reivaj »

Just I need to add the new status in the bar

Thanks in advance!
Reivaj
Posts: 27
Joined: 11 Nov 2014, 16:48

Re: Moddifing the bottom status bar

Post by Reivaj »

Hi again, I have been investigating about hat issue, and I found the function where the bottom bar is draw, I think the status are stored in the

Code: Select all

status_enum_string
variable, I am trying to find where is set, but I can't.

Here you have the code:

Code: Select all

/**
 * Print the color legend for the status colors
 * @param string
 * @return null
 */
function html_status_legend() {
	echo '<br />';
	echo '<table class="width100" cellspacing="1">';
	echo '<tr>';

	$t_status_array = MantisEnum::getAssocArrayIndexedByValues( config_get( 'status_enum_string' ) );
	$t_status_names = MantisEnum::getAssocArrayIndexedByValues( lang_get( 'status_enum_string' ) );
	$enum_count = count( $t_status_array );

	# read through the list and eliminate unused ones for the selected project
	# assumes that all status are are in the enum array
	$t_workflow = config_get( 'status_enum_workflow' );
	if( !empty( $t_workflow ) ) {
		foreach( $t_status_array as $t_status => $t_name ) {
			if( !isset( $t_workflow[$t_status] ) ) {

				# drop elements that are not in the workflow
				unset( $t_status_array[$t_status] );
			}
		}
	}

	# draw the status bar
	$width = (int)( 100 / count( $t_status_array ) );
	foreach( $t_status_array as $t_status => $t_name ) {
		$t_val = isset( $t_status_names[$t_status] ) ? $t_status_names[$t_status] : $t_status_array[$t_status];
		$t_color = get_status_color( $t_status );

		echo "<td class=\"small-caption\" width=\"$width%\" bgcolor=\"$t_color\">$t_val</td>";
	}

	echo '</tr>';
	echo '</table>';
	if( ON == config_get( 'status_percentage_legend' ) ) {
		html_status_percentage_legend();
	}
}
Thanks in advance!!!
Reivaj
Posts: 27
Joined: 11 Nov 2014, 16:48

Re: Moddifing the bottom status bar

Post by Reivaj »

I have solved that problem, is as easy as include the new status in the configuration, as you can see at the picture, sorry it's in Spanish :roll: :roll:

The new status it's the "60:programada"

Image
Post Reply