Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How can I assign a User Field using displayName in Jira Cloud Automation with Advanced Field Editing

Yavuz Selim Parmaksiz September 17, 2023

Hello Atlassian community,

I have a cascading select list that contains group names and users associated with these groups. I have identified the users by their displayName. What I want to do is assign a User field based on the selected user here. I'm planning to do this using Advanced Field Editing in Jira Cloud Automation. However, the issue is that due to GDPR, it only accepts the accountId. Is there a way for me to make this assignment based on displayName or to access the user's accountId through displayName?

Thanks in advance...

1 answer

0 votes
Bill Sheboy
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.
September 17, 2023

Hi @Yavuz Selim Parmaksiz 

I believe there are at least a couple of ways to do this:

  • slower, and always works: call a REST API function with a web request, and filter on the results to get the user and their accountId
  • faster, and may not work: assuming the user has previously been assigned to your field in an issue, you can find an example issue with JQL to populate a Lookup Issues action, and then reference them in your edit to set by accountId.  The reason this may not work is if the user has never been assigned.
    • For example JQL, let's assume the user has been assigned to an issue
    • project = myProjectName AND assignee IN ("{{issue.yourFieldWithDisplayName}}")
    • Then use the lookup results with {{lookupIssues.first.assignee.accountId}}

Kind regards,
Bill

Yavuz Selim Parmaksiz September 20, 2023

Hello @Bill Sheboy ,

I've used Webhook before, but I'm not sure how I should go about this process.
Can you explain the API call and then filtering the results in a bit more detail?

Kind Regards, Yavuz


Bill Sheboy
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.
September 20, 2023

There are several community posts on this scenario, including this one: https://community.atlassian.com/t5/Automation-questions/mentions-in-automation-smart-values-shows-accountid-instead-of/qaq-p/2188200

For more details / actions:

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events