Skip to content

Commit

Permalink
Additional fixes for display of custom status
Browse files Browse the repository at this point in the history
Resolves additional display issues of custom status cross-project, similar
to what was fixed in 324dbb4681255b7a1fa4cc309ab8742f028dbf43. These
can occur when "All Projects" is selected and one or more projects have
custom statuses not defined globally, in the following pages:

 - View Issues
 - Change Log
 - Roadmap
 - Sponsorship

Affects #11323
  • Loading branch information
dregad committed Dec 15, 2011
1 parent f33c0f8 commit 02fed50
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions account_sponsor_page.php
Expand Up @@ -127,7 +127,7 @@
$t_sponsor = sponsorship_get( $row['sponsor'] );

# describe bug
$t_status = string_attribute( get_enum_element( 'status', $t_bug->status ) );
$t_status = string_attribute( get_enum_element( 'status', $t_bug->status, auth_get_current_user_id(), $t_bug->project_id ) );
$t_resolution = string_attribute( get_enum_element( 'resolution', $t_bug->resolution ) );
$t_version_id = version_get_id( $t_bug->fixed_in_version, $t_project );
if ( ( false !== $t_version_id ) && ( VERSION_RELEASED == version_get_field( $t_version_id, 'released' ) ) ) {
Expand Down Expand Up @@ -191,7 +191,7 @@

$query = "SELECT b.id as bug, s.id as sponsor, s.paid, b.project_id, b.fixed_in_version, b.status
FROM $t_bug_table b, $t_sponsor_table s
WHERE b.handler_id=" . db_param() . " AND s.bug_id = b.id " .
WHERE b.handler_id=" . db_param() . " AND s.bug_id = b.id " .
( $t_show_all ? '' : 'AND ( b.status < ' . db_param() . ' OR s.paid < ' . SPONSORSHIP_PAID . ')' ) . "
AND $t_project_clause
ORDER BY s.paid ASC, b.project_id ASC, b.fixed_in_version ASC, b.status ASC, b.id DESC";
Expand Down Expand Up @@ -237,7 +237,7 @@
$t_buglist[] = $row['bug'] . ':' . $row['sponsor'];

# describe bug
$t_status = string_attribute( get_enum_element( 'status', $t_bug->status ) );
$t_status = string_attribute( get_enum_element( 'status', $t_bug->status, auth_get_current_user_id(), $t_bug->project_id ) );
$t_resolution = string_attribute( get_enum_element( 'resolution', $t_bug->resolution ) );
$t_version_id = version_get_id( $t_bug->fixed_in_version, $t_project );
if ( ( false !== $t_version_id ) && ( VERSION_RELEASED == version_get_field( $t_version_id, 'released' ) ) ) {
Expand Down
2 changes: 1 addition & 1 deletion core/columns_api.php
Expand Up @@ -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 '<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 ) );
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 ) );

# 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 ) ) ) {
Expand Down
4 changes: 2 additions & 2 deletions core/custom_function_api.php
Expand Up @@ -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], '.<br />';
}
Expand Down Expand Up @@ -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, '.<br />';
}
Expand Down

0 comments on commit 02fed50

Please sign in to comment.