Automation with: for each customfield allowedValues

Pascal De Cort September 6, 2024

Goal: In an automation, want to create a new ticket for each customfield's option.

The custom field is a drop down selection where you can select the location. So each new ticket should have the value from location[0], next location[1],... => A1, A2,... so I can use it as a text variable in the ticket to create.

In the for each I created the {{location}} variable from {{issue.fields.customfield_10087.allowedValues}} which is the list.

New ticket should have the summary prepended with "A1: some description" so I thought it would have been {{location.value}}

Screenshot 2024-09-06 at 17.40.26.png

Tried following automation:

Screenshot 2024-09-06 at 17.41.39.png

{{issue.fields.customfield_10871.allowedValues}}
OR
{{issue.fields.customfield_10871}}

does not seem to start a for each loop and create tickets.

This is the custom field definition:

Screenshot 2024-09-06 at 17.35.24.png

Seems not to be possible?

1 answer

0 votes
Valerie Knapp
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 8, 2024

Hi @Pascal De Cort , thanks for your question.

Please can you share the audit log? I have a rule like this working in a customer instance and I was able to reproduce it in one of my test environments -

image.png

image.png

image.png

I hate to ask the obvious question, but are you sure the custom field is configured as a multi select? or that the allowedValues are permitting to store more than one choice?

If you can share the audit log, it would be helpful to see if there are any errors or indications for where to look for further troubleshooting.

Cheers

Pascal De Cort September 9, 2024

Hi Valerie, thanks for your answer.

To answer your questions:

- The custom field is not a multi select and nothing should be selected either. It should just iterate over the allowed values and use this to in the 'to be created task' as the selected option for that field. So from the screenshot I took of the allowedValues, I want to use the [].id value and create a child task for each possible option.

- screenshot of the audit log shows that the smart value was not existing. But I do have it in the 'issue type' as a field, however there was nothing selected since it should create child tasks for each option anyways.

Screenshot 2024-09-09 at 10.08.43.png

It seems to me that it just don't want to iterate over the options?

Thanks!

Suggest an answer

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

Atlassian Community Events