Forums

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

Populate a field depending on serveral components

Bent Möller
Contributor
August 28, 2025

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
    • only sets one department
  • 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?

 

1 answer

0 votes
Matteo Vecchiato
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 28, 2025

Hi @Bent Möller

Thank you for your "tricky" question :-) 

So... My approach could be, in order to less to more complex:

  1. If you have Assets, defining objects that represent the relations components - permissions - departments. Then search the relations through fields and automation
  2. Other ways, try to build a lookup table inside automation that map the relations between components and permissions (key:componentA, value: permission 1 | permission2 | permission 30). With automation, search the component, split the values with smart values and so on
  3. Replicate the data structure through work items and work item links. Work items for components, work items for permissions linked to components, work items for departments.

I hope it helps

Bent Möller
Contributor
August 29, 2025

Hey Matteo,

thanks for you suggestion. Ive never worked with Lookup Tables inside Automation before. I will see how that works, maybe this helps.

I also like the idea of your 3rd approach. This is actually something that could work well when implementing a role concept which might also be a good idea at this point.

I will see what works for me, thanks again.

Suggest an answer

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

Atlassian Community Events