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:
Automation Rule displaying the Actor (unchanged from default):
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.
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)
In 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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Hugo Gómez Instead of doing this whole workaround, isn't it easier to just use the admin user (or your own user) as the automation rule's actor? Then in the workflow, only allow the automation rule's actor to make the said transition.
At any rate, the user who's configuring the label to be added and removed can do that manually as well. With him being the actor of the rule, only he'd be able to make the transition either manually or via the automation rule. The same effect would be achieved as previously without any loophole.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Hugo thanks for your solution on this, worked well for my need today in cloud version.
I needed this today and like the original poster, it seems like an easy fix for the 'Automation for Jira' role to be selected as the role who can transition, would save the fiddling. Sometimes you think the people that build these system don't have to use it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I can suggest a solution for you if anyone is still struggling with this.
You want to change the properties of each status that you want to restriction transitions for and limit it to only the automation.
To do this you have to do the following:
1) Find out what your automation id is:
a) Go to System Settings
b) Click view usage for atlassian-addons-project-access
c) the automation id is in the url
2) Go to your workflow, select the status you want to restrict transitions, click on the status then click on properties under Options
3) Add the condition for automation to have permission
a) Set the property key to jira.permission.transition.projectrole.1
b) Set the property key to the automation Id you obtained from previously
c) click the add button
You're done!
Now, only automation will have permission to transition any ticket that has that status.
You will need to repeat the process for every status that you want to restrict to only automation.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi George,
I've tried to manage the workflow permission like you suggested, but i still receive an error in the automation did by "Automation for Jira" user:
Any idea?
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I believe that is a permission that you have not enabled in your projects permissions.
In your project on the left navigation panel, Click "Project Settings", then click on "Permissions".
Try update the permission, "Transition Issues" to grant permission to:
Project Role: "atlassian-addons-project-access"
You maybe also "browse projects" permission. If in doubt just grant Project Role: "atlassian-addons-project-access" all permissions
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
is this a classic project? If so, I would suggest a Condition on the transition within the workflow.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Phil,
I did not get it to work, unfortunately. This is a limitation of next-gen projects I believe.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Jack Brickey I am also trying to set up the conditions to apply to the Automation for jira. How do you suggest we build it?
thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Marta Perez , if you are inquiring as to how to restrict a Workflow Transition such that no users can transition but automation for Jira can, I believe the following will work.
Add a User in group Condition to the transition and choose "atlassian-addons-admin" in the group selection.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.