From b7644019f3a6321dba99afe9f9e6b59c44e61ee6 Mon Sep 17 00:00:00 2001
From: Damien Regad <damien.regad@merckgroup.com>
Date: Sun, 1 Jan 2012 02:19:55 +0100
Subject: [PATCH] Fix cross-project display of custom resolution codes

When a custom resolution is defined in a different project, its code
was displayed as @X@ instead of the corresponding string in the
resolution column, as well as when hovering over the status in the view
issues page.

Fixes #13707
---
 core/columns_api.php |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/core/columns_api.php b/core/columns_api.php
index 96e94d6..dbba861 100644
--- a/core/columns_api.php
+++ b/core/columns_api.php
@@ -1115,7 +1115,9 @@ function print_column_reproducibility( $p_bug, $p_columns_target = COLUMNS_TARGE
  * @access public
  */
 function print_column_resolution( $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) {
-	echo '<td class="center">', get_enum_element( 'resolution', $p_bug->resolution ), '</td>';
+	echo '<td class="center">',
+		get_enum_element( 'resolution', $p_bug->resolution, auth_get_current_user_id(), $p_bug->project_id ),
+		'</td>';
 }
 
 /**
@@ -1127,7 +1129,10 @@ function print_column_resolution( $p_bug, $p_columns_target = COLUMNS_TARGET_VIE
  */
 function print_column_status( $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) {
 	echo '<td class="center">';
-	printf( '<span class="issue-status" title="%s">%s</span>', get_enum_element( 'resolution', $p_bug->resolution ), get_enum_element( 'status', $p_bug->status, auth_get_current_user_id(), $p_bug->project_id ) );
+	printf( '<span class="issue-status" title="%s">%s</span>',
+		get_enum_element( 'resolution', $p_bug->resolution, auth_get_current_user_id(), $p_bug->project_id ),
+		get_enum_element( 'status', $p_bug->status, auth_get_current_user_id(), $p_bug->project_id )
+	);
 
 	# print username instead of status
 	if(( ON == config_get( 'show_assigned_names' ) ) && ( $p_bug->handler_id > 0 ) && ( access_has_project_level( config_get( 'view_handler_threshold' ), $p_bug->project_id ) ) ) {
-- 
1.7.5.4

