Search on a custom filed

dennish_dcsorg_com January 22, 2019

(Cloud) I'm trying to create a search filter based on issue status and the text of a custom field. Can I do that? every time I try something I get no results, but I'm looking at the field and there is matching text in the field.

 

Here is what I have:

 

status = Open AND "sequence" ~ "8.8.8.123"  

 

The custom field sequence has that exact # in it yet the search turns up empty.

1 answer

0 votes
Scott Theus
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.
January 22, 2019

@dennish_dcsorg_com,

Since it looks like "Sequence" is the name of the field you  should remove the quotations from it. Also, make sure that the field is one of the following types:

  • Free Text Field (unlimited text)
  • Text Field (< 255 characters)
  • Read-only Text Field

 

Hope this helps, 

-Scott

 

Edit: it needs to be one of those types because you are using the CONTAINS operator, here's a link to the operator types if you need it:

https://confluence.atlassian.com/jirasoftwarecloud/advanced-searching-operators-reference-764478341.html

 

dennish_dcsorg_com January 22, 2019

I must be missing something. To be accurate the actual custom field name is:

pos version (I copied the wrong filed in my original post)

the data in that field is say 8.8.8.123 (or any other text, it is a text field, single line).

So it doesn't like

status = Open AND pos version ~ "8.8.8.123"

The one below shows no results

status = Open AND "POS version" ~ 8.8.8.123

Scott Theus
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.
January 22, 2019

hmmm...does it work if you replace the "~" with "=" ?

Also...verify the syntax of the field name; it may not like the space between POS and Version. (eg: the "Affected Version" field' syntax in Jira is "affectedVersion" 

 (source: https://confluence.atlassian.com/jirasoftwarecloud/advanced-searching-fields-reference-764478339.html)

-Scott

Scott Theus
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.
January 22, 2019

BTW...your second search should have quotes around the text of the field; that is needed for the "~" operator.

Try

status = Open AND "POS version" ~ "8.8.8.123"

 

dennish_dcsorg_com January 22, 2019

even if I try:

 

"POS version" ~ "8.8.8.123" , it doesn't return any results (but no error), yet I go into the issue it's there, I even copy/pasted the value in the field to rule out a typo.

Don't care if it's open at this point.

Scott Theus
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.
January 22, 2019

I'm still leaning towards either the space in the field name or the field does not like the ~ operator. I'll ping the other Champions and see if they've any other theories.

-Scott

dennish_dcsorg_com January 22, 2019

Well, I deleted "POS Version" and created a field called "Build" and now I'm getting a different result (and it's more complex)

Now when I search it finds the build field....however.....I have a post function that copies the field from the issue to any subtask created. If I manually enter the field info and search on it I get the subtasks listed in my search, if I let the post function add it in (which it does perfectly) the subtasks aren't listed when I perform a search.

Scott Theus
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.
January 22, 2019

I think you may have stumbled on a bug:

https://jira.atlassian.com/browse/JRACLOUD-67704

 

Edit: Your tag does not indicate if you are server are cloud...I'll check to see if there is a server version of this bug. 

dennish_dcsorg_com January 22, 2019

We are cloud (I noted that in the original post). According to that link it was fixed in late 2017 if I'm reading it correctly.

dennish_dcsorg_com January 22, 2019

I think I found the issue. I moved the post function for populating the field before indexing the DB to sync. Now it appears to be working as it should.

Scott Theus
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.
January 23, 2019

Good news! I'm glad you were able to find it. 

Suggest an answer

Log in or Sign up to answer