User Picker custom field
Asked by Chris C.:

I have multiple assets objects types that all have an attribute called "Assignment" of type "User".

I have (2) custom fields:  
"Single User Picker" of type "Single User Picker" with ID customfield_10091  
"PO - Assigned objects" of type "Assets Objects" with ID customfield_10088  

customfield_10091 has no filtering on it, it shows everyone and that's exactly what I want.  
customfield_10088 references the correct schema for Physical Objects (laptops and hard drives, etc etc) but I'm struggling with the Issue Scope.   
"Assignment" = {{customfield_10091}} is what I have set currently, but I've been changing this around trying to figure out how I can select a user in 10091, and filter ALL the objects in the CMDB that are assigned to that user. If I pick myself, and I know the filter should return 2 objects of different types (1 real laptop, 1 fake headset), yet it always returns no results.  

If I change the Filter Issue Scope to something like   
"Assignment" = "my.real@email.com"   
Well then it finds exactly (2) objects.   

If I change it to   
"Assignment" = "firstName lastName" (real names of course)   
Then it finds the same (2) objects again.  

If I change it to   
"Assignment" = "reallylongatlassianaccountID"   
it finds nothing.  

OK so it will work if you use a matching display name, or email address, but not the long ID.  
Cool then I'd expect it to work with   
"Assignment" = {{customfield_10091.emailAddress}}  
or  
"Assignment" = {{customfield_10091.displayName}}  
Yet it does not.  

I have an open ticket with Support but it seems they're still struggling to understand what I'm trying to do.  
Anyone here have any ideas?


Answers:
author: Joseph Chung Yin
body: [@Chris C_](/t5/user/viewprofilepage/user-id/5008638)

Hi Chris:

Are you referring to JIra/JSM custom fields based on your Assets schema objects or the usage of AQL syntax in JQL filter queries?

Please provide a bit more information, so we can assist you further.

Best, Joseph Chung Yin

Jira/JSM Functional Lead, Global Technology Applications Team

Viasat Inc.

comments: author: Chris C.
body: This is regarding JSM custom fields where one is based on an Assets schema, and the other is a regular Single User Picker. I want to use the value/user selected in the Single User Picker as the Assets Object Filter Issue Scope filtering whatever thing.

Basically, I want to select "Chris Cook" in the Single User Picker field, then the Assets Objects field will display all Assets objects of any object type where this statement is true "Assignment" = "Chris Cook" where "Chris Cook" is a smart value from the Single User Picker selection.


author: Chris C.
body: I used this on a different Request Type where the Assets Object field used  
"Assignment" = currentUser()  
And that worked exactly like you'd expect it would. Here if I replace currentUser() with a smart value it doesn't work at all.


author: Chris C.
body: ![2024-04-25 13.38.39 dharbor.atlassian.net 8bf7923d43e8.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/320643i6224AF6BB9CD6A6A/image-size/large?v=v2&px=999 "2024-04-25 13.38.39 dharbor.atlassian.net 8bf7923d43e8.jpg")  

This is how it currently looks.


Tags: cloud

jira-service-management

jira-service-management-cloud