Skip to content

Support search field option for iterations REST API

euko requested to merge 350991-support-iteration-search-rest-api into master

What does this MR do and why?

Related to #350991 (closed)

Allow the user of the iterations REST API to specify the search fields to perform a search in.

Right now we can search for iterations whose titles match the search parameter.

http://gdk.test/api/v4/groups/71/iterations?search=plan

By using the added in field, we can search for iterations whose cadence titles match the parameter search as well.

http://gdk.test/api/v4/groups/71/iterations?search=plan&in[]=cadence_title

How to set up and validate locally

  1. Create an iterations cadence.
  • Visit a group (it must be a group, not a project)
  • In the sidebar menu on the left, navigate to Iterations under Plan
  • Click New iteration cadence.
  • Enter some title and uncheck Enable automatic scheduling.
  • Click Create cadence.
  1. Populate the cadence with some iterations
video instruction

Screen_Recording_2023-07-12_at_10.59.04

Visit the updated REST API endpoint:

http://gdk.test/api/v4/groups/71/iterations?search=lol&in[]=cadence_title
http://gdk.test/api/v4/groups/71/iterations?search=lol&in[]=title

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by euko

Merge request reports