JQL is it possible to search for issue links created within a date range?

Basically the search paramaters would be:

Project=PRO
"issue link (both in and outward) created date" = today()

Hope that makes sense, I haven't had any luck searching the forums.

Cheers,
Jordan

3 answers

1 accepted

Accepted Answer
0 votes

I have found a solution using the script runner plugin. It's a bit cumbersome but does the job.

First I installed the Script Runner plugin, then the query below returns all tickets created and resolved in March that have a ticket from a particular project (KB) linked.

All PROD tickets, created in March that have a KB linked
project = PROD AND status = Resolved AND created >= 2014-03-01 AND created <= 2014-04-01 AND (issueFunction in linkedIssuesOf("Project = KB", "Duplicates") OR issueFunction in linkedIssuesOf("Project = KB", "causes") OR issueFunction in linkedIssuesOf("Project = KB", "depends on") OR issueFunction in linkedIssuesOf("Project = KB", "relates to") OR issueFunction in linkedIssuesOf("Project = KB", "similar") OR issueFunction in linkedIssuesOf("Project = KB", "is caused by") OR issueFunction in linkedIssuesOf("Project = KB", "is dependent on") OR issueFunction in linkedIssuesOf("Project = KB", "is duplicated by") OR issueFunction in linkedIssuesOf("Project = KB", "relates to") OR issueFunction in linkedIssuesOf("Project = KB", "is similar to"))

Andy Nguyen Atlassian Team Mar 19, 2014

Frankly, it's not different from what I suggested, just depending on how you're going to use it in detail :)

1 vote
Andy Nguyen Atlassian Team Mar 12, 2014

Hi Jordan,

If you'd like to search for linked issues of a specific issue, you can use this:

  • project = "Project_Key" and issue in linkedIssues("Issue_Key") and created >= startOfDay()

This JQL will list all issues linked to the Issue_Key regardless of link types. Furthermore, this is a built-in JQL function available for use (linkedIssues).

Other than that, if you'd like to find all issues which has a link, you may want to install Script Runner plugin and use the following function:

  • issueFunction in hasLinkType("Blocks") OR issueFunction in hasLinkType("Cloners") OR ...

The link types can be found at Administration -> System -> Issue Linking.

Cheers,

Andy

Hi Andy,

Thanks for that quick response. Your solution is close however not quite there.

I am trying to search on the date that the link was created (any type of link in a specific project) not the issue itself.

Is this at all possible?

Cheers,
Jordan

0 votes
Andy Nguyen Atlassian Team Mar 13, 2014

Do you mean you want to know how many links are created on a specific day in a project? If so, I'm afraid it's not available with JQL at the moment, as far as I know.

Sorry then and have a good day.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Sep 18, 2018 in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

21,975 views 2 7
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you