Permalink
Browse files

Merge branch 'fix-11323-cross-proj-rel'

Conflicts:
	excel_xml_export.php
  • Loading branch information...
2 parents 22f830c + 8d115d9 commit 9a069ce419f5901d15b660f46d50975fc9d8f42f @dregad dregad committed Feb 28, 2012
View
@@ -127,16 +127,16 @@
$t_sponsor = sponsorship_get( $row['sponsor'] );
# describe bug
- $t_status = string_attribute( get_enum_element( 'status', $t_bug->status ) );
- $t_resolution = string_attribute( get_enum_element( 'resolution', $t_bug->resolution ) );
+ $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, auth_get_current_user_id(), $t_bug->project_id ) );
$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' ) ) ) {
$t_released_label = '<a title="' . lang_get( 'released' ) . '">' . $t_bug->fixed_in_version . '</a>';
} else {
$t_released_label = $t_bug->fixed_in_version;
}
- echo '<tr bgcolor="' . get_status_color( $t_bug->status ) . '">';
+ echo '<tr bgcolor="' . get_status_color( $t_bug->status, auth_get_current_user_id(), $t_bug->project_id ) . '">';
echo '<td><a href="' . string_get_bug_view_url( $row['bug'] ) . '">' . bug_format_id( $row['bug'] ) . '</a></td>';
echo '<td>' . project_get_field( $t_bug->project_id, 'name' ) . '&#160;</td>';
echo '<td class="right">' . $t_released_label . '&#160;</td>';
@@ -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";
@@ -237,16 +237,16 @@
$t_buglist[] = $row['bug'] . ':' . $row['sponsor'];
# describe bug
- $t_status = string_attribute( get_enum_element( 'status', $t_bug->status ) );
- $t_resolution = string_attribute( get_enum_element( 'resolution', $t_bug->resolution ) );
+ $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, auth_get_current_user_id(), $t_bug->project_id ) );
$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' ) ) ) {
$t_released_label = '<a title="' . lang_get( 'released' ) . '">' . $t_bug->fixed_in_version . '</a>';
} else {
$t_released_label = $t_bug->fixed_in_version;
}
- echo '<tr bgcolor="' . get_status_color( $t_bug->status ) . '">';
+ echo '<tr bgcolor="' . get_status_color( $t_bug->status, auth_get_current_user_id(), $t_bug->project_id ) . '">';
echo '<td><a href="' . string_get_bug_view_url( $row['bug'] ) . '">' . bug_format_id( $row['bug'] ) . '</a></td>';
echo '<td>' . project_get_field( $t_bug->project_id, 'name' ) . '&#160;</td>';
echo '<td class="right">' . $t_released_label . '&#160;</td>';
@@ -80,7 +80,10 @@ function bug_group_action_print_bug_list( $p_bug_ids_array ) {
foreach( $p_bug_ids_array as $t_bug_id ) {
$t_class = sprintf( "row-%d", ( $t_i++ % 2 ) + 1 );
- 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' ) ) );
+ echo sprintf( "<tr bgcolor=\"%s\"> <td>%s</td> <td>%s</td> </tr>\n",
+ get_status_color( bug_get_field( $t_bug_id, 'status' ), auth_get_current_user_id(), bug_get_field( $t_bug_id, 'project_id' ) ),
+ string_get_bug_view_link( $t_bug_id ),
+ string_attribute( bug_get_field( $t_bug_id, 'summary' ) ) );
}
echo '</table>';
View
@@ -940,7 +940,7 @@ function print_column_edit( $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE
function print_column_priority( $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) {
echo '<td>';
if( ON == config_get( 'show_priority_text' ) ) {
- print_formatted_priority_string( $p_bug->status, $p_bug->priority );
+ print_formatted_priority_string( $p_bug );
} else {
print_status_icon( $p_bug->priority );
}
@@ -1079,7 +1079,7 @@ function print_column_category_id( $p_bug, $p_columns_target = COLUMNS_TARGET_VI
*/
function print_column_severity( $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) {
echo '<td class="center">';
- print_formatted_severity_string( $p_bug->status, $p_bug->severity );
+ print_formatted_severity_string( $p_bug );
echo '</td>';
}
@@ -1091,7 +1091,7 @@ function print_column_severity( $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_
* @access public
*/
function print_column_eta( $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) {
- echo '<td class="center">', get_enum_element( 'eta', $p_bug->eta ), '</td>';
+ echo '<td class="center">', get_enum_element( 'eta', $p_bug->eta, auth_get_current_user_id(), $p_bug->project_id ), '</td>';
}
/**
@@ -1102,7 +1102,7 @@ function print_column_eta( $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE
* @access public
*/
function print_column_projection( $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) {
- echo '<td class="center">', get_enum_element( 'projection', $p_bug->projection ), '</td>';
+ echo '<td class="center">', get_enum_element( 'projection', $p_bug->projection, auth_get_current_user_id(), $p_bug->project_id ), '</td>';
}
/**
@@ -1113,7 +1113,7 @@ function print_column_projection( $p_bug, $p_columns_target = COLUMNS_TARGET_VIE
* @access public
*/
function print_column_reproducibility( $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) {
- echo '<td class="center">', get_enum_element( 'reproducibility', $p_bug->reproducibility ), '</td>';
+ echo '<td class="center">', get_enum_element( 'reproducibility', $p_bug->reproducibility, auth_get_current_user_id(), $p_bug->project_id ), '</td>';
}
/**
@@ -1124,7 +1124,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>';
}
/**
@@ -1136,7 +1138,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 ) );
+ 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 ) ) ) {
Oops, something went wrong.

4 comments on commit 9a069ce

Member

atrol replied Feb 28, 2012

I didn't review the whole stuff, but when seeing the change of function excel_format_custom_field I get the impression that something is going wrong with this commit.
There is just one line changed without any other changes.
-function excel_format_custom_field( $p_issue_id, $p_project_id, $p_custom_field ) {
+function excel_format_custom_field( $p_bug ) {

Owner

dregad replied Feb 28, 2012

@atrol thanks for checking - you're right; guess I shouldn't have been working so late last night trying to get this out :-/

Will push a fix shortly.

Member

atrol replied Feb 28, 2012

I also would like to fix some more issues for 1.2.9. But I feel that I will introduce some regression issues. I try to stop myself and to be patient ;-)
Would be fine if we had one release every month.

Owner

dregad replied Feb 28, 2012

Patience you say ? What's that ? :o)

Actually most of this code goes back to December/January, and was tested by the user who raised the issues. I just needed to finish my own testing (OK, guess I was not so effective on that one...) merge and port to master. Due to the number of related bugs and pending commits, I did not want to delay this to next summer or whenever 1.2.10 would happen, that's all.

I agree, ideally we should have more frequent releases, but... ;-)

Anyway, I have fixed the issue you raised (see fafe09a).

Please sign in to comment.