Automate User Field to capture user named in Summary

Derek Tonin April 22, 2023

We're looking to capture users named in Summary's in a custom field. The user name is input from a API call, so its very reliable in being the same as our User Display Names.

What I don't know how to do is capture the user name and then use it to then set the custom user field to that user.

Our Summary format is like this, with User Name always at the end of the Summary:
Triggered Alert - Escalation in New York - USER NAME

 

Thanks!

1 answer

1 accepted

2 votes
Answer accepted
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.
April 22, 2023

Hi @Derek Tonin 

When you need to set a user field, you will need the accountId.  To get that value, you could call the REST API to get all users, and use the match() or other text functions to then find the accountId from the web request response.

Kind regards,
Bill

Darryl Lee
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 22, 2023

Hey @Derek Tonin -

There's a terrific example of how to grab a user name from the Description field and use the REST API just as @Bill Sheboy was talking about:

Like # people like this
Derek Tonin April 24, 2023

Thanks this is really helpful! It appears though that since we're on Jira Server, the Create Variable action is unavailable to us. Is there any way to do this without that step?

Derek Tonin April 24, 2023

Hey guys,

Thanks for pointing me in the right direction. With some tinkering, I figured out how to make this work in my instance of Jira server.

I ended up skipping the step of creating a variable and inserting the match function directly into my API call. 

It also turned out that my instance of jira server doesn't return accountID on the API call, but using the user key worked out fine.

Cheers!

Like Bill Sheboy likes this
Darryl Lee
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 24, 2023

Oh, my bad for not seeing you're on Server! Yes, the calls are a little different.

And YES you don't need to create a variable and in the olden days (Pepperidge Farm remembers), it was often more reliable to skip them.

Like Derek Tonin likes this

Suggest an answer

Log in or Sign up to answer