Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

transition linked issue

I need to make a transition on a linked issue after pass the conditions.

import org.apache.log4j.Category
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.workflow.WorkflowTransitionUtil
import com.atlassian.jira.workflow.WorkflowTransitionUtilImpl
import com.atlassian.jira.util.JiraUtils
import com.onresolve.scriptrunner.runner.util.UserMessageUtil
import com.atlassian.jira.issue.MutableIssue

def Category log = Category.getInstance("com.onresolve.jira.groovy")

IssueLinkManager linkMgr = ComponentAccessor.getIssueLinkManager()
WorkflowTransitionUtil tx = (WorkflowTransitionUtil) JiraUtils.loadComponent(WorkflowTransitionUtilImpl.class)

for (IssueLink link in linkMgr.getInwardLinks( {
def linkedIssue = link.getDestinationObject();
if ( != "is blocked by") {
if (link.getSourceObject().getProjectObject().getKey().contains("OR")){
if (link.getSourceObject().getStatus().getName().contains("Blocked")){
tx.setIssue((MutableIssue) linkedIssue);

catch (Exception e) {
UserMessageUtil.error('ERROR: ')

 Always the code pass to the catch. I don't know what is the problem. the action id is the correct. the execution log is empty.

Also I want to put in the code which user who performs the action. I don't know how to do it.

thanks in advance.

1 answer


Some things that got into my head when I saw your code:

1- Check that you (or the user who will trigger this) are able to transition from Blocked making the transition which has the 921 id. 

2- Normally the UserMessageUtil.error('ERROR: ') gives me issues getting traces... You could try replacing it for return e.printStackTrace() to see some traces of the exception.

3- Maybe the problem is that your script doesn't passes the tx.validate() step, you should have more information about this if point 2 works for you.


To get which user performs the action, use this:

def currentUser = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()



Suggest an answer

Log in or Sign up to answer
Community showcase

The benefits of using Jira in different departments

Jira is a great tool to use across different departments. Forget that paperwork – switch to Jira and get that tasks done smoothly. Marketing Jira allows for a complete digital transformation of you...

75 views 0 4
Read article

Community Events

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

Events near you