how can I search for a issue that has "component" fied that "include" a string ?

ribas
Contributor
January 20, 2025

I tried following JQL search that is working :

project = XXXX and type = YYYY and component = "[ART] toto"

but I would like to seach all issues that has component field that contains "toto" string.

for instance :

 

project = XXXX and type = YYYY and component ~ "toto"

but then I have this error :

"The operator '~' is not supported by the 'component' field."

 

what would be the solution to search issues with a field that has one string inside its different values ?

3 answers

1 accepted

2 votes
Answer accepted
Gaurav Arora
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 20, 2025

Hi @ribas ,

As Robert mentioned, you might need to utilize a third-party app for this case.

For instance, if you are using Adaptavist Scriptrunner in your Data Center environment, you can leverage the componentMatch function. This function allows you to search for components that meet specific patterns.

Example:

component in componentMatch("^web.*")

This query would identify all issues related to web components.

You can find more details here -> Match Functions - Adaptavist Documentation 

If you find this suggestion helpful, please accept the answer so that others can benefit as well!

Best regards,

Gaurav

ribas
Contributor
January 21, 2025

thank it worked with 

componentMatch

it seems this function is available without  JQL booster pack.

I don't understand why...

but what if the field is not component but a user defined field ?

Like Gaurav Arora likes this
Gaurav Arora
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 21, 2025

@ribas 

In case it is any other user-defined field, you can use below function.

issueFieldMatch (subquery, fieldname, regexp)

Example.

issueFunction in issueFieldMatch("project = JRA", "description", "ABC\\d{4}")

Notes by app vendor:

  • You need to double the backslashes.
  • The function searches for the reg exp anywhere within the field. To match the entirety of the field, use ^ and $, e.g. ^ABC\\d{4}$.

All such match functions are available at this page -> match-functions 

BR,

Gaurav

3 votes
Hannes Obweger - JXL for Jira
Atlassian Partner
January 20, 2025

Hi @ribas

to the best of my knowledge, components don't support partial text matching in native JQL. You'll need extra tooling for this.

For a native solution, I could imagine to use Jira Automation to sync component name(s) into a custom field of type single-line text, and then search on the custom field. Obviously, this will complicate your setup quite a bit.

Alternatively, you can always export your data and perform the search e.g. in Excel.

Lastly, if you're open to solutions from the Atlassian Marketplace, you'll have a number of options available. E.g., there's a number of apps that extend JQL, or provide their own, more powerful search mechanisms. I'll add more information below.

Hope this helps,

Best,

Hannes

Hannes Obweger - JXL for Jira
Atlassian Partner
January 20, 2025

... and to expand on my last point: If you're open to solutions from the Atlassian Marketplace, your use case would be easy to solve using the app that my team and I are working on: JXL for Jira.

JXL is a full-fledged spreadsheet/table view for your issues that allows viewing, inline-editing, sorting, and filtering by all your issue fields, much like you’d do in e.g. Excel or Google Sheets. It also comes with a number of advanced features, including support for (configurable) issue hierarchiesissue grouping by any issue field(s), sum-ups, or conditional formatting - as well as the ability to filter any issue field via text search.

This is how it looks in action:

text-filtering-components.gif

(For more advanced use cases, you can also use regular expressions.) Once you've narrowed down your list of issues, you can work on your issues directly in JXL, trigger various operations in Jira, or export your issues with just one click.

Any questions just let me know!

0 votes
Robert DaSilva
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 20, 2025

Hi @ribas , unfortunately wildcard search is not natively supported by Jira on Data Centre. 

 

You will need to install a 3rd party app from the Atlassian Marketplace to enable a wildcard search. Here are a few that I was able to find quickly:

Hope that helps!

Robert

Suggest an answer

Log in or Sign up to answer