Using project automatisation I would like to copy the value of a custom single-choice field (cf_11003) to another custom field. This custom field is of the type multi-choice (cf_11600) and has the same values as cf_11003.
I tried using:
{
"fields": {
"Kunden-Projekt": {
"value": "{{issue.parent.fields.customfield_11600.value.asJsonStringArray}}"
}
}
}
With this code I get the following error:
(data was not an array (Kunden-Projekt))
Any advice on how to solve this issue?
Dear @Thorsten Witt ,
I have no clue about Automation, but probably this helps:
Selecting a single option for a multi select field would look like this in pure JSON:
{
"fields": {
"customfield_11600": [
{
"value": "Project X"
}
]
}
}
I guess that
{{issue.parent.fields.customfield_11600.value.asJsonStringArray}}
will return
[
{
"value": "Project X"
},
{
"value": Project Y"
}
]
But when you substitute this in your upper example, it can't work.
Can you output
{{issue.parent.fields.customfield_11600.value.asJsonStringArray}}
in a log file for debugging? And from the logic, don't you need to use this instead?
{{issue.parent.fields.customfield_11003.value.asJsonStringArray}}
So long
Thomas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.