How can I search custom fields contains "A" character?

Swift Liao March 20, 2019

I found an interesting thing in JQL contains (~) search.

Let's say, I have a custom field called CRank. It is a text field.

Users may input A, A+, A-, B .... E .... into the text field.

I found we can search the issue contains B or C or ... ( CRank ~ C)

But, we got no result if we want to search for A (CRRank ~A)

 

I know I can change this field type to picklist but this will be a long list.

Just wondering if anyone experience this before?

 

Thanks

 

3 answers

1 accepted

1 vote
Answer accepted
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.
March 21, 2019

A is likely a stopword (a word that is not indexed) in the Lucene index, due to its common usage as an article (a, an, the). The stopword list can be modified, but I'd be hesitant to do so unless you really need this functionality. https://confluence.atlassian.com/jirakb/how-to-remove-stop-words-in-jira-s-lucene-indexing-836111705.html

Swift Liao March 21, 2019

Thank you @Payne . It solved the myth 

1 vote
Andrei Pisklenov _Actonic_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
March 21, 2019

Hi @SW 

One of the easiest way to search by word parts or combinations is to use regex expressions. You can try the add-on Power JQL.
And the request like:


issue in powerIssue("project=PSUP", "summary, description", ".*A.*")

Pay attention that the request may be heavy in terms of performance and you should always define subquery ("project=PSUP") to reduce regex checks.

0 votes
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 21, 2019

Hi Swift - welcome to the Community!

I have not seen it where it would not work with a specific letter. You might try using a wildcard for the A. You can find information here:

https://confluence.atlassian.com/jiracoreserver/search-syntax-for-text-fields-939937723.html

Suggest an answer

Log in or Sign up to answer