Filter by release with rest API

Arseny Korotaev
Contributor
April 15, 2021

Hi!

I'm trying to create report tool on top of Align. I've faced the problem that i can't filter neither Epics nor Milestones by releaseIds.

I tried

filter=contains(releaseIds,8)

 but it returns 400 error. 

1 answer

1 accepted

1 vote
Answer accepted
Roman
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 19, 2021

Hi Arseny!
Try this for filtering by fields that are arrays of ids (integers):
milestones?$filter=releaseIds/any(x: x eq 8)
epics?$filter=releaseIds/any(x: x eq 8)
And this for filtering by fields that are ids (integers) as a part of a nested object (eg. array of releases objects within a main epic object):
milestones?expand=true&$filter=releases/any(x: x/id eq 8)
epics?expand=true&$filter=releases/any(x: x/id eq 8)

Both queries will return all epics/milestones that have release as one of the releases they are tied to. However, it doesn't exclude the possibility that those epics/milestones can have any other releases at the same time. Basically, the query says 'Please, give me all epics/milestones that have any of their releases equal to release with id 8'.

Arseny Korotaev
Contributor
April 19, 2021

Awesome! That's work!

Like # people like this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events