Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Set assignee based on customfield in JSON for Automation

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

2 votes
Answer accepted

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

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}}"}
    }
}

@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}}"}
}
}

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
Community showcase
Published in Apps & Integrations

🍻🍂Apptoberfest Update: Upcoming Virtual Events 🎉

Hello Community! I hope you've been enjoying the 🍂Apptoberfestivities🍂 (I know I have!) The event is heating up next week with a series of virtual events that we're calling the 🍻🍂Partner App ...

476 views 5 18
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you