It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Is there a loop function in JQL?


I have got the following challenge, but do not know if i can do the JQL query in JIRA:

Target: I want to find all EPICS with the text string "Messwerte" in it and then I want to show all USER STORYS assigned to this EPICS. I know, can do this "manualy" with this two JQL-Statements:

1) type=EPIC AND text ~Messwerte

After this, I put the results  (AGENT-xxxx, AGENT-yyyy...e.g.) in the second JQL-query:

2) type=Story and "Epic Link" in (AGENT-3247,AGENT-6091,AGENT-7694,AGENT-9049,AGENT-6458,AGENT-4105,AGENT-1937)

But is there a possibility to do this in one JQL query? In UNIX shell scripts I would build an array with the result from 1) and then I would build a loop over it with 2).

But how can I do this in JQL?




1 answer

Hello, it's not possible to do out of the box, but different plugins have different kind of additional JQL functions that can get the job done.

For example, with scriptrunner you can do it like this:

issueFunction in issuesInEpics("text ~Messwerte")

Hello Ilya,

thx a lot for the information :)



Suggest an answer

Log in or Sign up to answer

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you