Forums

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

More filtering options

Jon
Contributor
August 3, 2018

I was wondering if when doing a filter in the jira query system you can add ways to filter for issues. for example I have a custom field which is a number (totally random number) that I would like to be able to sort by null or not null but jira only lets me search by the exact figure. Another thing I would like is if we could search by contains. for example if the data was a 10 digit number and we wanted to search by lets say 4 numbers and type those four numbers in and click contains to get all possible results. 

 

THANKS! 

 

jon

1 answer

0 votes
Carlos Garcia Navarro
Community Champion
August 3, 2018
Carlos Garcia Navarro
Community Champion
August 3, 2018

Actually, while I was thinking of wildcards, the number fields don't support them in JIRA (they only support =, >, <, >= and <= operators). Does this custom field need to be a number, or could it be a string? (CONTAINS (~) works on text fields.)

Jon
Contributor
August 3, 2018

actually the field is a free text. for example the issue has a field of "EBKG00079437" and my staff would usually search for it by the last 3 or 4 digits. I tried "*437", *437, and 437* but don't get any result. any other ideas? 

 

thanks

 

jon

Carlos Garcia Navarro
Community Champion
August 3, 2018

Did you try the CONTAINS operator(~)?

Carlos

Jon
Contributor
August 3, 2018

I did. "Booking No." ~ "437" returns nothing as well. 

Carlos Garcia Navarro
Community Champion
August 3, 2018

I'd try without quotes: "Booking No." ~ 437

Jon
Contributor
August 6, 2018

see below, here is my issue page. I'm trying to search for booking by using the last 4 digits. I have added one of the custom field filters and trying to search for booking ending in 3500 but nothing comes up. how exactly would you do it. 

 

Capture.PNG

Carlos Garcia Navarro
Community Champion
August 7, 2018

Hi Jon, sorry for the late reply.  Thanks for the picture.  We can try wildcards with the limitation that they are not supported at the beginning of the string. Does the Booking number always start with the same character (or group of characters)? If not, do you know at least what the first character is for the items you're searching?  If yes, can you try "Booking No." ~ "RICU*437*" (I'm assuming that the first characters are RICU). Let me know if that works.

Jon
Contributor
August 7, 2018

It does not work exactly. the prefix works, but the later half does not filter, instead it shows all results still even if it shouldn't. I also tried ricu*600* and "ricu*600*" which gave no result or same results. I saw in the article you sent ricu*600 should work but instead it pulls everything.. I have cloud verion does that matter?Capture.PNGCapture2.PNG

Jon
Contributor
August 10, 2018

hi do you have any ideas about this? 

Jon
Contributor
August 17, 2018

hi carlos, do you have any further ideas about this? your insight is greatly appreciated. 

 

jon

Carlos Garcia Navarro
Community Champion
August 18, 2018

Hi Jon, sorry it took so lon (I'm in the middle of moving to a new house and it's taking  forever...).  I'll experiment myself a little bit later but I was curious if something like what's reported in this bug may be affecting you: https://jira.atlassian.com/browse/JRASERVER-6187?page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel&showAll=true

Are you using JIRA Server (and if so, what version?) or Cloud?

Thanks,

Carlos

Carlos Garcia Navarro
Community Champion
August 19, 2018

Disregard my question, I know you're using the Cloud instance from a previous comment. I do think something is not right in the way JIRA is running the search. I also found a number of other issues from other people reporting issues when running queries with wildcard or the contains operator. Maybe this issue is related: https://jira.atlassian.com/browse/JRACLOUD-67967.

Do you have Script Runner? I believe with Script Runner you can use regex.

Carlos

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events