Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,368,881
Community Members
 
Community Events
168
Community Groups

How to restrict workflow transition to "Automation for Jira"?

Info: Free tier, Next-gen software project

ISSUE:

When creating a git branch I am moving a card from "SELECTED FOR DEV" to "IN PROGRESS" through an automation trigger. I would like to be able to limit that transition so that the only one who can move it is the actor of that trigger (the Jira bot). Jira defaults the actor of the trigger to be "Automation for Jira". 

ATTEMPTED: 

I've visited Project Settings -> Access to see if I could find the user Automation for Jira, in hopes of being able to apply the restriction to Admin users only, but Automation for Jira is not there.

Screenshots:

Transition restriction popup window:

Screen Shot 2021-02-12 at 3.59.39 PM.png

Automation Rule displaying the Actor (unchanged from default):Screen Shot 2021-02-12 at 4.04.47 PM.png

2 answers

1 vote
Jack Brickey Community Leader Feb 13, 2021

is this a classic project? If so, I would suggest a Condition on the transition within the workflow.

Hey Jack, thanks for reply. 

It is not a classic project, its a next-gen software project. 

In the workflow, to the transition I can apply "Rules", the one I wish to apply is "Restrict who can move an issue", I can't figure out how to allow only the Jira Bot (the trigger automation software) to make the transition. 

Hey Mashu,

Did you ever get this to work ?

I am trying to do the same, and have hit the same wall

I have existing Rules in place, and want to add the "Automation for Jira" User as an additional user allowed to Transition, but it is failing at the moment

(It works if I take all Rules away, but that does suit my requirements)

thanks

Phil

Hi Phil, 

 

I did not get it to work, unfortunately. This is a limitation of next-gen projects I believe. 

Hi @Jack Brickey which condition would you suggest as the optimal? I've been looking around and I was considering the 'automation for jira' user for example, the problem is that is not a real user so I can't add him into a user group and use that as a condition for example. What would you suggest?

Hi! - I needed to do this as well, and figured out a workaround that may work on some situations. I can think of some scenarios where this may not solve your case.

In the workflow, the exclusive transition has a rule that allows the issue to transition only if it contains a certain label. In my case the label is "JiraAutomation".

Then, in automation, before using said transition, add the label to the issue, perform the transition, and then you can remove the label afterwards.

It is like marking the issue to enable the transition.

This works as a charm, because users won't see the transition in the list of available transitions, unless they manually add the enabling label. Just don't spread the word to the team.. haha!

Hope this helps someone!

Update with new discoveries...

1. After assigning the label to the issue to transition, you must re-fetch the issue's data (there is an action for that)  before performing the transition, this will ensure the label is properly applied before attempting the move.

jira-automation01.png

2. The experience on the Android mobile app (v93.1.1)  is not as good as on the browser app. In the browser the transition is highlighted as not available to user. (see drop zone on right)

jira-automation02.pngIn the mobile app, the transition IS allowed, then it is reversed after a few seconds. This indicates that the verification takes place after the move, and it is not prevented as in the browser app.

So far, that's about it.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS

Atlassian Community Events