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

Filter asset field by another asset field attribute

Guido Menardi June 30, 2023

I want to filter the results of an asset field of an issue using a value stored in an attribute of an asset selected on another asset field.

Example:

  • Assets :
    1. Location
    2. Customer (with attribute type object pointing to Location)
    3. Team (with attribute type object pointing to Location)
  • Issue fields:
    • Asset field issueCustomer : Filter scope (AQL): objectType = "Customer" (cf_1)
    • Asset field issueTeam : Filter scope (AQL): objectType = "Team" (cf_2)
    • Asset field issueLocation : Filter scope (AQL): objectType = "Location" (cf_3)

When a Customer A (with a Customer.Location = Barcelona) is selected, Asset field 2 must be filtered showing only Teams with Team.Location = Barcelona.


It works when I use the Asset field issueLocation (customfield_10000) storing a copy of the Customer.Location like:

  • Filter issue scope (AQL): object HAVING outboundReferences(objecttype = Location AND objectId = ${customfield_3})

I want to filter referencing directly to the field issueCustomer. Something like:

  • Filter issue scope (AQL): object HAVING outboundReferences(objecttype = Location AND objectId = ${customfield_1.Location})

2 answers

1 vote
Kai Becker
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 2, 2023

Hi Guido,

thanks for your question.

Just to be sure: Does the Location attribute store a link to another object or is it just a text attribute with the location name?
From what I can see now, everything else looks good.

Guido Menardi July 3, 2023

Now is a link to another object, just to be sure I'm using the same objectId in the selection. But I've tried also Text and Select, but nothing works.

Kai Becker
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 3, 2023

Thanks for the feedback @Guido Menardi 

Could you please try the following constellation for issue filter scope:

Location=${customfield_1}

There should be no need for outbound Reference config with this.

Guido Menardi July 3, 2023

This doesn't work.

It's OK if I use the ${customfield_3} pointing to Location, but ${customfiled_1} is pointing to Customer (who has an Attribute with Location).

Kai Becker
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 3, 2023

I'm not a hundred percent sure if I'm getting it right, but what I meant in terms of configuration is:

  1. custom field 1 
    1. Filter scope (AQL) --> pointing to object
    2. issue Filter scope (AQL) --> empty
  2. custom field 2
    1. Filter scope (AQL) --> pointing to object
    2. Filter scope (AQL) --> the aql from my last comment

Here are some screenshots of a working configuration I have:

Screenshot 2023-07-03 at 16.37.30.pngScreenshot 2023-07-03 at 16.39.09.png

Type would be your Location. Hope this makes it clearer.

Guido Menardi July 5, 2023

It's not the same.

You are entering Keyboard to filter your Hardware Catalog by the attribute: Type

Using your example, I need to filter the Hardware Catalog by an attribute of Keyboard, different than the label.

It has no sense in this example, but I need to filter by Layout wich is an attribute from Keyboard.

Let's say that the "User" has a language and I want to use this User.language to filter Suported devidces. Something like: Layout=${"User.language"}.

0 votes
mgokhan February 22, 2024

Hi @Guido Menardi

 
Did you find any solution to get "Layout=${"User.language"}."?

I also need this function


Regards.TY:)

Guido Menardi June 18, 2024

No way.

Suggest an answer

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

Atlassian Community Events