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:
- Trigger: When the Value changes for
- Label
- Condition: Issue field condition
- Labels field contains any of value "Project"
- Action: Send web request to get valid project key https://XXXXXXXX.atlassian.net/rest/api/3/projectvalidate/validProjectKey
- which will validates a project key and, if the key is invalid or in use, generates a valid random string for the project key.
- Endpoint: The Jira Cloud platform REST API
- Create variable: Create smart value variable
- Variable name: newProjectKey
- Smart value: {{webReponse.body.key}}
- Action: Send web request to send a HTTP request to the url specified.
- Web request URL : https://XXXXXXX.atlassian.net/rest/api/3/project
- HTTP method: POST
- Web request body: Custom data
- {
"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
- The Jira Cloud platform REST API
Working with incoming webhook data in Automation for Jira | Jira | Atlassian Documentation
- Tutorial on using web requests in Jira Automation, Video Link
Last modified on Dec 30, 2024
Powered by Confluence and Scroll Viewport.