Forums

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

How to query issues with a text field in a set of value?

clr2021 November 17, 2021

During the import the status of some issues was not mapped correctly, therefore  I need to select a set of issues based on a value in a short text (old system identifier) but I cannot use the operator IN as it is not supported. 

So I would like to search in "OLD VALUE KEY" IN (KEY1,KEY2,KEY3)"  but IN is not supported for text fields. How can I solve this? Suggestions and ideas welcome.

 

THX

1 answer

1 accepted

1 vote
Answer accepted
Tessa Tuteleers
Community Champion
November 17, 2021 edited

Hi @clr2021 , 

you can query text fields with the ~ operator only. 

So you code might be: 

textfield ~ "KEY1" OR textfield ~ KEY2

You need to use OR because the ~ operator will always search for the complete string passed along, and not parts of it.
But it is important to note that the order of the words does not matter. 

E.G: 

textfield ~ "I am KEY1"

Wil match: 

  • I am KEY1
  • I am KEY1 and key 2
  • I KEY1 and am key 2

but not: 

  • I KEY1
  • I KEY1 and key 2
  • ...

 

Hope this helps! 

-Tessa

clr2021 November 17, 2021

Thanks, I was hoping that I could avoid repeating all the times the field name, as they are quite a few entries. But it seems that I will have to go that way.

Like Tessa Tuteleers likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events