Forums

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

Assets object CF filter returing wrong value

Chad Jackson
Contributor
February 9, 2023

So the issue I am having is my AQL filter for my CF  is objectType= "Users"  Allowing for search by Name and allowing multiple selections.  my user picker field works I can search by name and add multiple values. Although the value added is the Label "Account Name"

 

I am unable to change the label from "Account Name"  everything I try to reference the value of Name returns nothing.

I feel I am close with this query just not getting it to work

objectType= "Users" AND Label= "Name" 

2023_02_09_09_40_33_Window.png

1 answer

1 accepted

0 votes
Answer accepted
Suzi Firth
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.
February 9, 2023

Hi @Chad Jackson,

Can you please share a screenshot of your custom field configuration?

 

It sounds like you are trying to achieve something like this, am I correct? Your drop down isn't showing the attributes you want?

ice_screenshot_20230210-093339.png

 

Suzi

Chad Jackson
Contributor
February 10, 2023

Correct, although the value (Attribute) I want displayed is Name. The value (Attribute) being populated in my dropdown is the Label  Attribute "Account Name". Due to the Account name being used as a unique value I am not able to change the Label of this objectType.

2023_02_10_10_41_55_Assets_object_s_field_configuration_Jira.png

Suzi Firth
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.
February 12, 2023

Hi Chad,

Your "Object Attributes to display on issue view" is blank. You need to select Name here as well.

Here's the config for my same drop down I have on my issues (results in my previous comment). I only have 1 object type in my Assets schema so didn't need to do a Filter scope, but I did filter issue scope the search results by the reporter on the ticket is equal to User on Asset.

Capture.JPG

 

I had similar issue when I was trying to automate selecting the returned search result. Here's a link to my community post that someone else helped me to resolve. Now that I'm re-reading this, all of my custom fields on my issues that return values from Assets always show the label (Asset ID) plus any additional attributes I selected. Like my screenshot in my previous message, the main text is the label and the smaller text below are extra attributes I selected to show. 

https://community.atlassian.com/t5/Jira-Service-Management/Automatically-add-filtered-search-result-to-custom-field-on/qaq-p/2084890#M110302

I also wanted to select a different attribute on the object but it would never allow me. I ended up having to make a new object schema for this, just so I could select the field I wanted. Probably not the news you want to here if you are unable to change the label on your schema but you can definitely get there with this.

Suzi

Chad Jackson
Contributor
February 16, 2023

Hey Suzi,

 

Appreciate the info. I had opened a case with Atlassian as well and here is what they responded with.  Seems I will need to find another way around our needs for now.

 

Hello Chad.

Thank you for the feedback.

I have checked that further I was able to reproduce the same scenario internally. I am afraid to say the only option to change the value which will be displayed on the form is changing the attribute Label in the Assets.

The support for Assets objects in forms is still a new feature that was rolled out completely by 16 January 2023. We are aware that there are new improvements to be released and using customer feedbacks, the possibility to change the value to be displayed in the forms is one of them. We have a feature request about this topic.

JSDCLOUD-12222

I would like to recommend you to vote and keep watching this feature request to be aware when it will be released and you can use that as a native feature.

The workaround that I recommend is to use a dropdown field with Data Connection. Using the data connection on the field you will be able to return a JSON from Assets users and you will have all the information from that. This way, you will be able to pick only the desired field to display on the forms.

Create, edit, test, or delete data connections for forms

Rest API to get users: https://developer.atlassian.com/cloud/assets/rest/api-group-aql/

The reference with Assets will need to be done using automation, there is a action named "Lookup objects" which you will use the dropdown field value to get the assets from the user. This automation will get all the assets and you can add this on the ticket.

Like Suzi Firth likes this
Suzi Firth
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.
February 16, 2023

Hey Chad,

Ohh that sucks. I had a feeling the system was liming options given my similar experience.

I ended up creating a new schema for the field I required so I could set as label, and then link that object to the employee object so it was visible in both screens.

Cheers,

Suzi

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events