Skip to content

Draft: Allow for `closed_by_id` param in issues API queries

What does this MR do and why?

Allow for closed_by_id param in issues API queries

The code changes introduce a new filter to search for issues based on the user who closed them. This filter can be used in the web interface and the API. The filter is optional and can be specified by providing the user's ID. The filter is applied to the list of issues returned by the finder, and only the issues that were closed by the specified user are included in the results.

References

Please include cross links to any resources that are relevant to this MR This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.

How to set up and validate locally

  1. Check out this branch
  2. Ensure you have a PAT in the GDK with API scope
  3. run the following: curl --header "PRIVATE-TOKEN: TOKEN_GOES_HERE" --url "http://gdk.test:3000/api/v4/issues?state=closed&closed_by_id=1"
  4. You should see that you get a list of closed issues where the user who closed them was the root/admin user (adjust the value passed to closed_by_id to see issues closed by other users)
  5. Remote the state=closed& and run the curl again. You should see that the closed_by_id is ignored and you simply get a list of the first 20 issue results. This is because closed_by_id is only used if combined with state=closed.

Merge request reports

Loading