Display the count of issues waiting for verification in the ReviewRequest API
Review Request #9496 — Created Jan. 19, 2018 and submitted
When fetching the JSON from the ReviewRequest API using
GET review-requests/<id>/
, the fieldissue_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 statusVERIFYING_RESOLVED
or
VERIFYING_DROPPED
, and these issues are not included in the currently
displayed fields which areissue_dropped_count
,issue_open_count
andissue_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
, runhttp :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. |
chipx86 | |
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. |
chipx86 | |
The bug number should go in the bugs field. |
brennie | |
Can you wrap your description and testing done at 72 characters? |
brennie | |
Summaries shouldn't end in a period. |
brennie | |
E501 line too long (81 > 79 characters) |
reviewbot | |
2.0 is an old release. We'll target this fix for 3.0.3 instead. Can you update this to specify that version? |
chipx86 |
- Summary:
-
ticket-4636 Add issue_verifying_count field in request_request.py in webapiDisplay the count of issues waiting for verification in the ReviewRequest API.
- Description:
-
~ Display the count of issues waiting for verification in the ReviewRequest API.
~ When fetching the JSON from the ReviewRequest API, the count of issues waiting for verification is missing.
+ + Now, display the field "issue_verifying_count" in the JSON.
- Testing Done:
-
~ When fetching the JSON from the ReviewRequest API, the count of issues waiting for verification is missing.
~ ~ Now, display the field "issue_verifying_count" in the JSON.
~ - User has a review with one open issue and one issue awaiting verification.
~ - Run "http :8080/api/review-requests/<id>/" in the command line (using httpie)
~ - Expected output contains:
"issue_dropped_count": 0,
"issue_open_count": 1,
"issue_resolved_count": 0,
"issue_verifying_count": 1,
- - Testing:
- - User has a review with one open issue and one issue awaiting verification. - - Run "http :8080/api/review-requests/<id>/" in the command line (using httpie) - - Expected output contains: - "issue_dropped_count": 0, - "issue_open_count": 1, - "issue_resolved_count": 0, - "issue_verifying_count": 1, - Commit:
-
a943ba39f1e57573c69898f19ac339c1822303d7a1e7f942d6dee5de6225ce39fd4347eea29ea211
Checks run (2 succeeded)
-
-
You'll need to update unit tests for this as well, to ensure this works as expected and never regresses.
-
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.
-
2.0 is an old release. We'll target this fix for 3.0.3 instead. Can you update this to specify that version?
- Description:
-
~ When fetching the JSON from the ReviewRequest API, the count of issues waiting for verification is missing.
~ When fetching the JSON from the ReviewRequest API using
GET review-requests/<id>/
, the fieldissue_verifying_count
is missing and should be included.~ Now, display the field "issue_verifying_count" in the JSON.
~ Note that this field already exists in the review request model, and counts issues which have the status
VERIFYING_RESOLVED
orVERIFYING_DROPPED
, and these issues are not included in the currently displayed fields which areissue_dropped_count
,issue_open_count
andissue_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. - Testing Done:
-
- User has a review with one open issue and one issue awaiting verification.
~ - Run "http :8080/api/review-requests/<id>/" in the command line (using httpie)
~ - Expected output contains:
"issue_dropped_count": 0,
"issue_open_count": 1,
"issue_resolved_count": 0,
"issue_verifying_count": 1,
~ - Run
http :8080/api/review-requests/<id>/
in the command line (using httpie)
~ - 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
- Commit:
-
a1e7f942d6dee5de6225ce39fd4347eea29ea211ab1466822b8a15c0479bad4217a99dd5570cf0f9
Checks run (2 succeeded)
- Summary:
-
Display the count of issues waiting for verification in the ReviewRequest API.Display the count of issues waiting for verification in the ReviewRequest API
- Description:
-
~ When fetching the JSON from the ReviewRequest API using
GET review-requests/<id>/
, the fieldissue_verifying_count
is missing and should be included.~ When fetching the JSON from the ReviewRequest API using
+ GET review-requests/<id>/
, the fieldissue_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
orVERIFYING_DROPPED
, and these issues are not included in the currently displayed fields which areissue_dropped_count
,issue_open_count
andissue_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.~ Note that this field already exists in the review request model, and
+ counts issues which have the status VERIFYING_RESOLVED
or+ VERIFYING_DROPPED
, and 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. - Testing Done:
-
~ - User has a review with one open issue and one issue awaiting verification.
~ - Run
http :8080/api/review-requests/<id>/
in the command line (using httpie)
~ - User has a review with one open issue and one issue
awaiting verification.
~ - Using
httpie
, runhttp :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
~ - Run the new unit test
./tests/runtests.py reviewboard.webapi.tests.test_review_request: ResourceItemTests.test_get_contains_all_issue_counts
- Bugs:
- Description:
-
When fetching the JSON from the ReviewRequest API using
GET review-requests/<id>/
, the fieldissue_verifying_count
ismissing 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 issues are not included in the currently~ VERIFYING_DROPPED
, and these issues are not included in the currentlydisplayed 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.