I have an automation as follows
Trigger- Value changed for customfield_123 for Create and Edit Issue
If customfield_123 contains A
then add component - A
else - If customfield_123 does not contains A
then remove the component - A
else - If customfield_123 contains B
then add component - B
else - If customfield_123 does not contains B
then remove the component - B
.
.
else - If customfield_123 contains C
then add component - C
else - If customfield_123 does not contains C
then remove the component - C
The problem is when I create a ticket customfield_123 as A, or remove the A, it works as expected.
Now when I am creating a new ticket or editing the an existing ticket with customfiled_123 as B, it is not considering the else - If customfield_123 contains B condition. Same thing is select the value as C, it is not checking the condition for C
It is just checking the FIRST 2 if condition and not the others. Is there any restriction on how many if-else we can put in an automation.
I do not want to create multiple automation, is there a way this can be achieved.
Thanks for the help.
Hi @Harsh
What problem are you trying to solve by synching these two fields when they appear to have the same value? Would using just one value work?
Kind regards,
Bill
Hi @Bill Sheboy
The problem is I have to update the component based on the custom field value. And if any of the custom value is not added in the ticket, and delete the respective component, attach to it.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I understood that was what you were trying to accomplish with the automation rule.
Instead I was wondering why not use Components or the custom field, but not both. What value does your team get from setting both fields to the same value?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Bill Sheboy
I'm just using one value which custom field.
I'm setting the components value based on the custom field. That's the requirement
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Harsh I realize your question is over a year old - did you find a solution? My thought was to have separate, sequential IF statements:
If customfield_123 contains A
then add component - A
else remove the component - A
If customfield_123 contains B
then add component - B
else remove the component - B
If customfield_123 contains C
then add component - C
else remove the component - C
Would this have worked for you?
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.
Thanks for the response. Got the point.
But I want remove the component based on the custom field.
For example - on create I choose custom field A. It adds component A.
But now let's say I realised that I wanted to B, instead of A. I edit the value to B. So in this case, I have to check the custom field again, for the previous value was A or not. Same for any value.
The custom field cannot be empty. It will have some value. if the value of custom field doesn't contain any of A, B,C then component should he empty. So I have to check based on value. I am using advanced compare condition to check the condition
I'll try your logic. And update you.
Thanks
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.