The linkedIssues function does not work as explained in the documentation

John O'Brien August 3, 2016

This question is in reference to Atlassian Documentation: Advanced searching - functions reference
The example of the linkedIssues function given in the documentation 7.0 does not work with our JIRA 7.1 Server. I always get a syntax error if I use this example. I can supply one parameter only and the function only works for me if I supply the exact Issue-Key as the parameter.  I cannot supply the type of the link as a parameter to a function. Is this a bug in JIRA Software or an error in the documentation?

 

3 answers

1 accepted

0 votes
Answer accepted
Tarun Sapra
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 3, 2016

What's your function, how did you expect it to work and how is it working?

0 votes
John O'Brien August 3, 2016

The "linkedIssues()"  function for searching using JQL. According to the documentation at

  https://confluence.atlassian.com/jirasoftwareserver070/advanced-searching-functions-reference-762877747.html

the syntax of the function should be as follows:

linkedIssues(issueKey)
linkedIssues(issueKey,linkType)
However, with my JIRA Software (V7.1) only the first variant is accepted as a valid JQL query.
If I try to apply a second parameter i.e. linkType my query is flagged as not valid.
Therefore I cannot search for issues linked to a particular issue with a particular link type.
This is what I need to do.

 

 

Tarun Sapra
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 3, 2016

I am using 7.1.7 JIRA version and I don't get any syntax error-

linkedIssues("reqm-31","depends on")

John O'Brien August 3, 2016

Yes, thank you. I just wrote a lengthy response but this web site or my browser seems to have just thrown it away. Here again in short.
I tried using the function again this time typing the entire query letter by letter. This time it was accepted. I felt very foolish so I thought, I would try to reproduce the earlier error - and I could.
Upon typing the name of the function, JIRA suggests (autocomplete?) a function beneath the input field which I can click on and this is then automatically entered into the query input field. If I accept the function suggested by JIRA (linkedIssues) and try to enter a second parameter I get the syntax error - every time. Visually the query appears to be correct and works without the second parameter. Could this be a bug?
Anyway thanks for your help again, I might never have tried to reproduce it, if it had not been for your question.

Tarun Sapra
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 3, 2016

I think you also have scriptRunner plugin installed and this linkedIssues function is coming from the scriptrunner plugin which has a slightly diff. syntax.

John O'Brien August 3, 2016

Thanks. I just checked, scriptRunner is not installed (I wish it were), but another we do have another plugin with little documentation. This maybe the "culprit". Nasty one that.

Tarun Sapra
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 3, 2016

Ohk, could be J-Tricks plugin or something similar, good that the issue is resolved now!

0 votes
Tarun Sapra
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 3, 2016

Can you share your query and the error?
Also make sure you are supplying the right link as there is a difference b/w inward link and outward link. 

Suggest an answer

Log in or Sign up to answer