Forums

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

Automation rule to prevent defects moving to done if there is no root cause

Rania Haddadin
Contributor
August 7, 2024

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

3 answers

3 accepted

1 vote
Answer accepted
Trudy Claspill
Community Champion
August 7, 2024

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.

Rania Haddadin
Contributor
August 7, 2024

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

 

Trudy Claspill
Community Champion
August 7, 2024

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:

https://support.atlassian.com/jira-software-cloud/docs/available-workflow-rules-in-team-managed-projects/

The workflow rule you would want is:

https://support.atlassian.com/jira-software-cloud/docs/available-workflow-rules-in-team-managed-projects/#Availableworkflowrulesinnextgenprojects-Restricttowhenanissueisaspecificvalue

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.

0 votes
Answer accepted
John Funk
Community Champion
August 7, 2024

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. 

Rania Haddadin
Contributor
August 7, 2024

Thank you   

Like John Funk likes this
John Funk
Community Champion
August 7, 2024

You are welcome. 

0 votes
Answer accepted
Shawn Doyle - ReleaseTEAM
Community Champion
August 7, 2024

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.

 

Rania Haddadin
Contributor
August 7, 2024

Thank you

Rania Haddadin
Contributor
August 7, 2024

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

Suggest an answer

Log in or Sign up to answer