I'm populating Jira Entity properties (issues) with Jira's API and I have a forge app to help index the fields so they are searchable.
Submitting a request:
```
curl -X PUT -H "Content-type: application/json" https://thatapp.atlassian.net/rest/api/3/issue/TEST-01/properties/deployments -d '{"tag":"v0.0.1","date":"2023-05-26", "repo" : "GH", "environment" : "production"}'
```
Using a forge APP configured as:
```
modules:
jira:entityProperty:
- key: "jira-issue-deploymentlist-indexing"
entityType: "issue"
propertyKey: deployments
values:
- path: tag
type: text
searchAlias: deploymentTag
- path: date
type: date
searchAlias: deploymentDate
- path: environment
type: text
searchAlias: deploymentEnvironment
- path: repo
type: text
searchAlias: deploymentRepo
app:
id: ari:cloud:ecosystem::app/test
```
And using the following TQL:
```deploymentRepo~"GH"```
Works!
The problems is that I plan to store multiple "deployments" into that property so the payload will look like:
```
curl -X PUT -H "Content-type: application/json" https://thatapp.atlassian.net/rest/api/3/issue/TEST-01/properties/deployments -d '[{"tag":"v0.0.1","date":"2023-05-26", "repo" : "GH", "environment" : "production"}]'
```
OR
```
curl -X PUT -H "Content-type: application/json" https://thatapp.atlassian.net/rest/api/3/issue/TEST-01/properties/deployments -d '[{"tag":"v0.0.1","date":"2023-05-26", "repo" : "GH", "environment" : "production"}, {"tag":"v0.0.2","date":"2023-05-26", "repo" : "GH", "environment" : "production"} ]'
```
How can I query this data using JQL?
my first guess was using something as
```issue.property[deployments]["*"].repo~"GH"```
No luck!
This is just one scenario, but being able to query this data will unlock other use cases for me.
Thanks you!
I think you might really need to ask this in the Atlassian Developer Community.
I found a related discussion here:
JQL find all issues that have a custom property (no matter what content)
With this solution:
Indeed, the problem is that extractions on arrays of objects are not possible. I don’t know what it is you’re trying to do, but perhaps the Bulk set issue property API would be helpful? With it, you can e.g. set your property to something else only on issues that don’t have that property set to any…
Now, that discussion is from 2020, so perhaps something changed, but yeah, this really falls into Developer territory.
Thanks a lot for pointing me to the right place, @Darryl Lee
I've submitted the question there but I still waiting for "approval" from a staff member, once the question is created I will post the link here in case it helps someone in the future.
Cheers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Tuncay Senturk _Snapbytes_
Not really :) By the end of the day, I reached the conclusion it was not supported.
Here's the link for the question in the developers' community:
https://community.developer.atlassian.com/t/jql-query-for-issue-property-containing-array/69805
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oh, that's disappointing. Nevertheless, I appreciate your efforts.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.