API: Order by relative_position

GitLab Enterprise Edition [13.8.4-ee] (private/corporate hosted)

I’d like to get the same ordering from GitLab via the web API as shown in the UI.

Two cases:

  • Matching the “manual ordering” of issues in the issue list (e.g. https:///api/v4/projects/1234/issues?order_by=relative_position)

    • The “order_by=relative_position” clause does not produce the same order as “manual” ordering in the UI.
  • Retrieving the ordering of issues on the Kanban boards (by state)

    • There doesn’t seem to be any way to retrieve the issues associated with a Kanban board (I guess you could filter by the label matching the Kanban state?).

Thanks!

1 Like

I am not able to answer the question, but I have the same issue.

I created an issue on stack overflow - Gitlab ISSUE API: Order by relative_position - do not show same result like “manual” sorting on UI, maybe the community there can help us.

The only way I was able to make it work is using sort=asc and order_by=relative_position parameter, that way all tickets were returned in the correct (UI) order. However, setting sort=desc didn’t do the trick