Forums

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

List linked issues using linkedIssuesOf() for tickets link between two dates

Jonathan Mondejar November 29, 2018

I've been using linkedIssuesOf() function for a while but I don't know how to include a condition within linkedIssuesOf() where the date issue was the link between <fromdate> and <todate>

1 answer

0 votes
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 30, 2018

That specific JQL function is actually being provided by the scriptrunner plugin.  When looking at their documentation on this function: https://scriptrunner.adaptavist.com/latest/jira/jql-functions.html#_linkedissuesof

It does not have any kind of date or time parameter that could be passed to the function to find when the link was created precisely.  You could pass the function an additional JQL query in order to refine the results.  However there isn't a clear JQL you can use to find exactly what you want.  If you tried to use updated> date1 and updated<date2  You might find the issues you want, but this would also include any other issues that have had any kind of update to them, not just the creation of a link.

However if you're using Jira Server, and you have access to the SQL database, you could probably find out this information through some SQL hackery.   I played around with this a bit and I think I found a SQL query you could use to find the time when issue links where created for issues with something like this:

SELECT p.pkey || '-' || i.issuenum AS Issuekey, cg.ID, cg.issueid, cg.AUTHOR, cg.CREATED, ci.FIELD, ci.OLDVALUE, ci.OLDSTRING, ci.NEWVALUE AS LinkedIssuekey, ci.NEWSTRING
FROM changegroup cg
inner join jiraissue i on cg.issueid = i.id
inner join project p on i.project = p.id
inner join changeitem ci on ci.groupid = cg.id
where ci.field='Link'

The created field returned by these results will be the time when the issue link was created.

Suggest an answer

Log in or Sign up to answer