How do I prevent a status change if a field is empty using Automation rules?

Sigrid Schoepel August 27, 2020

I am in a nextgen project. I check three fields and for each one if it's empty I set the status to the same status loop and I've tried setting it to the specific status where it should stay. Neither work. I can march it through the workflow. I also had a last step where it allowed the transition and I took that out but it didn't change anything.

I am an admin and started this project so I don't think it's a permission issue. What am I doing wrong?

 

image.png

2 answers

1 accepted

0 votes
Answer accepted
Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 27, 2020

With NG you cannot use the traditional means of a Validator or Condition. With Automation you could transition the issue back to the previous status but this is an after-the-fact event. If you do this I recommend adding a comment as part of the automation rule so that users have a clue what happened and why and what to do to successfully transition. 

Sigrid Schoepel August 28, 2020

I am trying that in the automation but it's not working if you look at the screen grab. Are you saying do an "if in status X and fields are empty then move to status Y"?

Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 28, 2020

from what I can tell the automation should work but that depends on the details. I would suggest you try to simplify the rule just to get started. Try removing all but one condition, i.e. like this...

when: issue transition from in progress to done

if: severity_segnextgen is empty

then: transition issue to in progress

testing:

  1. create a new issue and, assuming your workflow is To Do -> In Progress -> Done, then move the issue to In Progress
  2. before moving to done let's test that your if jql displays expected results...
  3. in the Advanced search for issues enter project = xxx and and severity_segnexgen is empty and status = "in progress". Does the new issue appear in the results? Assuming so proceed to 4)
  4. execute the transition to Done
  5. check the status after 5s. if not back to In Progress go to Automation and check the logs for that rule
  6. share results here
Like Sigrid Schoepel likes this
Sigrid Schoepel August 31, 2020

Thanks. I can get it to work if I make a separate rule for each field, which bloats my rules, but it works.

0 votes
Florian
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 27, 2020

I am not familiar with next-gen as we use a server installation. However I think you do not need automation at all. Try to use a condition on the transition instead. The condition is actually checked before the transition is executed. When the condition does not match the user cannot initiate it at all. 

Suggest an answer

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

Atlassian Community Events