How can i add filter with two items to filter
Asked by Sushma M P:

issueFunction in linkedIssuesOf("\\"Vehicle Type\\" = \\"ABC AND XYZ\\"" , "relates to") AND project = AAA AND type = "Vehicle Issue" AND labels in (US) ORDER BY Rank ASC.

This query seems to be green but the query doesn't do what we want it to do


Answers:
author: Trudy Claspill
body: Hello [@Sushma M P](/t5/user/viewprofilepage/user-id/5204619)

Welcome to the Atlassian community!

What do you want it to do?

How do the results not match your expectations?

comments: author: Sushma M P
body: Thanks for the response!

I am unable to have list of vehicles with ABC and XYZ . there are some missing vehicles i see without filter

Once i apply filter it wont come under this board which suppose to appear


author: Trudy Claspill
body: What type of field is the "Vehicle Type" field?

Is it a selection list field? If so, does it allow only one value to be selected or multiple values? Is the value you want literally "ABC AND XYZ" or are you looking for issues where the field is "ABC" or it contains "XYZ" or it must contain both "ABC" and "XYZ"?

This part of the filter

issueFunction in linkedIssuesOf("\\"Vehicle Type\\" = \\"ABC AND XYZ\\"" , "relates to")

...is going to get you issues that have a "relates to" link to other issues where the Vehicle Type in those other issues is set to the value you specified ("ABC AND XYZ" literally).

That list will be reduced by the other elements of your filter

project = AAA AND type = "Vehicle Issue" AND labels in (US)

... so that the results set contains only the issues that match those three criteria.

If that is not what you want, please describe in detail what you want. Providing examples of issues that do and do not match what you would want in the results set would also be helpful.


author: Sushma M P
body: it must contain both "ABC" and "XYZ"

..is going to get you issues that have a "relates to" link to other issues where the Vehicle Type in those other issues is set to the value you specified ("ABC AND XYZ" literally).

That is right, this is what i wanted to filter out.

But unfortunately results are not as expected


author: Trudy Claspill
body: What type of field is the "Vehicle Type" field?


author: Sushma M P
body: String


author: Trudy Claspill
body: Are "ABC" and "XYZ" separate substrings within a larger string?

Can you provide a screen image showing an example of this field and the content it would hold, plus identify the substrings for which you would want to search?

If Vehicle Type is a text field and you want issues where that text field contains the substrings "ABC" and "XYZ", then the JQL syntax would be

```
"Vehicle Type" ~ "ABC" and "Vehicle Type" ~ "XYZ"
```


author: Sushma M P
body: issueFunction in linkedIssuesOf("\\"Vehicle Type\\" = \\"ATG-B (Linux)(IDC6-7181) OR ATG-B (QNX)(IDC6-7182)\\"", "relates to") AND project = ADASVEHX AND type = "Vehicle Issue" AND labels in (US) ORDER BY Rank ASC

This is how i am giving the query but i still see some of the ATG-B vehicle wont list when i apply this filter


author: Trudy Claspill
body: Can you confirm that "Vehicle Type" field is a String type field by showing us the Custom Field configuration for it? Jira documentation indicates that the "=" operator doesn't work for Test and Paragraph fields. That makes me suspect that your Vehicle Type field is not a text field.

Without quotes of backslashes, please show us the values that exist in the field for issues you would want in your results. Then also show us the substrings you want to use in your search.

You can search a text field for two different substrings with the syntax you used. I am assuming that ATG-B (Linux)(IDC6-7181) is one substring and ATG-B (QNX)(IDC6-7182) is a separate substring vs. looking for one substring that includes both of those and also literally includes OR

**ATG-B (Linux)(IDC6-7181)**

or

**ATG-B (QNX)(IDC6-7182)**

versus

**ATG-B (Linux)(IDC6-7181) OR ATG-B (QNX)(IDC6-7182)**


Tags: cloud