Display the count of issues waiting for verification in the ReviewRequest API

Review Request #9496 — Created Jan. 19, 2018 and submitted

Information

Review Board
release-3.0.x
ab14668...

Reviewers

When fetching the JSON from the ReviewRequest API using
GET review-requests/<id>/, the field issue_verifying_count is
missing and should be included.

Note that this field already exists in the review request model, and
counts issues which have the status VERIFYING_RESOLVED or
VERIFYING_DROPPED, and these issues are not included in the currently
displayed fields which are issue_dropped_count, issue_open_count
and issue_resolved_count.

With this fix, we display the field issue_verifying_count in the JSON.
Also, a unit test is included to assert that all four issue count fields
are visible.

  • User has a review with one open issue and one issue
    awaiting verification.
  • Using httpie, run http :8080/api/review-requests/<id>/
  • Expected output contains:
        "issue_dropped_count": 0,
        "issue_open_count": 1,
        "issue_resolved_count": 0,
        "issue_verifying_count": 1,
  • Run the new unit test
    ./tests/runtests.py reviewboard.webapi.tests.test_review_request: ResourceItemTests.test_get_contains_all_issue_counts
Description From Last Updated

You'll need to update unit tests for this as well, to ensure this works as expected and never regresses.

chipx86chipx86

The description needs a bit of work. See https://www.reviewboard.org/docs/codebase/dev/writing-good-descriptions/ for what we expect on all the fields.

chipx86chipx86

The bug number should go in the bugs field.

brenniebrennie

Can you wrap your description and testing done at 72 characters?

brenniebrennie

Summaries shouldn't end in a period.

brenniebrennie

E501 line too long (81 > 79 characters)

reviewbotreviewbot

2.0 is an old release. We'll target this fix for 3.0.3 instead. Can you update this to specify that version?

chipx86chipx86
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

JT
chipx86
  1. 
      
  2. Show all issues

    You'll need to update unit tests for this as well, to ensure this works as expected and never regresses.

  3. Show all issues

    The description needs a bit of work. See https://www.reviewboard.org/docs/codebase/dev/writing-good-descriptions/ for what we expect on all the fields.

  4. Show all issues

    2.0 is an old release. We'll target this fix for 3.0.3 instead. Can you update this to specify that version?

  5. 
      
JT
brennie
  1. Some minor formatting nits from me, then Ship It!

  2. Show all issues

    The bug number should go in the bugs field.

  3. Show all issues

    Can you wrap your description and testing done at 72 characters?

  4. Show all issues

    Summaries shouldn't end in a period.

  5. 
      
JT
JT
david
  1. Ship It!
  2. 
      
JT
Review request changed
Status:
Completed
Change Summary:
Pushed to release-3.0.x (f479737)