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 1 and 2

orig
1
2
3
4
5
6

Commits

Summary ID Author
Hotfix for GitHub Auth token when adding repo.
741de0992ca7ec66cfd14b365880227a74ca42a7 Kean Weng Yap
Add validate_fields to check for empty reviews when publishing.
88774decfcf087b44e0f446af3b547fd87c7c151 Kean Weng Yap
Set review.model.public to false when PublishError.
f20e42989c3546f053cb92522aed1584b29eac60 Kean Weng Yap
Populate review text as it cannot be empty.
4cf9ad98d084e49e6459162c7ab20eb977f5011d Kean Weng Yap
Modify validate to check for comments, emails and Ship It.
170f5932cc151504b22d34e79e8d85788e3039c6 Kean Weng Yap
Hotfix for GitHub Auth token when adding repo.
ee3f1f85814ea025b3a6dff616eacab7b6dc5c3f Kean Weng Yap
Add validate_fields to check for empty reviews when publishing.
88eb60a7bbb0e8bf98bf3c12da079154a53bb56f Kean Weng Yap
Set review.model.public to false when PublishError.
90fb63ac2d03a030874c8020a460783975abc827 Kean Weng Yap
Populate review text as it cannot be empty.
ea074c9d6f6d69b44cdcdab535b012b87bb08aa1 Kean Weng Yap
Modify validate to check for comments, emails and Ship It.
4a12eb1e06d440ba1ba8bab71436871f1904a4eb Kean Weng Yap
Update indent for Review Bot indent issue.
47e132043bf149a56df183d1af490e0a5532ef78 Kean Weng Yap
reviewboard/reviews/models/review.py
Loading...