user
(User): The current user. Always available and equal to null
if the request is anonymous.app
(App): The Connect app that made the request. Available only for authenticated requests made by Connect Apps (read more here: Authentication for Connect apps).issue
(Issue): The current issue. Available only when the issue is provided in the request context object.project
(Project): The current project. Available only when the project is provided in the request context object.sprint
(Sprint): The current sprint. Available only when the sprint is provided in the request context object.board
(Board): The current board. Available only when the board is provided in the request context object.serviceDesk
(ServiceDesk): The current service desk. Available only when the service desk is provided in the request context object.customerRequest
(CustomerRequest): The current customer request. Available only when the customer request is provided in the request context object.user
: A user specified as an Atlassian account ID.issue
: An issue specified by ID or key. All the fields of the issue object are available in the Jira expression.json
: A JSON object containing custom content.list
: A JSON list of user
, issue
, or json
variable types.board
and sprint
) or fields (for example, issue.sprint
).curl --location --request POST 'http://jira.local:8080/jira/rest//rest/api/3/expression/eval' \
--header 'Content-Type: application/json' \
--data-raw '{
"context": {
"board": 10100,
"custom": {
"config": {
"type": "json",
"value": {
"userId": "10002"
}
},
"issuesList": [
{
"key": "ACJIRA-1471",
"type": "issue"
},
{
"id": 100001,
"type": "issue"
}
],
"myUser": {
"accountId": "100001",
"type": "user"
},
"nullField": {
"type": "json"
}
},
"customerRequest": 1450,
"issue": {
"key": "ACJIRA-1470"
},
"issues": {
"jql": {
"maxResults": 100,
"query": "project = HSP",
"startAt": 0,
"validation": "strict"
}
},
"project": {
"key": "ACJIRA"
},
"serviceDesk": 10023,
"sprint": 10001
},
"expression": "{ key: issue.key, type: issue.issueType.name, links: issue.links.map(link => link.linkedIssue.id), listCustomVariable: issuesList.includes(issue), customVariables: myUser.accountId == config.userId}"
}'
{"value":"The expression's result. This value can be any JSON, not necessarily a String","meta":{"complexity":{"steps":{"value":1,"limit":10000},"expensiveOperations":{"value":3,"limit":10},"beans":{"value":0,"limit":1000},"primitiveValues":{"value":1,"limit":10000}},"issues":{"jql":{"startAt":0,"maxResults":1000,"count":140,"totalCount":140,"validationWarnings":["There is a problem with the JQL query."]}}}}