Forums

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

How to get customfield value that matches with the value of an object attribute?

Deleted user February 1, 2023

I have a Insight custom field "Product DEV" set up in a project screen. I need to configure it so that it returns products according to the country of Insight custom field "Company(SUPP)" (customfield_13313) value of issue. I have a "Prices with serial track" (Id=442) object type with an attribute called "Country". Country can be as an example "Finland" or "Norway" etc.

So, when the user is creating a new issue, he will choose a company from Insight custom field "Company(SUPP)" (which has a Country associated to it). He will then click on Product DEV dropdown menu and that should only show products that belong to the country of the previously selected Company(SUPP).

Here is my configuration for: Product DEV (customfield_13602):

 

  • Object Schema: MyProject
  • Filter Scope (IQL): objectType in objectTypeAndChildren(442)
  • Filter Issue Scope (IQL): "Country"."Name" = ${Company(SUPP).Country}
  • Filter Assign Scope (IQL): Not configured
  • Make Filter Assign Strict: false

 

I have tried these filter issue scopes, such as:

 

  • "Country"."Name" = ${Company(SUPP).Country}
  • "Country"."Name" = ${customfield_13313.Country}
  • "Country"."Name" IN (${customfield_13313.Country${0}})

 

The result of any of these is that in issue creation Product DEV tells me there are no matches. What might cause the filter to not work?

1 answer

0 votes
PD Sheehan
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 7, 2023

You want to make sure you are not comparing apples to oranges.

My read is that "Country"."Name" will be the string value of the Name attribute on the Country object.

And  ${customfield_13313.Country} will be an object representing the county.

Is that correct?

Maybe you can share a bit more about your two object types, their list of relevant attributes, and what type those are

 If the Country attribute on objectType 442 is an object reference and the Country attribute on the object type associated with Company(SUPP) is also an object reference then one of the following IQL might work.

Compare object to object:

  • "Country" = ${Company(SUPP).Country}
  • "Country" = ${customfield_13313.Country}
  • "Country" = ${Company(SUPP)${0}.Country}
  • "Country" = ${customfield_13313${0}.Country}

Compare string to string:

  • "Country"."Name" = ${Company(SUPP).Country.Name}
  • "Country"."Name" = ${customfield_13313.Country.Name}
  • "Country"."Name" = ${Company(SUPP)${0}.Country.Name}
  • "Country"."Name" = ${customfield_13313${0}.Country.Name}

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events