Forums

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

JQL how to search for entity properties? Do the properties need to be indexed? If

Rich Scire
Contributor
January 19, 2023

I've created project properties in a couple of different formats and would like to use that property in JQL. The examples below all failed to return any issues:

  • What is the correct JQL syntax to search for issues in projects that have prop1 = prop1_value?
  • Do the properties need to be indexed? If so, how and when?
  • Is the search capability only available to apps?

I create project property 'prop1', which, when getting the value via REST looks like this::

{
    "key""prop1",
    "value""prop1_value"
}
I then tried the following JQL statements:
  • project.property[prop1] is not EMPTY
  • project.property[prop1].value is not EMPTY
  • project.property[prop1] = prop1_value
  • project.property[prop1] = "prop1_value"
  • project.property[prop1].value = prop1_value
  • project.property[prop1].value = "prop1_value"
  • project.property[prop1].value ~ prop1_value
  • project.property[prop1].value ~ "prop1_value"

I then created another property of the form:

{
    "key""prop2",
    "value": {
       "name""prop2_value"
    }
}

 Then I tried all the same tests as above but adding .name e.g. project.property[prop2].name = "prop2_value"

 

1 answer

1 accepted

2 votes
Answer accepted
Mikael Sandberg
Community Champion
January 19, 2023

In order to use entity properties in JQL it has to be indexed, and if I read the document correctly you have to do that either via an Atlassian Connect app or Forge app. See Making searchable entity properties for more information.

Suggest an answer

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

Atlassian Community Events