From 1ed44a96567e23da446f2678a717360f678d2d00 Mon Sep 17 00:00:00 2001 From: Victor Boctor Date: Fri, 31 Mar 2017 19:31:14 -0700 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20show=20completely=20empty=20not?= =?UTF-8?q?es?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- core/bugnote_api.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/bugnote_api.php b/core/bugnote_api.php index 68950e4a1f..92561fc857 100644 --- a/core/bugnote_api.php +++ b/core/bugnote_api.php @@ -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; }