Create a Task for Each Page Reviewer


When approvers are assigned to a page, this script automatically creates tasks within Comala Workflows for each reviewer. Edit the script to specify the tasks you wish to assign and set optional due dates.


I have written a proposal and need my team to review it. I would like them to review content, check links, and ensure all diagrams are correct. Instead of creating and assigning these tasks manually, I use the 'Create a Task for Each Reviewer' script to automatically create these three tasks when I add a reviewer.

Good to Know

  • You must have Comala Workflows installed on your Jira instance for this script to work.


Confluence Confluence (6.6 - 6.15)

import com.comalatech.workflow.TaskService
import com.comalatech.workflow.event.approval.ApprovalAssignedEvent
import com.onresolve.scriptrunner.runner.ScriptRunnerImpl
import com.onresolve.scriptrunner.runner.customisers.WithPlugin

import java.time.ZonedDateTime


def event = event as ApprovalAssignedEvent

// The line below limits this to one space and a workflow state named Review. You can change that to suit your needs
if (event.abstractPage.spaceKey == "MYSPACE" && == "Review") {
    def taskService = ScriptRunnerImpl.getOsgiService(TaskService)

    //Get the list of assignees
    def users = event.assignment.assigneesUserNames

    users.each { username ->
            "Review task for $username",
            "Do what you need to do", //Task comment
            Date.from( //Optionally, set a due date for one week hence
Discovered an issue? Report it here

Suggested for you