Set assignee based on customfield in JSON for Automation

Darryl Vezina January 23, 2018

Hi there,

I'm trying to do the following:

When issue is created based on conditions I set, I want to assign the ticket automatically to the "Reporting Manager", which is a custom field (customField_10683).

So, assignee = $customField_10683 is what I want to do.

It seems the only way to do this in Automations with JSON in the "Edit Ticket" action, but I can't wrap my head around the syntax.

Can anyone help?

Thanks,

Darryl

 

1 answer

1 accepted

3 votes
Answer accepted
Huw Evans
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 23, 2018

Hey Darryl,

No need to touch any JSON, we can do this very easily using a Smart Value:

Screen Shot 2018-01-24 at 11.41.01 am.pngThis should work so long as the custom field is storing the user key.

Cheers,

Huw

Darryl Vezina January 23, 2018

Thanks Huw.  That works great and is much easier than the JSON I did manage to get working, which was:

{
    "fields": {
        "assignee": { "name": "{{issue.customfield_10683}}"}
    }
}

Janine Crawford February 15, 2021

@Huw Evans and @Darryl Vezina 

I could really use a second pair of eyes and some advice please.

I have tried a number of different ways to achieve exactly what you list above, but each time the assignee field remains unassigned, despite the audit log showing success in the first case and error in the second, with the following notes:

1) issue already assigned to user

- configuration:

Assign issue > Smart Value > {{issue.customfield_10926.key}}

Assign issue > Smart Value > {{issue.customfield_10926.name}}

2) Error assigning issues CC-33: (Specified user does not exist or you do not have required permissions)

Assign issue > Smart Value > {{issue.customfield_10926}}

Assign issue > Smart Value > {{issue.customfield_10926.displayName}}

 

I've even tried the advanced route with JSON, and using variations of the above, with no success, the assignee field remains unassigned and the audit log shows issues edited successfully:

{
"fields": {
"assignee": { "name": "{{issue.customfield_10926}}"}
}
}

Jiří Leník
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 20, 2021

Hi Janine,

 

i had just the same trouble. The solution was: 

 

{
"fields": {
"assignee": { "id": "{{customfield_10074.accountId}}" }
}
}

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events