Add an error when attempting to publish a review of draft items.

Review Request #12952 — Created April 12, 2023 and submitted

Information

Review Board
release-6.x
831

Reviewers

Now that reviews can exist with comments on draft, we want to prevent
those reviews from being published. This change adds a check before we
publish to verify that the review request itself is public, and checks
for diff comments and file attachment comments to verify that the items
being commented on are public.

Ironically, we had a number of existing unit tests that were publishing
reviews on draft items. These have been fixed up.

Ran unit tests.

Summary ID
Add an error when attempting to publish a review of draft items.
Now that reviews can exist with comments on draft, we want to prevent those reviews from being published. This change adds a check before we publish to verify that the review request itself is public, and checks for diff comments and file attachment comments to verify that the items being commented on are public. Ironically, we had a number of existing unit tests that were publishing reviews on draft items. These have been fixed up. Testing Done: Ran unit tests. Bugs Fixed: 831
0732181e488371270066dcfafb1908ff20e2a074
Description From Last Updated

line too long (82 > 79 characters) Column: 80 Error code: E501

reviewbotreviewbot

line too long (81 > 79 characters) Column: 80 Error code: E501

reviewbotreviewbot

line too long (81 > 79 characters) Column: 80 Error code: E501

reviewbotreviewbot

line too long (80 > 79 characters) Column: 80 Error code: E501

reviewbotreviewbot
david
Review request changed
Change Summary:

Add check step to batch publishing.

Commits:
Summary ID
Add an error when attempting to publish a review of draft items.
Now that reviews can exist with comments on draft, we want to prevent those reviews from being published. This change adds a check before we publish to verify that the review request itself is public, and checks for diff comments and file attachment comments to verify that the items being commented on are public. Ironically, we had a number of existing unit tests that were publishing reviews on draft items. These have been fixed up. Testing Done: Ran unit tests.
4d797c74f6c7ca20d0018a15143730fbc48007a1
Add an error when attempting to publish a review of draft items.
Now that reviews can exist with comments on draft, we want to prevent those reviews from being published. This change adds a check before we publish to verify that the review request itself is public, and checks for diff comments and file attachment comments to verify that the items being commented on are public. Ironically, we had a number of existing unit tests that were publishing reviews on draft items. These have been fixed up. Testing Done: Ran unit tests. Bugs Fixed: 831
4a99f3ff6d6e180e5c1a969f6a77d368107ee9a2
Bugs:

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

david
Review request changed
Commits:
Summary ID
Add an error when attempting to publish a review of draft items.
Now that reviews can exist with comments on draft, we want to prevent those reviews from being published. This change adds a check before we publish to verify that the review request itself is public, and checks for diff comments and file attachment comments to verify that the items being commented on are public. Ironically, we had a number of existing unit tests that were publishing reviews on draft items. These have been fixed up. Testing Done: Ran unit tests. Bugs Fixed: 831
4a99f3ff6d6e180e5c1a969f6a77d368107ee9a2
Add an error when attempting to publish a review of draft items.
Now that reviews can exist with comments on draft, we want to prevent those reviews from being published. This change adds a check before we publish to verify that the review request itself is public, and checks for diff comments and file attachment comments to verify that the items being commented on are public. Ironically, we had a number of existing unit tests that were publishing reviews on draft items. These have been fixed up. Testing Done: Ran unit tests. Bugs Fixed: 831
0d37a75e73177fae3793451d620bf65ce9db5ffc

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

david
maubin
  1. 
      
  2. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to release-6.x (e14e26c)