Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Hi there, I need help writing a JQL search on scriptrunner

Candice Irwin
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 8, 2023

I need help writing the follow JQL  in scriptrunner please:

 

I need to search project 

Issuetype = Story

Linked Issuetype = Bugs/Defects only

column to show number of bugs open and closed

Fixversion = "V1(Day 1)

Order by labels ASC

1 answer

0 votes
Andrew Wolpers March 14, 2023

Hey Candice, I would suggest using `issueFunction in linkedIssuesOf()`, which would look something like:

issuetype = Story and issueFunction in linkedIssuesOf("issuetype = bug") and fixVersion = "V1(Day 1)" ORDER BY labels ASC

If you're using `Defect` as well you would just update your JQL in the sub query.

 

The column(s) would be dependent on your gadget or filter, but the separation of open and closed issues that are linked to the Story might not be something Jira supports out of the box.  

Candice Irwin
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 15, 2023

Thank you for your help.

When I put this JQL in, I am retrieving all linked issues including "Change Requests", whereas I only want "bugs" listed. Is it also possible to have another cell for each story on number of "bugs" opened and number of "bugs" closed?

Thanks

Candice 

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, atlassian government cloud, fedramp, webinar, register for webinar, atlassian cloud webinar, fedramp moderate offering, work faster with cloud

Unlocking the future with Atlassian Government Cloud ☁️

Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.

Register Now
AUG Leaders

Upcoming Jira Events