Skip to content

Commit

Permalink
Don’t show completely empty notes
Browse files Browse the repository at this point in the history
For time tracking notes with no text, if user doesn’t have access
to time tracking information, then an empty note was displayed.
This fix hides the note in such case.

Fixes #22635
  • Loading branch information
vboctor committed Apr 22, 2017
1 parent f845b24 commit 1ed44a9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core/bugnote_api.php
Expand Up @@ -477,6 +477,12 @@ function bugnote_get_all_visible_bugnotes( $p_bug_id, $p_user_bugnote_order, $p_
# If the access level specified is not enough to see time tracking information
# then reset it to 0.
if( !$t_time_tracking_visible ) {
# If the time tracking is the only data in the note, then skip it.
if( is_blank( $t_bugnote->note ) ) {
continue;
}

# otherwise, don't return the time tracking information so that it is not visible.
$t_bugnote->time_tracking = 0;
}

Expand Down

0 comments on commit 1ed44a9

Please sign in to comment.