Skip to content

Commit 9a069ce

Browse files
committed
Merge branch 'fix-11323-cross-proj-rel'
Conflicts: excel_xml_export.php
2 parents 22f830c + 8d115d9 commit 9a069ce

14 files changed

+358
-342
lines changed

account_sponsor_page.php

+7-7
Original file line numberDiff line numberDiff line change
@@ -127,16 +127,16 @@
127127
$t_sponsor = sponsorship_get( $row['sponsor'] );
128128

129129
# describe bug
130-
$t_status = string_attribute( get_enum_element( 'status', $t_bug->status ) );
131-
$t_resolution = string_attribute( get_enum_element( 'resolution', $t_bug->resolution ) );
130+
$t_status = string_attribute( get_enum_element( 'status', $t_bug->status, auth_get_current_user_id(), $t_bug->project_id ) );
131+
$t_resolution = string_attribute( get_enum_element( 'resolution', $t_bug->resolution, auth_get_current_user_id(), $t_bug->project_id ) );
132132
$t_version_id = version_get_id( $t_bug->fixed_in_version, $t_project );
133133
if ( ( false !== $t_version_id ) && ( VERSION_RELEASED == version_get_field( $t_version_id, 'released' ) ) ) {
134134
$t_released_label = '<a title="' . lang_get( 'released' ) . '">' . $t_bug->fixed_in_version . '</a>';
135135
} else {
136136
$t_released_label = $t_bug->fixed_in_version;
137137
}
138138

139-
echo '<tr bgcolor="' . get_status_color( $t_bug->status ) . '">';
139+
echo '<tr bgcolor="' . get_status_color( $t_bug->status, auth_get_current_user_id(), $t_bug->project_id ) . '">';
140140
echo '<td><a href="' . string_get_bug_view_url( $row['bug'] ) . '">' . bug_format_id( $row['bug'] ) . '</a></td>';
141141
echo '<td>' . project_get_field( $t_bug->project_id, 'name' ) . '&#160;</td>';
142142
echo '<td class="right">' . $t_released_label . '&#160;</td>';
@@ -191,7 +191,7 @@
191191

192192
$query = "SELECT b.id as bug, s.id as sponsor, s.paid, b.project_id, b.fixed_in_version, b.status
193193
FROM $t_bug_table b, $t_sponsor_table s
194-
WHERE b.handler_id=" . db_param() . " AND s.bug_id = b.id " .
194+
WHERE b.handler_id=" . db_param() . " AND s.bug_id = b.id " .
195195
( $t_show_all ? '' : 'AND ( b.status < ' . db_param() . ' OR s.paid < ' . SPONSORSHIP_PAID . ')' ) . "
196196
AND $t_project_clause
197197
ORDER BY s.paid ASC, b.project_id ASC, b.fixed_in_version ASC, b.status ASC, b.id DESC";
@@ -237,16 +237,16 @@
237237
$t_buglist[] = $row['bug'] . ':' . $row['sponsor'];
238238

239239
# describe bug
240-
$t_status = string_attribute( get_enum_element( 'status', $t_bug->status ) );
241-
$t_resolution = string_attribute( get_enum_element( 'resolution', $t_bug->resolution ) );
240+
$t_status = string_attribute( get_enum_element( 'status', $t_bug->status, auth_get_current_user_id(), $t_bug->project_id ) );
241+
$t_resolution = string_attribute( get_enum_element( 'resolution', $t_bug->resolution, auth_get_current_user_id(), $t_bug->project_id ) );
242242
$t_version_id = version_get_id( $t_bug->fixed_in_version, $t_project );
243243
if ( ( false !== $t_version_id ) && ( VERSION_RELEASED == version_get_field( $t_version_id, 'released' ) ) ) {
244244
$t_released_label = '<a title="' . lang_get( 'released' ) . '">' . $t_bug->fixed_in_version . '</a>';
245245
} else {
246246
$t_released_label = $t_bug->fixed_in_version;
247247
}
248248

249-
echo '<tr bgcolor="' . get_status_color( $t_bug->status ) . '">';
249+
echo '<tr bgcolor="' . get_status_color( $t_bug->status, auth_get_current_user_id(), $t_bug->project_id ) . '">';
250250
echo '<td><a href="' . string_get_bug_view_url( $row['bug'] ) . '">' . bug_format_id( $row['bug'] ) . '</a></td>';
251251
echo '<td>' . project_get_field( $t_bug->project_id, 'name' ) . '&#160;</td>';
252252
echo '<td class="right">' . $t_released_label . '&#160;</td>';

