scriptrunner nested query for epics and each epic's stories

Kelvin Yang November 12, 2019

Hi,

Current issue structure:

Epic (aka Feature) 

   ->Story 

I want to use a nested query w/ scriptrunner to search for Epics and each epic's stories. Structure plugin isn't an option and issueFunction in issuesInEpics("issuefunction in epicsOf(\"portfolio = digital\")") only returns the stories. I want the search query result to return in Epic and followed by its user stories. 

 

Not sure if this helps but I sudo-coded the following for what I want to accomplish: 

search_result= []
def Digital_Epics = issuefunction in epicsOf("portfolio = 'digital'") AND fixVersion is not EMPTY ORDER BY fixVersion ASC, project ASC

for e in Digital Epics:
   search_result.append(e)
   def Storylist = query result of (Portfolio = Digital AND issuetype = Story AND "Epic Link"       ="{e}" AND fixVersion is not EMPTY ORDER BY fixVersion ASC, project ASC, "Epic Link")
   

    for story in Storylist:
        search_result.append(story)

return search_result

 

 

Any suggestion or solution to this? Thanks.

0 answers

Suggest an answer

Log in or Sign up to answer