Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Query: Get Stories where two FixVersions (of different projects) do not equal

Carl-Marcus Scheffler
Contributor
February 19, 2019

I am trying to a query to get stories, where the linked stories have not the same fixVersion.

I know how to write it in SQL, but I am not sure how to get this query in JQL or in another way in JIRA.

The setup is: two projects, having both identical fixVersions. I need the stories, which are linked together, but their fixVersions do not match.

The SQL would be (pseudo-sql):
SELECT globe.key, tibco.key, globe.fixVersion, tibco.fixVersion
FROM  globe_project globe
LEFT OUTER JOIN tibco_project tibco ON tibco.linkedIssueKey = globe.key
WHERE globe.fixVersion != tibco.fixVersion

The join works with scriptrunner on issueFunction in linkedIssuesOf(project = Globe). But how to do the WHERE I can't figure out...

1 answer

0 votes
Tarun Sapra
Community Champion
February 19, 2019

Hello @Carl-Marcus Scheffler 

Personally, I find the underlying schema of Jira to be pretty complex. For your requirement I would just write  a small groovy scripts that lists all the stories which are linked to other stories but they don't have the same fixVersion.

You seem to already have script runner plugin installed, thus you can do that in the script console.

Tarun Sapra
Community Champion
February 19, 2019

You can also write a post-function that populates a custom field with "Yes" or "No" based on whether the story has linked story with same version or not. And then later you can query in the issue navigator to get all issues with "yes" and all issues with  "No"

Carl-Marcus Scheffler
Contributor
February 19, 2019

Unfortunately I have no possibility to add scripts, as I am not the administrator of the system and will not get another script approved. I am only a user...

Suggest an answer

Log in or Sign up to answer