I'm trying to json_encode the following PHP array while following the bulk import custom field values example.
$values = 'AAA\nBBB\nCCC';
$data = array(
'FIELD_FCS' => $contextId,
'FIELD_IMPORT_VALUES' => $values,
'canned-script' => 'com.onresolve.scriptrunner.canned.jira.admin.BulkImportCustomFieldValues'
$data = 'scriptParams='.json_encode($data, JSON_HEX_AMP | JSON_HEX_APOS); //the options will be useful when I use real values
The $values is formatted to have each value delimited by a slash. This format is required to use the API. When I try to json_encode the $data array and send it to the API, it simply adds 1 dropdown option of AAA\nBBB\nCCC, instead of creating 3 separate options.
I'm not sure how to force it to create 3 values instead of just 1. I tried increasing and decreasing the number of slashes, but to no avail.
Hello Community! I hope you've been enjoying the 🍂Apptoberfestivities🍂 (I know I have!) The event is heating up next week with a series of virtual events that we're calling the 🍻🍂Partner App ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events