Jira tickets linked to at least one open 2nd level ticket

Stefano D_Angelo December 13, 2021

Hello,

I already asked for some initial details for this query on this post but I would need some other help in getting the expected Jira results, if possible.

Briefly, I am struggling to find a way to integrate the following query so that it returns all the Jira tickets in a first-level project (here PRJ1) whose Priority is Urgent or Critical and the Status is Passed To Dev, and that are linked to at least one open 2nd-level project's ticket (with To fix, clones, Related to, relates to issue links) and, among these open 2nd-level tickets, the one with the most recent comment was last commented more than 3 months ago (90 days).

The query I have written so far is:

project = PRJ1 AND 
status = "Passed to Dev" AND
Priority in (Urgent, Critical) AND
issuetype in (Bug, Incident, Task) AND
(
(issueFunction not in linkedIssuesOf("statuscategory = done", "To fix") AND issueFunction in linkedIssuesOf("resolution is empty", "To fix") AND issueFunction in linkedIssuesOf("issueFunction in lastComment('before -90d')", "To fix")) OR
(issueFunction not in linkedIssuesOf("statuscategory = done", "clones") AND issueFunction in linkedIssuesOf("resolution is empty", "clones") AND issueFunction in linkedIssuesOf("issueFunction in lastComment('before -90d')", "clones")) OR
(issueFunction not in linkedIssuesOf("statuscategory = done", "Related to") AND issueFunction in linkedIssuesOf("resolution is empty", "Related to") AND issueFunction in linkedIssuesOf("issueFunction in lastComment('before -90d')", "Related to")) OR
(issueFunction not in linkedIssuesOf("statuscategory = done", "relates to") AND issueFunction in linkedIssuesOf("resolution is empty", "relates to") AND issueFunction in linkedIssuesOf("issueFunction in lastComment('before -90d')", "relates to"))
)
ORDER BY created DESC

Nevertheless, it seems this query does not include the following cases:

  1. PRJ1 tickets linked also to closed 2nd-level tickets.
  2. PRJ1 tickets linked also to open 2nd-level tickets whose comment is earlier than 3 months ago.

Could you please suggest how this Jira query should be modified/integrated?

Thanks a lot in advance for your availability!

1 answer

0 votes
Stefano D_Angelo December 15, 2021

Hello @Walter Buggenhout, I hope you are well! :)
This request follows my previous post named Unable to use lastComment and lastUpdated in the linkedIssuesOf subquery, I am unsure whether you or anyone else in your team is able to help me out with the above.

In case, please let me know should any further information be required to better check this.

I would greatly appreciate anything that can lead to a solution! Thank you very much.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events