Reputation: 1388
We have a special Jira setup so that 1 Epic in our master project = 1 Jira project full of stories/bugs/etc (Governance/compliance wanted this)
Each Issue type has a custom column called 'Ideal days'
For each Epic to get the total estimated days we have a custom function that Sums all 'Ideal days' of issues linked to that Epic that are in the backlog (we manually do this).
With Groovy Runner can I auto-link all issues in a project (in the backlog) to an Epic? Thanks
Upvotes: 0
Views: 1452
Reputation: 17828
If you want to link issues without cloning them, you should use IssueLinkManager.getLinkCollection()
.
The code should look something something like this:
IssueLinkManager issueLinkManager = ComponentManager.getInstance().getIssueLinkManager()
issueLinkManager.getLinkCollection(someIssue, yourUser).each() {
it.getOutwardIssues("Some Link Name")
}
Upvotes: 1
Reputation: 26848
There is a built-in script that clones an issue and links it. You should be able to link based on that code: https://jamieechlin.atlassian.net/wiki/display/GRV/Built-In+Scripts#Built-InScripts-Clonesanissueandlinks
Upvotes: 1