Add sequence numbers to work items in Jira Cloud

Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.

Summary

Learn how to configure Jira Cloud to automatically assign work items a sequence number using Jira's automation rules and entity properties.

Solution

Setup an automation rule

  1. Trigger: Issue created

  2. Action: Set Entity Property

    1. Entity type: Project

    2. Property key: sequence

    3. Property value:

      {{#increment}}{{issue.project.properties.sequence}}{{/}}
  3. Action: Edit item

    1. IncidentID:

      {{now.format("ddMMYYYY")}}-{{issue.project.properties.sequence}}
  4. Test the rule by creating a new issue in the project to ensure the sequence number is appended correctly.

Additional steps

If you need to reset the sequence property when your project moves into production, follow these steps using the Jira Cloud REST API.

Pre-requisites

  • API Token: Obtain an API token for authentication. Follow this guide to create one.

  • Project ID or Key: Identify the project ID or key.

Steps to Set a Project Property

  1. Determine the Request Endpoint:

    1. Use the URL:

      PUT https://<your-domain>.atlassian.net/rest/api/3/project/{projectIdOrKey}/properties/{propertyKey}
    2. Replace <your-domain>, projectIdOrKey, and propertyKey with your specific details.

  2. Prepare Your Authentication:

    1. Use Basic Authentication with your email and API token. Encode your email and API token in Base64:

      Authorization: Basic base64(email:api_token)
  3. Setup the Request Body:

    1. Use JSON format for the property value:

      { "value": "example-value" }
  4. Make the HTTP PUT Request:

    1. Use a tool like Postman, cURL, or a programming language. Example using cURL:

      curl --request PUT \ --url https://<your-domain>.atlassian.net/rest/api/3/project/{projectIdOrKey}/properties/{propertyKey} \ --user email@example.com:your_api_token \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "value": "example-value" }'
  5. Verify the Response:

    1. A successful request will return a 200 OK response with a JSON confirmation:

      { "key": "propertyKey", "value": "example-value" }
  6. Handle Errors (If Any):

    1. Common errors:

      1. 401 Unauthorized: Check authentication credentials.

      2. 403 Forbidden: Ensure you have the required permissions.

      3. 404 Not Found: Verify the projectIdOrKey and URL.

By following these steps, you can efficiently manage sequence numbers for Jira work items and reset properties when needed.

Updated on June 16, 2025

Still need help?

The Atlassian Community is here for you.