Forums

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

Custom 'user search' algorithm for 'User Picker (Single Choice)' customfield.

bhimashankar_poddar
Contributor
October 8, 2024

Hi everyone,

As per the project requirements, I’ve created a custom field of the type 'User Picker (Single Choice)' for the 'Assignee' field.

This custom 'Assignee' field is available on the 'Create' screen, allowing users to search & select an assignee.

I've also applied filters so that only users from a specific user group are displayed.

The field supports user selection either by clicking the dropdown arrow to view the user list or by typing in the assignee's name to quickly filter matching users.

However, the issue arises when searching for users by typing their names. The search works only if the name is typed in a required format.

For example, names in the user groups are stored as 'Poddar, Bhimashankar', including additional data like 'id' and 'alias'.

If I type "Poddar, B..." it works, but if I omit the comma, it returns 'No matches.'

Screenshot 2024-10-09 103600.pngScreenshot 2024-10-09 103629.png

I think, even if missing comma does not separate the word due to which it says 'No matches' but still it should match characters instead of complete words...

I would like to customize this search logic to allow users to search by 'id' and 'alias' as well.

If anyone has any ideas or suggestions, I’d greatly appreciate your help.

Thank you

1 answer

1 vote
John Funk
Community Champion
October 8, 2024

Hi @bhimashankar_poddar 

First let me say it is horrible idea to create a custom field that is the same name as an existing field - a system field or another custom field for that matter. 

Second, you will not be able to modify how Jira does the search on names in that custom picker field. How many potential names are in that field? 

Also, what if you controlled who could be put in the Assignee field based on the Assignable User permission in the permission scheme for the project? Don't just have a value of Any Logged in User for that permission, but base it on project roles - or even the same group you are using for the custom field you created. 

bhimashankar_poddar
Contributor
October 25, 2024

Thank you @John Funk  for your response and apologise for delay in responding back.

I understand it's not good idea to customise the user search algorithm but wanted to check the possibility anyway.

Thanks once again. 

Like John Funk likes this
John Funk
Community Champion
October 26, 2024

The bad idea is having multiple fields with the same name, not the algorithm. And there are other questions above for you to answer. 

bhimashankar_poddar
Contributor
October 26, 2024

Hi @John Funk 

Yes, I meant similar customfield names instead of algorithm itself...

for further more details

Second, you will not be able to modify how Jira does the search on names in that custom picker field. How many potential names are in that field? 

>> Probably 20-30 users

Also, what if you controlled who could be put in the Assignee field based on the Assignable User permission in the permission scheme for the project? Don't just have a value of Any Logged in User for that permission, but base it on project roles - or even the same group you are using for the custom field you created. 

>> filters are added for "Assignee" customfield based on user groups, so. that only selected users will be displayed

Like John Funk likes this

Suggest an answer

Log in or Sign up to answer