Last year, @Jonathan Smith wrote an article on how to use Automation and Page Statuses to create a simple page approval process.
It's straightforward, and elegant.
So of course, I had to go and make a convoluted complicated version. :-}
The add-on Page Approval for Confluence recently changed from Free to Paid. Based on our user tier and the number of pages/users that actually use it, I could not justify paying for it. (Sorry, my friends at Appfire.)
I used Space Templates, Action Items (fka as Tasks), Automation, Smart Buttons, Page Statuses, and the Confluence Cloud REST API to come up with a workaround that matches some of the functionality of the paid add-on:
Templates and Automations are scoped to specific projects, because:
Pages that require approvals must be created from space-specific Templates. It's how we ensure the Smart Button (see below) will work.
To prevent premature editing/approvals of the page before it is ready for approval, pages created from the space-specific Template are restricted for editing to the page creator.
Tasks must @mention the person who should approve. These tasks will then be assigned to the Approvers.
Approval tasks should include the word “Approve” (to allow for the possibility of non-Approval tasks to be used on these pages.)
Upon page creation, those Approvers will get an email that they have a task assigned to them.
But they will not be able to edit the page, including checking the boxes, until the an Approval has been requested for the page. (This is why we are putting the warning text above the Tasks.)
You’ll notice a Warning panel. This is required because when a page with @mentions is published, the Approvers (task assignees) will get notifications informing them of the task they’ve been assigned. This is not ideal, because it’s likely the page may need additional editing before it is ready for approval.
So we have an Approval Page Restricted to Author rule to automatically restrict editing of pages created by the template to just the author.
Restricting editing also allows us to make sure the “Request Approval” Smart Button (see below) only functions for the Page Author.
The later Start Approval rule will grant edit permissions to all of the Approvers so they are able to check off their approval tasks.
To request approvals for a page, you’ll need to Expand the section to reveal the Request Approval button. Clicking on the button will page status will change to [IN REVIEW] (although the page does not automatically refresh):
Emails will be sent to the Approvers giving them instructions to approve the page.
A comment to the page logging that the approval process has been started, and it includes the version number of the page that approval was requested for.
Once Approvers receive the email, they can click the link to open the page, and check the box next to their name to approve.
This will add a comment to the page logging each approval.
Unfortunately we cannot constrain who checks what box, but we are able to add in the comment who checked someone’s assigned Task, so we would be able to identify any approvals done on someone else’s behalf (or if someone clicks someone else’s assigned task by mistake).
When all approval tasks have been checked, the page status will be changed to [APPROVED].
If changes are made to a page that has a status of [IN REVIEW] or [APPROVED], we change status to [IN PROGRESS] and add a comment that the Approval has been cancelled.
Users can view pending any approvals they have in their regular Tasks Dashboard in your profile (under your avatar in Confluence, it’s the “Tasks” option):
(And maybe many more parts - Automations are a pain to document)...
How all the Automations work. It's complicated and annoying and interesting, and MAYBE something will be of use or interest to somebody. :-}
Darryl Lee
Sr. Atlassian Systems Engineer
Roku, Inc.
San Jose, CA
191 accepted answers
3 comments