{
"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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.