I need to show (on a dashboard) the number of links a JIRA has. I've looked into plugins (like SnapMetrics) but I believe the best way is to write a Groovy Script that essentially calls issue in linkedIssues([issueid]) and then stores the result in a custom field of the issue. I can then display the custom field on the dashboard.
My coding is rusty, however, and I was wondering if anyone could point me in the right direction as to how I would go about this?
Thanks in advance,
Assuming you have Scriptrunner - create a new scripted field, with a number searcher, and set for a numeric output.
Then the script you need can be condensed down to one active line:
Just to mention that I experimented with adding the following:
def issueLinkManager = ComponentAccessor.getIssueLinkManager()
I'm not getting the error:
groovy.lang.MissingMethodException: No signature of method: com.atlassian.jira.issue.link.LinkCollectionImpl.size() is applicable for argument types: () values:  Possible solutions: is(java.lang.Object), find(), sleep(long), find(groovy.lang.Closure), use([Ljava.lang.Object;), with(groovy.lang.Closure)
This morning, Atlassian announced the acquisition of ThinkTilt , the maker of ProForma, a no-code/low code form builder with 700+ customers worldwide. ThinkTilt helps IT empower any team in their or...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events