Set assignee with accountid

Lars Swart
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.
June 28, 2023

Hi, 

I use the clone issue function and want to set the assignee in the cloned ticket to be a specific user.

I dont want to select by name, but by a smart value. Its a little bit complicated and there are lookup tables involved. But in the end, we get a fix expression.

So I used SET and the expression

[~accountId:633309da2e31a5dcfa14948c]

 

But it doesnt work. The cloned issue is still not assigned.

What is wrong with my syntax?

3 answers

1 accepted

1 vote
Answer accepted
Fredrik Dahl June 28, 2023

Hi Lars

Without knowing how your lookup table looks, but here is an example of using a key value and set it as a smart value for the assignee.

I think you should skip the [~accountId: completely and only use the hashed user id

lookup-table.pngclone-issue.png

1 vote
Sachin Dhamale
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 28, 2023

@Lars Swart ,

 

Can you try to add this in smartvalue in aditional fields refer this

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

0 votes
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 28, 2023

Hi Lars,

Can you share the actual rule/code? 

Lars Swart
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.
June 28, 2023

Hi here is the lookup table.

seg1.png

 

And in the clone function I set these smart value to the asignee field.

seg2.png

 

I tried the same smart value in an e-mail. And there I get the correct value which is defined in the lookup table.

 

But it seems to be the wrong format for the set function in general.

Like John Funk likes this
Fredrik Dahl June 28, 2023

Try to use only the hashed user id without [~accountId:]

Like # people like this
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 28, 2023

Yes, was going to recommend the same as Fredrik. 

Like Lars Swart likes this
Lars Swart
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.
June 28, 2023

You were both right. Just the ID get's the job done. Thank you guys :-) 

Like John Funk likes this
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 30, 2023

Great! Glad you got it working. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events