ScriptRunner fast-track transition doesn't work for non-admin users

I have the following setup in JIRA+JIRA Service Desk setup in my post-function on Create, while creating issue with issuetype A:

  • create sub-task issuetype=B
  • if (issuetype A) fas-track to X
  • if (issuetype B) fast-track to Y

Workflow is the same for both A and B

Under admin-level user I see the following sequence in the logs:

  • create process started for the parent
  • workflow post-functions are running for the parent
  • subtask create process started
  • workflow post-functions are running for the sub-task
  • sub-task is transitioned to Y
  • parent is transitioned to X

All good

Now, I run the same test with an end-user (have Browse, Create, Edit, Transition, Comment permission) - on both fast-track steps I get a log: 

Error Message: It seems that you have tried to perform a workflow operation (My Transition) that is not valid for the current state of this issue (KEY-####). The likely cause is that somebody has changed the issue recently, please look at the issue history for details.

No conditions on transitions.

Transition to X is "shared" i.e. "re-used", transition X is not.

3 answers

1 accepted

This widget could not be displayed.

Hmm, mystery upon mystery, misconfiguration or misunderstanding – something is definitely amiss.

I've been able to track it using Miscellaneous Workflow Extensions plugin which now has it's own Transition Issue function. Logging seems to be a bit better there. (@Jamie Echlin [Adaptavist] please note?)

Below are 2 post-functions with the same conditions attempting to transition the same issue and failing (output from LastLog so read from the bottom to top):

2014-10-07 05:52:33,837 Thread-1615 ERROR enduser1 1132x5125x1 k7e96r 125.239.134.159 /servicedesk/customer/portal/1/create/5 [canned.jira.utils.WorkflowUtils] Not attmpting transition
Error Messages: [It seems that you have tried to perform a workflow operation (Submit to Support) that is not valid for the current state of this issue (JSD-381). The likely cause is that somebody has changed the issue recently, please look at the issue history for details.]
2014-10-07 05:52:33,837 Thread-1615 ERROR enduser1 1132x5125x1 k7e96r 125.239.134.159 /servicedesk/customer/portal/1/create/5 [canned.jira.utils.WorkflowUtils] Errors: {}
2014-10-07 05:52:33,700 ajp-bio-8109-exec-3 WARN enduser1 1132x5125x1 k7e96r 125.239.134.159 /servicedesk/customer/portal/1/create/5 [jmwe.plugins.functions.TransitionIssueFunction] The user 'enduser1' does not have permission to perform action on given issue.
2014-10-07 05:52:33,700 ajp-bio-8109-exec-3 WARN enduser1 1132x5125x1 k7e96r 125.239.134.159 /servicedesk/customer/portal/1/create/5 [jmwe.plugins.functions.TransitionIssueFunction] Field validation error auto-transitioning linked issue JSD-381:

So, the user doesn't have permissions to transition the issue.

The key word in the problem above is "JIRA Service Desk". I also suspect that it maybe SD Version 1->Version 2 issue and possibly a bug?

So, in my permission scheme I have "Transition Issues" allowed for "Project Role (Administrators)", "Project Role (Service Desk Team)" and "Service Desk Customer - Portal Access".

Now, that last one in the context of being able to transition issues in post-functions apparently is NOT equivalent to "users in my Service Desk Customers project role".

I've added "Project Role (Service Desk Customers)" and it seems to work.

As far as I can tell the permission scheme we are using was automatically created by JIRA Service Desk and then edited (some permissions removed). At the moment SD doesn't recognize it as "standard" SD permissions scheme anymore, if I agree to change to the standard one - a new permission scheme is created with all permissions that I care about looking the same + more other permissions given for "Service Desk Customer - Portal Access" (like Close issues or Modify Reporter). The "old" one had these other ones removed.

> (Jamie Echlin please note?) I don't note that at all, my logging is exactly the same... If it works for one user and not another it's just a permissions issue. JSD adds its own conditions, perhaps not in the UI, and it will be that that is blocking you...

OK, I get you. JMWE uses the old WorkflowTransitionUtil, whereas Script Runner uses new IssueService, which is the recommended API. Both plugins show all information that is available to them from the underlying API. IssueService is buggy, so I may drop back to the old WfTU way of doing things.

This widget could not be displayed.

This because the IssueService which is used internally to do the transition checks the permissions.

We are giving the user the option to select whether they want to skip these permissions, validators and conditions to allow you to do the transition as a non admin user. It will be in our next release. 

You can track the progress of this feature here: https://productsupport.adaptavist.com/browse/SRJIRA-1895

This widget could not be displayed.

Hey I am using Jira+ JIRA Service desk. Fast-track transition an issue works when logged in as an admin. But it seems not to be working when I log in as an end user. Is there any way I can make it work or is there a work around.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted 8 hours ago in Jira

Atlassian Research Workshop opportunity on Sep. 28th in Austin, TX

We're looking for participants for a workshop at Atlassian! We need Jira admins who have interesting custom workflows, issue views, or boards. Think you have a story to sha...

26 views 1 2
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you