You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
I'm using the below script in Scriptrunner and it's working just fine for most issues (using OutwardLinks). However, when the issue is linked FROM the status I want, it returns null. For example, issue A is blocked by issue B, and the "Linked Status" field shows the status of issue B as expected. But when issue B blocks issue A, the "Linked Status" field in issue A shows null.
Conversely, I can go to issue B, and the "Linked Status" field shows the status of issue A just fine. I've tried "InwardLinks", but that only shows the "Linked Status" field in issue A as it's own status. Any assistance would be appreciated. Thanks!
Issue A = DCMM-5838
Issue B = ITGOV-36
Hi,
Aaaarch. Links again...
You must know that issue links are implemented and accessible from the API in a (very) strange way.
A issue link (in the Jira Setup) has an Outward part and an Inward part defined.
When using a link, Jira creates a bi-directional link.
But !!! from the API, the getOutwardLinks() method only returns the links that have an outward part that corresponds with the link in the issue (not sure you still follow, it took me also time to understand...).
So in practice, to find all links of an issue, you should get all links from getOutwardLinks() AND from getInwardLinks()
Only if you know on beforehand what links you are looking for (for example only the "is blocked by" links), you know what method to use (in the same example, as "is blocked by" is the Inward description, you know you will find this link in the getInwardLinks() method).
Weird, but once you understand... (and unless you forget in some months... :-))
Thanks for the reply. Would you be able to provide some direction in reference to the script?
-Doug
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.