Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to use currentUser() function in custom field

Parth Bharadiya August 17, 2022

Hello,

 

How can I use currentUser() function in custom field with multi-select?

 

Please refer the screenshot for an error I am receiving.

 

Screenshot from 2022-08-17 19-26-32.png

3 answers

Suggest an answer

Log in or Sign up to answer
0 votes
Parth Bharadiya August 17, 2022

Probably, I have got the solution. I will change the custom field type(i.e create another custom field) to User selection and then I will be able to use currentUser() without any issue. I will update here once I can achieve this. 

0 votes
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 17, 2022

Hi @Parth Bharadiya 

CurrentUser() return the profile ID of the user:

profileIF.png

So you have to enter as values these IDs from all your users. When I used my username, or name I couldn't get the results. Only when I used my profile ID it provided with correct results.

Parth Bharadiya August 17, 2022

Hi Alex,

I tried your suggestion, but it did not work. I had first added the profile ID to allowed list values. Then, I checked the filter again but did not work.

 

But anyway, even if this solution works by following all the steps correctly, I will have to enter profile IDs into `developer` options. That means, during Jira ticket updation, the `developer` pick list will show the user IDs instead of names and it will not be understood by anyone.

 

Do we have any other solution? Objective is to get list of matching `developer` based tickets based on current user's name.

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 17, 2022

@Parth Bharadiya can't really say that I understand your business requirement. I know that a user who transition the issue, or make an action to it, has to choose from a list of developers. What common do these developers have? E.g.

  • Are they specific developers (front, back, db)?
  • Do they work on the same project?
  • Is this list dynamic (changing everyday, or "static" consists of 5 specific devs)?
0 votes
Samuel Gatica
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 17, 2022

Hi @Parth Bharadiya 

Please try the following:

= currentUser()

Parth Bharadiya August 17, 2022

Not working with `=` as well.

Samuel Gatica
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 17, 2022

Does the field is a user picker type?

The currentUser() function will only work on users' type fields.

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 17, 2022

@Samuel Gatica currentUser() will return the user's profile id. Of course its primary use would be with user type field, but as I stated in my answer, you could use it with other fields as well (e.g. text, single select, multi select).

Like Samuel Gatica likes this
Samuel Gatica
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 17, 2022

Correct, but then the ID must be in the text, single select or multi select, otherwise the value will not match.

currentUser() does not return the name of the user but the ID

TAGS
AUG Leaders

Atlassian Community Events