Resolve Sub-task Email Notification Issues in JSM Cloud
Platform Notice: Cloud Only - This article only applies to Atlassian apps on the cloud platform.
Summary
Learn how to use automation to notify customers about updates on sub-tasks in Jira Service Management.
Solution
Relationship between Sub-Tasks and Request Types
Sub-tasks in Jira are internal tickets and not visible on the customer portal. Therefore, you can't set a request type for them, and customers won't receive notifications.
We have an open Feature Request to have this changed, which is tracked below:
Using Automation to send notifications to customers
To make a request visible on the customer portal and ensure customers receive notifications, use standard work types instead of sub-tasks. Alternatively, use the automation below to clone the ticket and sync comments if you prefer using sub-tasks.
Create two automation rules: one to clone the subtask as a standard work type linked to the original and another to sync comments between the subtask and the cloned work item for customer notifications.
Rule 1: Clone the sub-task work item
This rule creates a customer-facing ticket for your subtask so that customers can receive notifications and view it on their portal.
Create a new rule with a Work item created trigger.
Click on New condition > Work item fields condition, and set the condition to execute this if it is a subtask.
Click on New action > Clone work item and clone the work item in the same project, having a standard work type that preferably has the same workflow(as it will help in syncing the status transitions if required). Copy the fields that you require from your subtask to the clone work item.
Create a new branch by clicking on New branch > Branch rule for the Most recently created work item.
In the branch, add an action Edit request type to set the request type of the clone work item. Make sure that you select the request type related to the work item type chosen in Step 3.
Add another action to link this cloned work item to your original subtask by clicking on New action > Link work item and selecting the link as "is child of" (you can choose the relation based on your requirement).
Rule 2 - Sync comments from subtask to cloned work item
This rule will copy comments added on a subtask to the cloned work item so that notifications are sent to the customers.
Create a rule with the Work item commented trigger.
Click on New condition > Work item fields condition and set the condition to execute this if it's a subtask(same as step 2 in Rule 1).
Add another condition by going to New condition > Advanced compare condition to check if the comment is public. This is done so that only public comments are copied to the clone's work item. We will use the below smart-value for this:
{{comment.internal}}Create a branch to execute the next actions on the linked work items. Set the link type as seen on the subtask(in this case, it is "is parent of").
Add action as Comment work item and add the below smart value:
{{triggerIssue.comments.last.body}}Set the comment visibility as "Shared with customer" so that public comments are added to the cloned ticket.
Untick Prevent duplicates by only adding this comment once to a particular work item checkbox to make sure every comment will be added.
Go to Rule Details and select "User who triggered the event" in Actor. This will ensure that the comment's author added to the cloned work item is the same as the one in Subtask.
ℹ️ You can further customize the rule for syncing status for the subtask and cloned work item if required.
Was this helpful?