Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Restrict who can transit / approve status using automation

Nur Fatin January 24, 2025 edited

 

Hello, 

I have a Jira Cloud team-managed project. I have two issue type - parent issue is called main task and child issue is called subtask. Basically this project is getting approvals for the ticket before a change can be implemented. Users will create a ticket (main task) and each main task will have multiple subtasks - depending on what kind of change (external or internal). Automation rules are set in place whereby every time a ticket is created, the subtasks will be created automatically. External will have 13 subtasks and internal will have 11 subtasks. In the context field of the subtask issue type, there is a custom field called Control Owners (I selected the available create a field option and select people field and renamed it to Control Owners).

Each subtask has different Control Owners. Subtask 1 will have User A and User B and subtask 2 will have User C and User D and so on. Is there a way to set up an automation rule whereby the transitioning / approving of the status on the subtasks are limited to the Control Owners listed for each subtask? 

I have set the rule but it failed because I can still transit / approve the status of the subtask 1 when I am not the Control Owner. When I tried to edit the workflow, it doesn’t address my objective because I included all the names of the Control Owners under restrict users who can move the status. So, Control Owners (User A & User B) for subtask 1 can still transit / approve status for subtask 2 when they are not the Control Owners for subtask 2.

Is there a workaround for this? Because I really need it to work whereby it only allows User A and User B to transit / approve subtask 1 and not subtask 2, and User C and User D can only transit / approve the status of subtask 2 and not subtask 1 and so on.

Thank you in advance. 

2 answers

1 accepted

0 votes
Answer accepted
Nur Fatin January 26, 2025

Hello Tessa,

I just want to update you that the automation works now. Firstly, my issue was the workflow. I did not have a transition that allows the status to revert back to the prior status.

Secondly, I edit my automation flow as below:

1. When: Issue transitioned
2. If: matches (I used {{smart values}} condition)
3. Then: Transition the issue to
4. And: Add comment to issue
5. Else-if: matches (I used {{smart values}} condition)
6. Then: Transition the issue to 
7. And: Add comment the issue to

With these two configured correctly, the automation should work.

Now, only Control Owners can transit / approve their respective subtasks. If users other than the Control Owners try to transit / approve the status, a comment will be added and the status will be reverted back to the prior one.

Sharing the above, hoping it helps others who are facing similar issues.

Note: This is for Jira Cloud team-managed projects

Thank you.

2 votes
Tessa Tuteleers
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 24, 2025 edited

Hi @Nur Fatin , 

unfotunately this is not possible: Automation is triggered by the tranisition of the issue itself. By then it is too late to stop the actual transition. 

What you could do is: 

  • Keep doing it in automation, but when the user is not autorized, transition back to the previos status 
  • If you are an admin you can make changes to the workflow of the subtasks -> add conditions to the workflow transition to effectively block users to do the transition (preferred)
    • Dpending on the type of project and or which apps you have there will be different possibilities to do this: 
      • Only users in group (you would have to maken specific groups)
      • Only users in role / with specifie permissions / .. 
      • Users in custom field (would be easiest for your case)

 

Pleae let me know if this makes sense and if you need more help. 

- Tessa

Nur Fatin January 26, 2025

Hey Tessa,

Thank you for your reply. I don't quite understand the workaround. Could you help to explain this further, please?

How do I do this: 

  • Keep doing it in automation, but when the user is not autorized, transition back to the previos status


I have tried to make changes to the workflow, but I think "Allow these groups" option will work as I would be including all the control owners in the Control Owners group. I would need to create the group, right? How do I do that?

If all else fail, would JSM allow me to have granular control? Subtask 1 only can be approved by User A and User B, Subtask 2 only can be approved by User C and User D and so on?

Screenshot 2025-01-27 at 10.20.10 AM.png

Nur Fatin January 26, 2025 edited

.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
ENTERPRISE
TAGS
AUG Leaders

Atlassian Community Events