The jira:entityProperty
module requests that fields of an entity property are indexed by Jira to make the fields available to query in JQL.
See Entity properties in the Jira Cloud platform guides for more information about Jira entity properties.
Property | Type | Required | Description |
---|---|---|---|
key |
| Yes | A key for the module, which other modules can refer to. Must be unique within the manifest. Regex: |
entityType | string | The type of the entity. Allowed types are:
The default value is | |
propertyKey | string | Yes | The key of the entity property from which the data is indexed. |
values | PropertyValues | Yes |
The list of fields in the JSON object to index with the type of each field.
The maximum number of elements to index is 30. This means that all your |
Defines an entity property to be indexed by Jira. An entity property value is a reference to a JSON object, which also defines its type.
Property | Type | Required | Description |
---|---|---|---|
path |
| Yes | The path to the JSON data to index. The path is the key of a flattened JSON object with '.' as the delimiter. For example, for the JSON The path may refer to an array type. In this case, the 'type' field should be the type of the elements in the array. See the specification for indexing 'blockedIssues' in the example. |
type | string | Yes | The type of the referenced value:
|
searchAlias | string | The name used for this property in JQL. |
This example uses an issue entity property with the key of stats
, which is defined like this:
1 2{ "comments": 5, "statusTransitions": 6, "lastCommenter": "<account-id>", "blockedIssues": ["10000", "10001"] }
Using the jira:entityProperty
module you request that fields of an entity property are indexed.
1 2modules: jira:entityProperty: - key: "stats-property" entityType: "issue" propertyKey: stats values: - path: comments type: number searchAlias: commentCount - path: statusTransitions type: number searchAlias: transitionCount - path: lastCommenter type: user searchAlias: lastCommenter - path: blockedIssues type: string searchAlias: blockedIssues
Now, indexed data is available to search in JQL, as in this example:
1 2commentCount = 5 issue.property['stats'].comments = 5 lastCommenter = currentUser() blockedIssues[0] = "10000"
Similarly, you can request indexing for other entity types, such as user
and project
.
1 2modules: jira:entityProperty: - key: "user-property" entityType: "user" propertyKey: user-stats values: - path: comments type: number searchAlias: commentCount - key: "project-property" entityType: "project" propertyKey: project-stats values: - path: pages type: number searchAlias: pagesCount
In a JQL search, you access these properties using a prefix.
1 2project.pagesCount = 5 project.property['project-stats'].pages = 5 assigne.commentCount = 10 reporter.property['user-stats'].comments = 10
Rate this page: