Aug 7 - Update issue comment, customers now can see the comment

This commit is contained in:
2026-08-07 10:01:56 -04:00
parent ff1a3089bb
commit 4a713cf186
4 changed files with 42 additions and 5 deletions
+9 -1
View File
@@ -688,7 +688,14 @@ def view(issue_id):
return redirect(url_for('issues.view', issue_id=issue_id))
is_following = issue.is_followed_by(current_user)
if current_user.role == 'customer':
# TEMPORARY (Aug 2026) — COMMENTS_VISIBLE_TO_ALL lifts the phase22
# restriction so customers see every comment on the issue, not only the
# ones ticked "Share with customer". is_customer_visible is still recorded
# on every comment, so setting the flag back to false restores the old
# filtering with nothing to repair. See config.py.
comments_open = current_app.config.get('COMMENTS_VISIBLE_TO_ALL', False)
if current_user.role == 'customer' and not comments_open:
comments = (issue.comments
.filter_by(is_customer_visible=True)
.order_by(IssueComment.created_at.asc()).all())
@@ -698,6 +705,7 @@ def view(issue_id):
issue=issue,
form=form,
comments=comments,
comments_open=comments_open,
is_following=is_following)