Hi,
I am trying to create content property for storing some value on page creation. I'm able to create it but not able to use it into cql functionality.
I'm referring this blog.:https://blog.developer.atlassian.com/confluence-5-7-apis/
I have added following indexed schema in plugin.xml
<content-property-index-schema key="myindex-schema-module-key"> <key property-key="approval-plugin-data"> <extract path="approver" type="string" /> <extract path="approval-date" type="date" /> </key> </content-property-index-schema>
And, adding property by following ways:
Content content = contentService.find().withId(ContentId.valueOf("1234")).fetchOneOrNull();
JsonContentProperty property = JsonContentProperty.builder()
.content(content) .key("approval-plugin-data") .value(new JsonString("{"approver":"mjones", "approval-date":"2015-01-24"}")).build();
contentPropertyService.create(property);
I was able to fetch the page content property using REST call.
/rest/api/content/{id}/property/
It will show me page property whatever I added in java class.
but its not working inCQL.
content.property[approval-plugin-data].approval-date > now(-7d)
it returning no result found !!!