Forums

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

How to correctly write a quick filter containing a reserved keyword?

Deleted user September 21, 2021

Hi community,

We have Jira issues prefixed with [FE], [BE], [UX] etc. When we define a quick filter like so:

summary ~ "\\[FE\\]"

we can filter on [FE], and similarly, the other prefixes. However

summary ~ "\\[BE\\]"

does not seem to work. I'm thinking this may be caused by "be" being a reserved keyword. Anyone know how to make it work?

Thanks in forward!

4 answers

1 accepted

0 votes
Answer accepted
Suvarna Gaikwad
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.
September 21, 2021

@[deleted] Please try below. It works!

summary ~ "\\[UX\\]"

Deleted user September 21, 2021

Hi Suvarna,

Thanks for your response! I think I might have not been clear in my original question. Your example works indeed, but if you replace UX with BE it doesn't seem to work.

Like Nic Brough -Adaptavist- likes this
Suvarna Gaikwad
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.
September 21, 2021

@[deleted] After multiple attempts found this solution. After changing below configuration in JIRA, same syntax I mentioned above is working for reserved keywords as well such as BE. Please note you need to have system administrative access to do this change.

Administration -> System -> General Configuration -> Change Indexing Language to Other

PFB screenshot of search

image.png

Deleted user September 21, 2021

Thank you for your persistence @Suvarna Gaikwad ! This indeed seems to be the way it's supposed to be handled. For reference, I found your same suggestion in the documentation accompanied by the reason why this solution works: https://confluence.atlassian.com/jirasoftwareserver/search-syntax-for-text-fields-939938747.html#Searchsyntaxfortextfields-reservedReservedwords

I personally didn't want to change this setting just for my single quick filter so I went for the inverse instead, which seems to work out okay for my use case:

summary !~ "\\[FE\\]" AND summary !~ "\\[UI\\]" AND summary !~ "\\[UX\\]"
3 votes
Daniel Turczanski - JQL Search Extensions
Atlassian Partner
September 22, 2021

Hi @[deleted] 

JQL filtering is powerful, but you can hit its limits in more complex workflows.

You can filter in Jira on many issue fields. There's version filtering, project, system fields, and custom fields - all useful. What standard JQL is missing are functions for analysing the issue relations, dependencies, and, you guessed it, text patterns.

If you're serious about JQL, you should look beyond standard Jira.


The big mistake Jira users make is they forget about exploring the app marketplace. Our app, JQL Search Extensions, solves JQL limitations.


For example, in your quick filter, you can use the wildcardMatch JQL extension:

issue in wildcardMatch("summary", "[BE]*")


Alternatively, you may be able to work around any JQL reporting limitations with an Excel export. This doesn't work well if you want to create a quick filter for the board though.

So, if you're fine with apps, this is the solution for you.

2 votes
Nic Brough -Adaptavist-
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.
September 21, 2021

I don't think this is going to work - you're right in that the fuzzy search is picking up a hort word and hence ignoring it as matching too much (FE means Iron to me, UX an abbreviation, Be is a real verb).

I don't believe there's a way to change it.  But, it does beg a question of why you're using the summary like this - it's not intended for searching for identifiers.  Your FE, UX and BE are labels, not summary data, and I'd be tempted to try to use them as such.  Components might be most appropriate (especially if the issues are all in one project), labels would be another good place for them, and you could simply use a select-list or radio-button field for it as well.  All of those would give you an instant and exact search without needing to be clever in the query.

Deleted user September 21, 2021

Thanks for your reply!

I fully agree that the alternative you describe is the way to go. However, in practice we all work with a lot of other people and if, after repeated attempts, the consensus ends up on this approach, best we can do is to make it work at least.

If you have any pointers to solving the problem in its current state I'd be much obliged. I'm not a Jira guru, but perhaps it's possible to add a component automatically when the summary contains [BE]?

0 votes
Payne
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.
September 21, 2021

Here is a way to accomplish your goal. It takes a bit of time, but if you just need to run it once in a while, it may work for you. Run a JQL query and limit the number of results as much as you can to get below the export maximum (perhaps something like project = "My Project" and created > startOfYear() ), and then export the results as CSV. Open the file in Excel, etc. and create a column with the formula =FIND("[BE]",D2) (change D2 to whichever column contains the Summary field) and copy it down all the rows by double-clicking the square in the bottom right of the cell. Then, sort the rows by that column. All containing your string will then be grouped together.

Suggest an answer

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

Atlassian Community Events