core/bug_group_action_api.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,10 @@ function bug_group_action_print_bug_list( $p_bug_ids_array ) {
8080

8181
foreach( $p_bug_ids_array as $t_bug_id ) {
8282
$t_class = sprintf( "row-%d", ( $t_i++ % 2 ) + 1 );
83-
echo sprintf( "<tr bgcolor=\"%s\"> <td>%s</td> <td>%s</td> </tr>\n", get_status_color( bug_get_field( $t_bug_id, 'status' ) ), string_get_bug_view_link( $t_bug_id ), string_attribute( bug_get_field( $t_bug_id, 'summary' ) ) );
83+
echo sprintf( "<tr bgcolor=\"%s\"> <td>%s</td> <td>%s</td> </tr>\n",
84+
get_status_color( bug_get_field( $t_bug_id, 'status' ), auth_get_current_user_id(), bug_get_field( $t_bug_id, 'project_id' ) ),
85+
string_get_bug_view_link( $t_bug_id ),
86+
string_attribute( bug_get_field( $t_bug_id, 'summary' ) ) );
8487
}
8588

8689
echo '</table>';

core/columns_api.php

+12-7
Original file line numberDiff line numberDiff line change
@@ -940,7 +940,7 @@ function print_column_edit( $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE
940940
function print_column_priority( $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) {
941941
echo '<td>';
942942
if( ON == config_get( 'show_priority_text' ) ) {
943-
print_formatted_priority_string( $p_bug->status, $p_bug->priority );
943+
print_formatted_priority_string( $p_bug );
944944
} else {
945945
print_status_icon( $p_bug->priority );
946946
}
@@ -1079,7 +1079,7 @@ function print_column_category_id( $p_bug, $p_columns_target = COLUMNS_TARGET_VI
10791079
*/
10801080
function print_column_severity( $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) {
10811081
echo '<td class="center">';
1082-
print_formatted_severity_string( $p_bug->status, $p_bug->severity );
1082+
print_formatted_severity_string( $p_bug );
10831083
echo '</td>';
10841084
}
10851085

@@ -1091,7 +1091,7 @@ function print_column_severity( $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_
10911091
* @access public
10921092
*/
10931093
function print_column_eta( $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) {
1094-
echo '<td class="center">', get_enum_element( 'eta', $p_bug->eta ), '</td>';
1094+
echo '<td class="center">', get_enum_element( 'eta', $p_bug->eta, auth_get_current_user_id(), $p_bug->project_id ), '</td>';
10951095
}
10961096

10971097
/**
@@ -1102,7 +1102,7 @@ function print_column_eta( $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE
11021102
* @access public
11031103
*/
11041104
function print_column_projection( $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) {
1105-
echo '<td class="center">', get_enum_element( 'projection', $p_bug->projection ), '</td>';
1105+
echo '<td class="center">', get_enum_element( 'projection', $p_bug->projection, auth_get_current_user_id(), $p_bug->project_id ), '</td>';
11061106
}
11071107

11081108
/**
@@ -1113,7 +1113,7 @@ function print_column_projection( $p_bug, $p_columns_target = COLUMNS_TARGET_VIE
11131113
* @access public
11141114
*/
11151115
function print_column_reproducibility( $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) {
1116-
echo '<td class="center">', get_enum_element( 'reproducibility', $p_bug->reproducibility ), '</td>';
1116+
echo '<td class="center">', get_enum_element( 'reproducibility', $p_bug->reproducibility, auth_get_current_user_id(), $p_bug->project_id ), '</td>';
11171117
}
11181118

11191119
/**
@@ -1124,7 +1124,9 @@ function print_column_reproducibility( $p_bug, $p_columns_target = COLUMNS_TARGE
11241124
* @access public
11251125
*/
11261126
function print_column_resolution( $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) {
1127-
echo '<td class="center">', get_enum_element( 'resolution', $p_bug->resolution ), '</td>';
1127+
echo '<td class="center">',
1128+
get_enum_element( 'resolution', $p_bug->resolution, auth_get_current_user_id(), $p_bug->project_id ),
1129+
'</td>';
11281130
}
11291131

11301132
/**
@@ -1136,7 +1138,10 @@ function print_column_resolution( $p_bug, $p_columns_target = COLUMNS_TARGET_VIE
11361138
*/
11371139
function print_column_status( $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) {
11381140
echo '<td class="center">';
1139-
printf( '<span class="issue-status" title="%s">%s</span>', get_enum_element( 'resolution', $p_bug->resolution ), get_enum_element( 'status', $p_bug->status ) );
1141+
printf( '<span class="issue-status" title="%s">%s</span>',
1142+
get_enum_element( 'resolution', $p_bug->resolution, auth_get_current_user_id(), $p_bug->project_id ),
1143+
get_enum_element( 'status', $p_bug->status, auth_get_current_user_id(), $p_bug->project_id )
1144+
);
11401145

11411146
# print username instead of status
11421147
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 ) ) ) {

0 commit comments

Comments
 (0)