I want to automate a permission process. Each permission has it's own component. After an approval is completed, I want a custom field (or labels, doesn't matter) to have certain values added based on the chosen components.
The tricky part is that there are many components and 90% of them are done by the same department and just a few are done others. Writing EVERY component down in the automation is not an option.
So what I need is:
If Component contains Permission 1 or Permission 2, then add Department A to custom field.
If Component contains Permission 3, Permission 4 or Permission 5, then add Department B to custom field.
If any other Permission is listed (Like Permission 6 up to Permission 100), then add Department C to costum field.
So if someone requests Permission 1, 4 and 30, then the field should contain all 3 Department. If only Permission 30 is request, the field only contains Department 3. If permission 5 and 30 are requested, the field contains Department 2 and 3 and if Permissions 1 and 5 are requested, the field contains Department 1 and 2 (and so on).
Now the part that doesnt work for me is to add Department 3 if there is any other department that wasnt defined before.
What I tried:
- Use an If Else putting Department 3 in the Else at the very bottom.
- only sets the first that is true and ignores anything below
- Use an advanced branch on {{issue.components.name}} (variable name {{component}}) and then check if {{component}} equals the Permissions
- Use standalone Ifs
- Works for every Department except Department 3 as I am not able to find a Condition that fits "if Component has anything that wasnt defined above"
Does anyone have an idea?