...
- Create a parent action that triggers on newly created issues for a Jira Service Desk project and does something, I.e. creates a new confluence page using fields from the newly created Jira issue.
- Create a child action that comments back to the issue using the response from the previous action to provide a link in the comment to the newly created Confluence page.
- I.e create another child action that changes the status of the issue.
- And so on...
Creating child actions
Create a chained action by clicking the "Create" button. Choose another action as the "Parent" to create this action as a child action.
Set up the child action as by the User Guide
Defining variables from parent action response
Customize variables from the parent response by mapping a variable name to a JSONPath expression. All variables mapped from response will be available in the variable context scope and can be used using the mustache template.
Example response from the parent:
Code Block | ||||
---|---|---|---|---|
| ||||
{ "firstName": "John", "lastName" : "doe", "age" : 26, "address" : { "streetAddress": "naist street", "city" : "Nara", "postalCode" : "630-0192" } } |
Mapping(s):
"first"
JSONPath expression "$.firstName"
...
"address"
JSONPath expression "$.firstName"
Using the mappings:
Ie. posting a comment on the issue in the scope
...
{
"body": "{{first}} {{last}} from {{
address.city}} says hi
!"}
Result:
A comment: "John doe from Nara says hi!" posted to the issue.
...