Let me outline what it is I'm trying to get to.
Background Information: We have Epics, Features, and Enablers in Project B. Before any of these issueTypes can be progressed beyond a "New" status, they have to be a "Child of" issueLink to something (they're supposed to be a "Child of" an Initiative issueType, but people will put anything there to move their issue).
Ask: I want it to be that an Epic/Feature/Enabler cannot progress beyond New UNTIL it's a "Child of" an Initiative issueType (in Project A).
I am not the best coder, just being honest. But I cannot, for the life of me, figure out how to do this via a ScriptRunner validation/script or Behaviour.
Can someone help! Please and thank you!
Here is a start. You would install this as a Script Condition using ScriptRunner.
final String LINK_TYPE = "DUPLICATE";
final String ISSUE_TYPE = "Initiative";
def linkManager = ComponentAccessor.getIssueLinkManager();
def links = ComponentAccessor.getIssueLinkManager()
it.getIssueType().getName() == ISSUE_TYPE
You need to update the Link Type and the Issue Type to match what you want. This particular code does not check that the outward linked issue is in a specific project. You can add that in the find closure if you want.
I hope that this helps.
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