Dear community,
- I have 2 projects (Project A and Project
where the customfield_1 is set in Project A. - customfield_1 is a Select List (single choice) and has two options.
- In Project B, I have customfield_2, which also is a Select List (single choice) with two options
- I want to use an Automation to create a new issue in Project B and set customfield_2 based on the selection of customfield_1 in Project A using "Additional fields" and JSON, essentially mapping the values from one Select List
- In my initial tests I managed to do this by using conditional logic and the if-else statements, but I was only able to do so by typing the option of the customfield_1, which might be changed by other administrators in its exact wording.
I used something like
"customfield_2": { "value": "{{#if(equals(triggerIssue.fields.customfield_1.value, "Option 1 name in Project A"))}}Option 1 Name in Project B{{/}}{{#if(equals(triggerIssue.fields.customfield_2value, "Option 2 name in Project A"))}}Option 2 Name in Project B{{/}}"
Is there a way to reference the options of a custom field based on the option id instead of their name? I know how to find the option id in the custom field settings but I don't know how to do the mapping and didn't find yn documentation
If anyone has a clue, please let me know 