Modify Space and Parent Page of the recipe using Jira Automation
Context
When configuring a Publish recipe, one must choose a Space and a Parent page so that the application knows where to publish the page.
It may happen that Jira Administrators want to use the same recipe to publish similar pages to different places depending on the source issue (the idea is to avoid creating a recipe for each Space/Parent page association whereas the content and configuration of the recipe is exactly the same).
Tutorial
This guide explains how to use Jira Automation and the Publish REST API to change dynamically the Space and the Parent page of the recipe when creating the page.
Configuration steps
1 - The Space in the recipe must be unlocked.
2 - In Jira Automation, use the "Send web Request" to trigger the Publish recipe.
3 - In the "Web request body", choose "Custom data" and enter the code as follow (where Key and ID can be static, or dynamic if the Jira Admin manages to dynamically get it):
{
"spaceKey": "Key",
"spaceId": "ID",
"parentPageId": "ID"
}
If body is present, it will take data from it, otherwise it will take data from recipe configuration:
spaceKey or spaceId is required
parentPageId is required
All attribute values must be of String type i.e rounded by double quotes character.
If body is incomplete, it will return a status code 400.
•••