Forums

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

Lookup issues based on custom user picker field

Geza Kukoda
Contributor
March 10, 2022

Hey there,

 

I have a request type for leaving employees where I use a user picker (custom field) to define the employee who is leaving.

When the ticket is created I would like to have an automation which links all the issues where this user was the reporter to this leave ticket.

I have tried to use the Lookup issues function to list all the tickets where this defined user was the reporter but it didn't accept the filter I have put it.

reporter = {{issue.Employeename}}

Employeename supposed to be the custom field with user picker type. The Validate query is even greyed out.

There is some hint on the page that I should use user IDs.

 

I would be thankful for any help.

 

Best,

Geza

2 answers

2 accepted

0 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.
March 10, 2022

Hi @Geza Kukoda 

If Employee Name is the name of your field, please try this for the Lookup Issues JQL

reporter = {{issue.Employee name.accountId}}

And the "Validate query" option is grayed out because your JQL is based upon dynamic information the rule supplies at run-time, and it cannot be checked as the rule is defined.

Kind regards,
Bill

Geza Kukoda
Contributor
March 11, 2022

Hey Bill,

 

Thanks for the prompt solution. It worked. :)

 

Best,

Geza

Like Bill Sheboy likes this
0 votes
Answer accepted
Piyush A (STR)
Community Champion
March 10, 2022

Hi,

Probably to get the custom field value, you might need to use like below:

 

${issue.fields.customfield_10051}  or ${issue.fields.customfield_10051.accountId}  

here put the custom field id 

(get it from <url>/rest/api/2/issue/issue key/ and search for the data of the field and get the custom field id)

 

also, kindly go through https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/

Geza Kukoda
Contributor
March 11, 2022

Hey Piyush,

I am working with the automation page on the settings and not with the API. But sure thing the .accountID was the missing point.

Thanks for replying.

Best,

Geza

Like Piyush A (STR) likes this

Suggest an answer

Log in or Sign up to answer