Forums

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

How do I map a full user name to a userID in "Automation for Jira"

Robert Bischof August 19, 2019

I have a customer field (full user name) that I'd like to use to update the jira issue reporter.
I need something like getKeyForUsername()

I'd like to do something like

{
"fields": {
"reporter":{"displayName": "{{issue.requesterFullName}}"}
}
}

or

{
"fields": {
"reporter":{"id": "getKeyForUsername({{issue.requesterFullName}}).accountID"}
}
}

 

2 answers

1 vote
Victor Seger
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.
August 22, 2019

Hi Robert,

Automation for JIRA Support team member here.

It seems that you're trying to retrieve the accountId for a user. Is that correct?

If it is correct. Can you please tell me if this is a JIRA Cloud or JIRA Server instance?

In the meantime, have you took a look at this documentation? https://docs.automationforjira.com/knowledge-base/convert-usernames-to-user-account-id.html#converting-user-smart-values

Also, can you please share a screenshot of your rule, so I can have a better idea of how you are configuring this.

Looking forward to hear from you.

Cheers,

Victor

Victor Seger
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.
August 28, 2019

Hi @Robert Bischof ,

I've discussed this with our development team and we don't support what you're trying to achieve. But we've got an feature request open for this: https://codebarrel.atlassian.net/browse/AUT-725

It might be some time until we got to work on this due to some higher priorities on our backlog.

Hope it helps!

Cheers,

Victor

0 votes
Sebastian Krzewiński
Community Champion
August 19, 2019

Hi @Robert Bischof 

 

Did you try {{issue.requesterFullName.name}}?

Maybe this doc will be helpfull - https://docs.automationforjira.com/reference/users.html

 

Please let me know if it works :)

 

Regards,

Seba

Robert Bischof August 20, 2019

Thanks, but that didn't work.

{{issue.requesterFullName}} is just a string (ie. "First Last"), so it doesn't have a '.name'.

I need a way to look up the JIRA user using the full name, the way getKeyForUsername(String username) does.

Like Xochitl Lunde likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events