Fix empty review can be published bug.

Review Request #11185 — Created Sept. 19, 2020 and updated — Latest diff uploaded

Information

Review Board
release-4.0.x

Reviewers

When publishing a review, an empty review can be published and it will
show as a blank review.

The publish() function of review has been updated to check for empty
text in a review's Header, Comment and Footer. When a review with empty
Header, Comment and Footer is being published, the function throws a
PublishError. A review with only Ship It and no text is considered
to be valid and will not raise an error. Updated #982 Testing sending
e-mails and filtering out users not on a local site to use a non-empty
Review as we now check for empty reviews.

Ran runtests.py, failed #788 Testing GitHub.authorize. Tested on
browser to ensure the fix works on Web API.

Changes between revision 4 and 5

orig
1
2
3
4
5
6

Commits

Summary ID Author
Fix empty review can be published bug.
When publishing a review, an empty review can be published and it will show as a blank review. The publish() function of review has been updated to check for empty text in a review's Header, Comment and Footer. When a review with empty Header, Comment and Footer is being published, the function throws a PublishError. A review with only Ship It and no text is considered to be valid and will not raise an error. Updated #982 Testing sending e-mails and filtering out users not on a local site to use a non-empty Review as we now check for empty reviews. Testing Done: Ran runtests.py, failed #788 Testing GitHub.authorize. Tested on browser to ensure the fix works on Web API.
95f5466dc4edf1d491d61ad91b0819b62b42796f Kean Weng Yap
Jasmine trigger error on calling publish.
2d3b5ca4a165fe0646f366a182e93d9d100d12e1 Kean Weng Yap
Fix empty review can be published bug.
When publishing a review, an empty review can be published and it will show as a blank review. The publish() function of review has been updated to check for empty text in a review's Header, Comment and Footer. When a review with empty Header, Comment and Footer is being published, the function throws a PublishError. A review with only Ship It and no text is considered to be valid and will not raise an error. Updated #982 Testing sending e-mails and filtering out users not on a local site to use a non-empty Review as we now check for empty reviews. Testing Done: Ran runtests.py, failed #788 Testing GitHub.authorize. Tested on browser to ensure the fix works on Web API.
158738ba093ee9380d001634020de30675d9ecc6 Kean Weng Yap
reviewboard/notifications/tests/test_email_sending.py
reviewboard/reviews/models/review.py
reviewboard/reviews/tests/test_review.py
reviewboard/static/rb/js/resources/models/tests/draftReviewModelTests.es6.js
Loading...