When the field gets updated, create a new software project with the custom data defined in the project details using Automation.


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

Summary

When the field gets updated with specific text, it will create a new software project with the custom data defined in the project details through Automation for Jira.

Environment

Jira cloud

Solution

This solution involves the following Automation Rule Structure:

  1. Trigger: When the Value changes for 
    1.  Label
  2. Condition: Issue field condition
    1. Labels field contains any of value "Project"
  3. Action: Send web request to get valid project key https://XXXXXXXX.atlassian.net/rest/api/3/projectvalidate/validProjectKey
      1. which will validates a project key and, if the key is invalid or in use, generates a valid random string for the project key.
      2. Endpoint: The Jira Cloud platform REST API
  4. Create variable: Create smart value variable
    1. Variable name: newProjectKey
    2. Smart value: {{webReponse.body.key}}
  5. Action: Send web request to send a HTTP request to the url specified.
    1. Web request URL : https://XXXXXXX.atlassian.net/rest/api/3/project
    2. HTTP method: POST
    3. Web request body: Custom data
        1. {
              "name": "AppsIdea {{issue.summary}}",
               "key": "{{webResponse.body}}",
               "description": "{{issue.description}}",
               "leadAccountId": "XXXXXXXXXXXXXXXX",
               "projectTemplateKey": "com.pyxis.greenhopper.jira:gh-simplified-kanban-classic",
               "projectTypeKey": "software",
               "url": "{{issue.url}}"
          }

References


Last modified on Dec 30, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.