HI,
I am searching for the scripts or the methods by which i can invoke a specific transition of an issue from the Post function of the linked issue, Let's say, From issue A-231 if i am doing "Resolve issue" then the Transition of Issue B-23 (i.e. "Submit for Approval") should execute automatically. Can that happen. I am not that into coding, please try to give as much detail as you can.
You can get the links to the issue with a script like this.
IssueLinkManager issueLinkManager = ComponentAccessor.issueLinkManager def linksOut = issueLinkManager.getOutwardLinks(issue.id) def linksIn = issueLinkManager.getInwardLinks(issue.id)
Now you must identify the correct link (by linktype and direction?), e.g. like this.
foundLinks = linksIn.findAll{it.getIssueLinkType().getName() == 'Blocker'}
and than transition the corresponding issue(s) through the IssueService (see "Transitioning an existing Issue" on https://developer.atlassian.com/display/JIRADEV/Performing+Issue+Operations).
foundLinks.each{ link -> def issue = link.getSourceObject() // ... issueService transition ... }
Be aware of using the corresponding method to get the linked issue. getSourceObject() for inward links and getDestinationObject() for outward links.
Henning
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I agreed Sir, I will surely count your point.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
> I am not that into coding
For your requirements you will need to get into coding... there isn't off the shelf solutions for such specific requirements.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.