Import or Migrate Field Data
In case you are migrating or importing the field data via CSV or JSON, the following steps should help you reach your goal.
CSV
To import/migrate Extension Search Fields via CSV, use the following syntax within the appropriate column:
....,"{""value"":""actual value"",""id"":""actualID""}",...
A real example could look like this:
...,"{""value"":""Carter Conner"",""id"":""108""}",...
JSON
If you want to import an issue from JSON, use the following syntax to change the values:
{
"fieldName": "Your Fields Name",
"fieldType": "com.atlassian.forge:ari:cloud:ecosystem::extension/92050003-c2a5-4f5c-875c-fc06e3303d6c/363449ad-5c22-4677-86b3-cac59cf66deb/static/search-field",
"value": "{ \"value\": \"Actual Value\", \"id\": \"12345\" }”
}
Automation
Clone an Issue and Set a Single-Select Extension Search Field Value
Use this example if you want to clone an issue and simultaneously set the single-select Extension Search Field (e.g., customfield_10001) to the same value as in the source issue:
{
"fields": {
"customfield_10001": {
"value": "{{ issue.customfield_10001.value }}",
"id": "{{ issue.customfield_10001.id }}"
}
}
}
Copy Data from a Single-Select Field to a Multi-Select Field
Use this example if you want to copy the value of a single-select Extension Search Field (customfield_10001) to a multi-select Extension Search Field (customfield_10002):
{
"fields": {
"customfield_10002": {
"values": [
"{{ issue.customfield_10001.value }}"
],
"ids": [
"{{ issue.customfield_10001.id }}"
]
}
}
}
Copy Data from a Multi-Select Field to Another Multi-Select Field
If you want to copy the values of a multi-select Extension Search Field (for example, customfield_10xxx) to another multi-select Extension Search Field (for example, customfield_10002), you can use the following JSON syntax in your automation rule. With .asJsonStringArray function, you ensure that the values and IDs are correctly formatted as JSON arrays:
{
"fields": {
"customfield_10002": {
"values": "{{ issue.customfield_10xxx.values.asJsonStringArray }}",
"ids": "{{ issue.customfield_10xxx.ids.asJsonStringArray }}"
}
}
}
Note:
If the multi-select field is not required and can be empty, using.asJsonStringArraymay result in an invalid JSON error when the field has no values.To prevent this, you can first create a variable in your automation rule to retrieve
{{ issue.customfield_10xxx.values }}, check if it is empty, and then set the variable either tonullor to the JSON object shown above.You can then use the variable in your advanced field editing JSON like this:
CODE"customfield_10002": {{ myCustomMultiSelectVariable }}
This approach ensures that copying between multi-select fields works reliably even when the source field is optional or empty.