How to use text (not JSON) entity properties in JQL?

Yuriy Marchenko July 14, 2020

Hi everyone,

 

We've been using some entity (project, issue) properties, having text values in there worked perfectly fine, the conditions in the descriptor work fine, the REST API, etc.

Now the time has come to add a webhook for issue updates and we need to use the entity properties we have (with text inside, not JSON) to filter out once we don't care about.

The problem is the documentation explains how to index the properties with JSON values...

Does anyone happen to know how to index such fields or is there a way to use them for JQL search without indexing?

Any information helps, thank you!

2 answers

1 vote
Rhys Diab _Agile Docs_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
August 8, 2020

I've encountered this problem too.

I resorted to saving everything that needs indexing in JSON. 

Not having to store these properties as JSON to use them in JQL searches would be helpful.

Yuriy Marchenko August 10, 2020

Thanks Rhys, it's good to know I'm not alone in this situation 🤗

0 votes
Veronique DUFOUR July 14, 2020

@Yuriy Marchenko could you add an example of a property and an example of the king of JQL you're trying to use?

Yuriy Marchenko July 14, 2020

Properties:

- Issue property (key: "com.railsware.SmartChecklist.checklists") with some text value e.g. "Hello, World!"

- Project property (key: "com.railsware.SmartChecklist.isDisabled") with "true" value

 

I can't find in the documentation how the JQL should look like so these are just guesses:

`issue.property[com.railsaware.SmartChecklist.checklists] is empty`

`com.railsaware.SmartChecklist.checklists is empty`

`project.property[com.railsware.SmartChecklist.isDisabled] is empty`

I'm looking for issues of projects with blank/empty "com.railsware.SmartChecklist.isDisabled" property

Veronique DUFOUR July 14, 2020

@Yuriy Marchenko I think it will look something like this
project.property["com.railsaware.SmartChecklist.checklists"] is empty

I'm not sure about how it should be written between the ""

Yuriy Marchenko July 14, 2020

"com.railsware.SmartChecklist.checklists" is an Issue Property, we can ignore it, sorry for combining 2 examples.

The main goal is to find issues in projects that have "com.railsware.SmartChecklist.isDisabled" project-property empty or null, or not "true"

❌ project.property[com.railsware.SmartChecklist.isDisabled] is empty

❌ project.property[com.railsware.SmartChecklist.isDisabled] is null

❌ project.property[com.railsware.SmartChecklist.isDisabled].value is empty

I'd keep on guessing if I only knew it's possible :D 

Veronique DUFOUR July 14, 2020

Sorry for my mistake ...
I'm only guessing on my side too but I see that the "" are not in your last post.
Maybe something like this?
project.property["com.railsware.SmartChecklist"].isDisabled is empty

Veronique DUFOUR July 14, 2020

I think this could help

Making searchable entity properties 

SearchableEntityProperties.png

Yuriy Marchenko July 14, 2020

@Veronique DUFOUR Thanks for trying :)

Unfortunately, this is the very article I've mentioned in the question, it describes how to index for searching property with a JSON value, not text.

In the example, they got something like

{
  content: "Hello, World!"
}

as the "tasks" property value. 

If only I could easily migrate the property values we use from

"true" 

to, say, 

{ value: "true" }

but I can't.

Using the REST API for such a migration will help, but I will use it only if I find no other way around.

Like Pavel Pavlovsky likes this

Suggest an answer

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

Atlassian Community Events