{
"fields": {
"QC": {{assignee.key.asJsonObjectArray("id")}}
}
}
is what I currently have and thanks to the increbibly lacking documentation I can't figure out how to store the current assignee in a custom people field.
This is a People field added to all issue types which isn't Reporter or Assignee and it has no default users and the Tickbox for `Restrict to a single user` is not turned on.
Please help
Hi @Julez
The assignee has the "accountId" attribute and the user field set is looking for "id". So a work-around is to grab the field that is there, convert to the array, and then substitute the attribute name. Perhaps like this:
{{assignee.asJsonObjectArray("accountId").replaceAll("accountId", "id")}}
Kind regards,
Bill
Thanks Bill
I still get the very helpful
Error while parsing additional fields. Not valid JSON.
when using that code.
The only code I have in the advanced field is
{
"fields": {
"QC": {{assignee.asJsonObjectArray("accountId").replaceAll("accountId", "id")}}
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, I was clearly thinking of something else when I first answered...assignee is not a list (and so does not use array functions). This is better:
{
"fields": {
"QC": { "id": "{{issue.assignee.accountId}}" }
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your help Bill.
The correct syntax turned out to be:
{
"fields": {
"QC": [{ "id": "{{issue.assignee.accountId}}" }]
}
}
I can't believe how incredibly ill-documented these advanced features are. We just need a wiki.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I submitted a suggestion to make the smart value/automation documentation much more like the one for the REST APIs, with everything on one page, context indicators (by product: Cloud, Server/DataCenter, JSM, Admin), examples that can be downloaded and imported, and links to KB articles for known gotchas.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Join us June 26, 11am PT for a webinar with Atlassian Champion Robert Hean & Loom’s Brittany Soinski. Hear tips, stories, and get your burning questions answered. Learn how Loom makes training and enablement easier. Don’t miss it!
Register today
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.