4522: Empty "target_groups" in JSON response on a Draft Review Request

g.iche

What version are you running?

2.5.8

What's the URL of the page containing the problem?

http://my.reviewboard.server/reviewboard/api/review-requests/24/?api_format=json&force-text-type=html&include-text-types=raw

What steps will reproduce the problem?

  1. Setup default reviewers to assign one code path to a group
  2. Post a new review request, through the Web API or through the UI (the review ID is 24 in this case)
  3. Read back the review request through the Web API: http://my.reviewboard.server/reviewboard/api/review-requests/24/?api_format=json&force-text-type=html&include-text-types=raw
  4. "target_groups" is empty BUT the HTML version is showing the target group as expected ( http://my.reviewboard.server/reviewboard/r/24/ )
  5. Publish the review request
  6. Read back the review request through the Web API: the target group is assigned in the JSON response.

What is the expected output? What do you see instead?

Expected: the "target_groups" in the JSON response should be populated in the Draft version of the review request, as it is when querying the HTML version.
Actual: "target_groups" in the JSON response is empty.

What operating system are you using? What browser?

Ubuntu 16.04 LTS / Firefox 51

Please provide any additional information below.

#1 g.iche

It does work as expected when requesting explicitely the draft: GET http://my.reviewboard.server/reviewboard/api/review-requests/24/draft/

david
#2 david

This sounds like it's working as expected--the target groups are not part of the actual review request until it's been published. We did have a bug where default reviewers were not assigned correctly to the draft, which we fixed, which would explain a recent change in behavior.

  • -New
    +NotABug