Automation: Trigger an action with field condition environment
Asked by Matthieu SIGOILLOT:

Hi Atlassian Community,

I try to set up a new automation rule that change a due date depending of 2 conditions:

- the Issue Type  
- the Environment

First condition is OK.

But for the second, it doesn't work.

Environment is the default field that I customized with 4 values: 'Prod', 'Staging', 'Testing' and 'Dev'.  

I want to trigger my rule only when 'Environment equals to Prod'.

So I made this but it's no working:   
Field= 'Environment'  
Conditions= 'equals' (I also tried 'contains' but it didn't work)  
Value= 'Prod'  
Match case (and I also tried without)  

![Capture d?e?cran 2024-07-29 a? 11.36.11.png](/t5/image/serverpage/image-id/338481iCC850AA6801EE18F/image-size/large?v=v2&px=999 "Capture d?e?cran 2024-07-29 a? 11.36.11.png")

Audit gives:   
Issue condition  
The following issues did not match the condition.

Here a screenshot of the global Rule.

![Capture d?e?cran 2024-07-29 a? 11.38.49.png](/t5/image/serverpage/image-id/338482iDD7D300DF40EF30F/image-size/large?v=v2&px=999 "Capture d?e?cran 2024-07-29 a? 11.38.49.png")

If anyone as any idea why the 'Environment' Condition is not working, it would be very much appreciated!

Thanks.

Regards,

Matthieu


Answers:
author: Anandhi Arumugam
body: Hi [@Matthieu SIGOILLOT](/t5/user/viewprofilepage/user-id/4368903) I think the Environment field that you have chose in this condition is the System provided one and not your custom field that your created. Please go further down in the drop down and choose the right field.

Hope this works for you!

comments: author: Matthieu SIGOILLOT
body: Hi [@Anandhi Arumugam](/t5/user/viewprofilepage/user-id/5552450)

I look in the drop down but there is no other "Environment" field:

![Capture d?e?cran 2024-07-29 a? 14.05.06.png](https://community.atlassian.com/t5/image/serverpage/image-id/338519i39880F0CB87651C3/image-size/large?v=v2&px=999 "Capture d?e?cran 2024-07-29 a? 14.05.06.png")

Only the one I selected:

![Capture d?e?cran 2024-07-29 a? 14.05.51.png](https://community.atlassian.com/t5/image/serverpage/image-id/338520i8DD738F3F0CB3A5C/image-size/large?v=v2&px=999 "Capture d?e?cran 2024-07-29 a? 14.05.51.png")


author: Anandhi Arumugam
body: Hi [@Matthieu SIGOILLOT](/t5/user/viewprofilepage/user-id/4368903) Could you tell me what type of custom field is 'Environment'?

Please check if the field is on the screen and also has value on the issue that you are testing against.

Also, when you choose the field in the screen given above, do you see the drop down to choose the value from? like the one below.  
![Automation - Environment.png](https://community.atlassian.com/t5/image/serverpage/image-id/338550iB39AF59FEBA158A7/image-dimensions/407x402?v=v2 "Automation - Environment.png")


author: Matthieu SIGOILLOT
body: Hi [@Anandhi Arumugam](/t5/user/viewprofilepage/user-id/5552450)

This is the suggested field "Environment" that I used.  
Here it's:  
![Capture d?e?cran 2024-07-29 a? 17.33.33.png](https://community.atlassian.com/t5/image/serverpage/image-id/338586i6DDAAFFEE516BE3B/image-size/large?v=v2&px=999 "Capture d?e?cran 2024-07-29 a? 17.33.33.png")

And I don't have any Dropdown in my Rule.

I have to specify a value (empty text field):

![Capture d?e?cran 2024-07-29 a? 17.35.58.png](https://community.atlassian.com/t5/image/serverpage/image-id/338587i97E588002685481C/image-size/large?v=v2&px=999 "Capture d?e?cran 2024-07-29 a? 17.35.58.png")

So I guess this is my problem but I don't see what I'm doing wrong...


author: Anandhi Arumugam
body: Hi [@Matthieu SIGOILLOT](/t5/user/viewprofilepage/user-id/4368903) Looks like the field type here is Cascading Select (Parent and Child option), which is not supported under Issue Fields Condition. Instead, please use the IF or Else: Add Condition Block and use Smart values to get the field values.

Example:

![Automation-Environment Cacade.png](https://community.atlassian.com/t5/image/serverpage/image-id/338593i3DADD8F2E0D1AE64/image-size/large?v=v2&px=999 "Automation-Environment Cacade.png")


author: Matthieu SIGOILLOT
body: [@Anandhi Arumugam](/t5/user/viewprofilepage/user-id/5552450) thanks a lot!!

Sorry, I didn't use your condition but instead I created a new "Environment" field with only Dropdown option (not cascading with parents and children).

So now I do have the dropdown in the condition and... it works perfectly.

Thanks again :)

Have a great day!


author: John Funk
body: Hi Matthieu

Can you share the audit log, AND the issue you used?

comments: author: Matthieu SIGOILLOT
body: Hi [@John Funk](/t5/user/viewprofilepage/user-id/7148)

The audit log is not very helpful.  
I tried to add an Action log but didn't help (I guess I'm not doing it correctly).

![Capture d?e?cran 2024-07-29 a? 14.08.07.png](https://community.atlassian.com/t5/image/serverpage/image-id/338523i579469F108F376EB/image-size/large?v=v2&px=999 "Capture d?e?cran 2024-07-29 a? 14.08.07.png")

The Issue used:

![Capture d?e?cran 2024-07-29 a? 14.10.24.png](https://community.atlassian.com/t5/image/serverpage/image-id/338528i2ABF9144BBEC8124/image-size/large?v=v2&px=999 "Capture d?e?cran 2024-07-29 a? 14.10.24.png")


Tags: automation

cloud

jira-cloud