You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
I need to update a People custom field via Automation for Jira. Specifically, I want my custom field ("Work It" or "customfield_10150") to be set to a specific user, "service.center".
service.center is defined as:
{
}
Unfortunately, the Automation for Jira's Edit Issue action does not find my custom field, "Work It", in its dropdown. Therefore, I need to leverage the Additional fields textbox (i.e., JSON). In that textbox I've added:
{
"fields": {
"Work It" : { "id":"5e7a27d154fa650c3bc1b488" }
}
}
When I run this automation I get the following error:
Note: I have validated that "Work It" is indeed "customfield_10150"
What am I doing wrong? Thanks!
@pbrdebruijn, this error is typically because the JSON is not correct when running the rule.
For fields that take an array of single field object:
{
"fields": {
"Multi User Customfield": {{issue.parent.Multi User Customfield.accountId.asJsonObjectArray("id")}}
},
}
This webiste has some examples of how to use the JSON functions to ensure your values are compiled correctly: https://support.atlassian.com/jira-software-cloud/docs/advanced-field-editing-json/
This is where the function details are: https://support.atlassian.com/jira-software-cloud/docs/smart-values-json-functions/
Thanks for the response. I was able to solve this need leveraging the array syntax even though this user field is single user constrained. The working JSON is:
{
"fields": {
"Work It" : [ { "accountId":"5e7a27d154fac50c3bc1b488" } ]
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That is odd that it works; I have a similar issue with single entry people picker but I am assigning the value (what Paul has as "5e7a..." from a text field (custom):
{
"fields" : {
"Work It" : [{"Username" : "{{issue.customfield_123456.value}}" }]
}
}
And this gets (if [ ] are surrounding): "data was not an object (Work It))"
If I remove the [ ] it gets success but does not update Work it.
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.