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

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


Review Board


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