diff --git a/core/columns_api.php b/core/columns_api.php
index 95aa081..96e94d6 100644
--- a/core/columns_api.php
+++ b/core/columns_api.php
@@ -1127,7 +1127,7 @@ 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 '
';
- printf( '%s', get_enum_element( 'resolution', $p_bug->resolution ), get_enum_element( 'status', $p_bug->status ) );
+ printf( '%s', get_enum_element( 'resolution', $p_bug->resolution ), 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 ) ) ) {
diff --git a/core/custom_function_api.php b/core/custom_function_api.php
index a60068a..20b3189 100644
--- a/core/custom_function_api.php
+++ b/core/custom_function_api.php
@@ -63,7 +63,7 @@ function custom_function_default_changelog_print_issue( $p_issue_id, $p_issue_le
}
if( !isset( $t_status[$t_bug->status] ) ) {
- $t_status[$t_bug->status] = get_enum_element( 'status', $t_bug->status );
+ $t_status[$t_bug->status] = get_enum_element( 'status', $t_bug->status, auth_get_current_user_id(), $t_bug->project_id );
}
echo ' - ', $t_status[$t_bug->status], '. ';
}
@@ -102,7 +102,7 @@ function custom_function_default_roadmap_print_issue( $p_issue_id, $p_issue_leve
}
if( !isset( $t_status[$t_bug->status] ) ) {
- $t_status[$t_bug->status] = get_enum_element( 'status', $t_bug->status );
+ $t_status[$t_bug->status] = get_enum_element( 'status', $t_bug->status, auth_get_current_user_id(), $t_bug->project_id );
}
echo ' - ', $t_status[$t_bug->status], $t_strike_end, '. ';
}
diff --git a/core/helper_api.php b/core/helper_api.php
index 1354a90..ab0d902 100644
--- a/core/helper_api.php
+++ b/core/helper_api.php
@@ -85,13 +85,16 @@ function get_status_color( $p_status ) {
}
/**
- * Given a enum string and num, return the appropriate string
+ * Given a enum string and num, return the appropriate string for the
+ * specified user/project
* @param string $p_enum_name
* @param int $p_val
+ * @param int|null $p_user user id, defaults to null (all users)
+ * @param int|null $p_project project id, defaults to null (all projects)
* @return string
*/
-function get_enum_element( $p_enum_name, $p_val ) {
- $config_var = config_get( $p_enum_name . '_enum_string' );
+function get_enum_element( $p_enum_name, $p_val, $p_user = null, $p_project = null ) {
+ $config_var = config_get( $p_enum_name . '_enum_string', null, $p_user, $p_project );
$string_var = lang_get( $p_enum_name . '_enum_string' );
return MantisEnum::getLocalizedLabel( $config_var, $string_var, $p_val );
diff --git a/core/relationship_api.php b/core/relationship_api.php
index bb4d5e0..a895b23 100644
--- a/core/relationship_api.php
+++ b/core/relationship_api.php
@@ -625,7 +625,7 @@ function relationship_get_details( $p_bug_id, $p_relationship, $p_html = false,
# get the information from the related bug and prepare the link
$t_bug = bug_get( $t_related_bug_id, false );
- $t_status_string = get_enum_element( 'status', $t_bug->status );
+ $t_status_string = get_enum_element( 'status', $t_bug->status, auth_get_current_user_id(), $t_bug->project_id );
$t_resolution_string = get_enum_element( 'resolution', $t_bug->resolution );
$t_relationship_info_html = $t_td . string_no_break( $t_relationship_descr ) . ' | ';