Hello,
I am looking to create an automation rule to prevent a user moving a defect to done if the root cause and root cause description is blank.
Thanks in advance,
Rania
Hello @Rania Haddadin
Automation rules cannot be used to prevent an action from happening. Automation rules are triggered by completion of an action. An Automation Rule could only react after the transition has completed.
Instead you need to modify the workflow transition to the "done" status to add a Validator to confirm that the fields are not empty.
The method to do this depends on:
1. Your Jira hosting type: Are you using Jira Cloud (Atlassian's software-as-a-service product) or Jira Server/Data Center (the product where your company installs the software on their on servers)? If you are unsure, click the Help button in the Jira menu bar and select About, and tell us what that says.
2. If you are using Jira Cloud, are you working with a Team Managed project or a Company Managed project? That information will be available in the Type column on the View All Projects page under the Projects menu.
Thank you we are using the software and I am working on a team managed project. I have also raised a question/suggestion to see if we can get a global rule set up but haven't heard anything yet
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Rania,
Please be clear that an Automation Rule (global or project specific) cannot prevent a transition from happening. That can only be done through the workflow associated with the project.
For a Team Managed project the workflow configuration options are not as extensive as for Company Managed projects. Refer to this documentation:
The workflow rule you would want is:
However the fields that can be checked in the workflow to confirm the field has data is limited in Team Managed project workflows. The fields you want to check may not be supported for this type of validation in TM project workflows.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rania,
You can edit the workflow to add a Field Required Validator for the transition to Done. Then select the two fields. Be sure to save and publish the workflow.
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.
Automation rules work well after an event. If you want to prevent an action, it's best done in the workflow.
However, if you want to do this in Automation, you could transition the issue back if the root cause description is blank, assuming the workflow supports this transition.
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.
I was able to play around in UAT and got one created to move it back to in progress, then send the email to the assignee to update the field. Thanks again
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.