-
Type:
Suggestion
-
Resolution: Unresolved
-
Component/s: Confluence Automation
-
None
-
2
When a Confluence Automation rule is triggered by a "Page Deleted" or "Page Archived" trigger, and the rule's action is to send a notification via email or other method, it should populate the "page.parent.title" value and send the notification prior to the page actually being deleted, otherwise, this value will be blank in the notification (due the page no longer existing in the page tree when the notification is actually sent).
Workaround
- Enable and create a Page Status called "Ready to Delete" (or something similar).
- Create a Confluence Automation rule similar to the following:
- "Rule is run when a page status is changed -> Status changed to Ready to Delete"
- Then, send a notification which contains the required "page.parent.title" smart value in it
- Finally, the rule should perform an action such as "Add a label" where it then applies a label to a page such as "send-to-trash" (or similar)
- Then, Create a Confluence Automation rule 2nd rule similar to the following:
- "Rule is run when a label is added to a page -> Page is labeled send-to-trash"
- Then, the rule should "delete the page"
Make sure to select the "Check to allow other rule actions to trigger this rule. Only enable this if you need this rule to execute in response to another rule." on this 2nd rule so that it will trigger as a result of the 1st rule's execution.
- Finally, when you wish to delete the page in question that is to have the required "page.parent.title" smart value in its notification, change the page status of the page to "ready to delete" rather than deleting it.
A visual representation of these 2 rules is below:
Please note that this same concept could be accomplished by using 2 different labels or 2 different page statuses. As long as the action of "marking the page for deletion & sending notifications" is separated from the actual "page deletion" step, the page will still exist in the page tree when the notification is sent which is the important part. Using page statuses or labels in this sense is arbitrary and interchangeable.