We're implementing the Connector for Salesforce and Jira from Service Rocket (now Appfire) in Jira Cloud.
We're setting up this automation that will pull the value of a people field from Salesforce and update the reporter or assignee people field in JIRA.
However, we want to apply one modification: we don't want to update the reporter or assignee people field. Instead, we want to update a custom people field we've created in our project.
We setup the automation as designed and have successfully updated the reporter field.
When we attempt to swap out the reporter field as the target of the "Edit Issue" update with our custom people field, we get an error "data was not an array (customerfield_123456)" where 123456 is our custom field's ID.
The following is the Edit Issue Advanced Field editing / Additional Fields json script we're using (which is standard other than the reference to our custom field name):
This fails:
{
"fields": {
"Custom - field":{"id":"{{webhookResponse.body.accountid}}"}
}
}
This works:
{
"fields": {
"reporter":{"id":"{{webhookResponse.body.accountid}}"}
}
}
I know the field reference "Custom - field" is correct because the error message in the automation audit log returns the custom field ID (not the name).
the error message "data was not an array (customerfield_123456)" sounds to me like you did not provide an array of users but only one user instead.
Is it possible that your user field is a user field which allows to define multiple users in there? There's a custom field for single users and also one for multiple ones.
If this is the case, you can modify your request to send an array instead:
{
"fields": {
"Custom - field": [ {"id":"{{webhookResponse.body.accountid}}"} ]
}
}
This would always replace all users in the user field, there are also other options to only add that user. You can check out this example of the components field.
Hope that helps,
Matthias.
@Matthias Gaiser _K15t_ this was exactly the issue - such a simple change :). Now this automation is working!!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Doug,
This is Majid @ Exalate.
My troubleshooting approach would be to first run an API call (postman/curl) and test if you are able to set it ok. Then, maybe try to hard code a user in your config to see if that works, and then finally, move on to dynamically doing this from a SF transaction.
At Exalate, we abstract away these complexities by employing a simple scripting solution, and the troubleshooting of this becomes really easy as well.
Hope it helps.
Thanks
Majid
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.