I am trying to do something similar to this How Do I Sync PR Reviewer and Jira Assignee? (atlassian.com). However instead of Assignee, I have a custom field called "Code Reviewer" (can be multiple users).
I am having a hard time setting the custom field value from the webhookData, it's expecting something like this format (I cannot pick the field from the list, so have to set it manually):
{
"fields": { "Code Reviewer": ??? }
}
I am not sure what the ??? should be, I tried many variations like this
"Code Reviewer":{{webhookData.pullrequest.reviewers.account_id.asJsonArray}} , I am also not sure webhookData is coming in as a json or xml ?
figured it out (also use the customfield id not the description of the field)
{"fields": {
"customfield_10129" {{webhookData.pullrequest.reviewers.account_id.asJsonObject("id").asJsonArray}}
}}
I also looked at this https://support.atlassian.com/cloud-automation/docs/jira-smart-values-json-functions/
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.