Skip to main content
Skip table of contents

Migration Guide: Jira Expressions

Overview

This guide provides detailed instructions for migrating from the deprecated Jira Expressions endpoints to the new endpoints introduced in the Jira REST API. The migration involves replacing the old POST endpoint used for Jira Expressions with the updated endpoint, ensuring that your integrations continue to function seamlessly with the latest API enhancements.

Identify and Update Deprecated Endpoints

Please locate and replace all instances of the deprecated endpoint with the updated one. This change is crucial to ensure that your application continues to evaluate Jira Expressions correctly.

  • Deprecated Endpoint:
    DEPRECATED POST /rest/api/{2|3|latest}/expression/eval → [link]

  • New Endpoint:
    NEW POST /rest/api/{2|3|latest}/expression/evaluate → [link]

Update Jira Expressions Endpoints

Once you have identified a deprecated endpoint, update your integration by changing the URL from the old to the new configuration.

Migration Example:

DEPRECATED eval endpoint configuration:

CODE
.../rest/api/3/expression/eval

POST Body:

CODE
{
    "expression": "issues.map(i => {
            id: i.id, key: i.key, summary: i.summary
        })",
    "context": {
        "issues": {
            "jql": {        
                "query": "order by updated desc",
                "maxResults": {Limit}
            }
        }
    }    
}

NEW migrated configuration:

CODE
.../rest/api/3/expression/evaluate

POST Body

CODE
{
    "expression": "issues.map(i => {
            id: i.id, key: i.key, summary: i.summary
        })",
    "context": {
        "issues": {
            "jql": {        
                "query": "project = '{Project}' order by updated desc",
                "maxResults": {Limit}
            }
        }
    }    
}

Key difference:

The primary difference in the new configuration is the requirement for bounded JQL queries. For instance, the JQL now must specify a condition, such as using project = '{Project}' instead of an unbounded query. This constraint ensures that the query returns a defined set of results. Examples of bounded JQL include:

  • project = 'project name'

  • created > '10.10.1900'

Pagination

In case you are using those data source in combination with a paginated data source you should also follow this guide.

Once you have made the changes, please verify that the responses contain the expected data to ensure that the migration was successful.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.