Automatically Complete Tasks When Their Checklists Are Completed

This feature is available to the following product editions
  • Starter
  • Standard
  • Premium

 

Automating processes can help streamline work for users. In this article, we will go through the configurations of an automation that will automatically complete tasks whenever their checklists are fully complete. As always, the specifics of this automation can be adjusted if necessary.

Out of the box, when a checklist is completed on a task, there is no automated out-of-the-box behavior to move the task to Finished. While there are certain business processes that might require completing such tasks manually, other processes might benefit from automating the completion of tasks in this scenario.

Tip: In addition to the customization outlined in this article, there is also an option to restrict the ability to complete tasks unless all of the checklist items are completed. If that is something that you are interested in configuring, see our other article on preventing the completion of tasks until all checklist items are completed.

Here is a summary of what will be covered in this article:

 

Sample Use Case and Configuration Overview

Goal

Automatically update tasks to the Finished status list when their checklists are fully completed.

 

Use Case Details

  • Tasks can be configured to have checklists added to them.
  • As users work on assigned tasks, they are also responsible for completing checklist items on those tasks.
    • The TaskRay Checklist Item object has a Completed checkbox. This checkbox is updated to true when a checklist item is completed.
  • The TaskRay Task object has a List field. This field is used to move the task through different statuses through to completion.
    • Out of the box, the Finished List value is used to denote completion of work. In this article, we will be configuring the automation to update tasks to the Finished status when all of their checklist items are complete.
      Note: It is possible that your organization has customized the List field on the TaskRay Task object to incorporate custom values. If that is the case, you can use custom value(s) instead of the Finished value referenced throughout this document.
  • Out of the box, whenever the checklist items are completed on a task, that does not automatically move the task to Finished. Using the configurations in this article, an automation can be set up to update the tasks to the Finished status when their checklists are completed.
    Note: This automation is specific to tasks that have checklist items. Project tasks that do not have any checklists to complete will still need to be updated to Finished manually or through some other automated process.

 

Additional Architectural Details

  • The objects involved in this configuration (TaskRay Task, TaskRay Checklist Item) are in a master-detail relationship. This allows setting up a rollup summary field on the TaskRay Task object that summarizes checklist information.
  • As such, for the purpose of this automation, we will configure a custom rollup summary field on the TaskRay Task object to track the number of open/incomplete checklist items related to that task.
    • The rollup summary field on the task will display the number of related TaskRay Checklist Item records where Completed = false.
    • As checklist items get marked as complete, the rollup summary field will be continuously updated, eventually reaching 0.

 

Automation Overview

  • The automation is set up using Flow. The Flow is triggered when the custom Open Checklist Items rollup summary field on the task is updated to (thus indicating that all related checklist items have been completed).
  • The final action of the automation is to update the task to the Finished list.

 

Object Configuration [Admin]

For the first portion of configuring this automation, it is necessary to create a new field on the TaskRay Task object. The field will be used to count the number of open checklist items related to a task.

  1. From Setup, navigate to Objects and Fields | Object Manager.
  2. Click on the TaskRay Task object.
  3. Under Fields and Relationships, click on New.
  4. Select Roll-Up Summary and click Next.
  5. Enter Field Label (e.g. "Open Checklist Items"). The Field Name should automatically populate. Optionally, enter Description and Help Text.
  6. Click Next.
  7. For Summarized Object, select TaskRay Checklist Items.
  8. Under Select Roll-Up Type, select Count.
  9. Under Filter Criteria, select Only records meeting certain criteria should be included in the calculation. Enter the following in the first row:
    • Field = Completed
    • Operator = Equals
    • Value = False
  10. Click Next.  
    rollup_setup.png
  11. Using the checkboxes, edit field-level security, if necessary. Click Next.
  12. Select if you want to add the field to the Project Task Layout and click Save.

 

Flow Configuration [Admin]

Flow Overview

Below is a sample configuration of the Flow:

Screen_Shot_2022-12-20_at_4.02.41_PM.png

 

Follow the steps in the sections below to configure the Flow.

 

Step 1: Create New Flow

  1. From Setup, navigate to Process Automation | Flows.
  2. Click on the New Flow button.
  3. In the New Flow modal, select the Record-Triggered Flow option.
  4. Click on Create.

 

Step 2: Configure Start and Entry Conditions

When setting up a new record-triggered flow, it is necessary to specify the object and criteria that will trigger the automated process. In this case, we will select the TaskRay Task object. As the triggering criteria, we will use the new custom rollup summary field (Open Checklist Items) and trigger the automation when it is updated to zero (or, in other words, when all the related checklist items are marked as complete).

  1. In the Configure Start modal, click into the Object field and search for TaskRay Task.
  2. For Trigger the Flow When select A record is updated.
  3. In the Set Entry Conditions section, for Condition Requirements select All Conditions Are Met (AND).
  4. For the first condition, set the following:
    • Field = Open_Checklist_Items__c (Open Checklist Items, new custom rollup summary field)
    • Operator = Is Changed
    • Value = True
  5. Add another condition by clicking on the + Add Condition button and set the following:
    • Field = Open_Checklist_Items__c (Open Checklist Items, new custom rollup summary field)
    • Operator = Equals
    • Value = 0
  6. For Optimize the Flow for, select Fast Field Updates.
  7. Leave the remaining options as-is and click Done.

Screen_Shot_2022-12-20_at_4.09.46_PM.png

 

Step 3: Add Element to Update Task

Next, you will need to add an element to update the task to finished. In this case, the update is to set the List field on the task to Finished.

Note: If you are using other custom List values to indicate the completion of work on tasks, adjust the configurations below accordingly.
  1. On the Flow canvas, click on the Plus / Add Element icon below the Start element.
  2. Select the Update Records element.
  3. In the new Update Records modal, enter the Label (e.g. "Move Task to Finished") and API Name.
  4. Under How to Find Records to Update and Set Their Values, select Use the taskray task record that triggered the flow.
  5. Under Set Filter Conditions, for Condition Requirements to Update Record, keep the None--Always Update Record option.
  6. Under Set Field Values for the TaskRay Project Record, set the following:
    • Field = TASKRAY__List__c (List)
    • Value = Finished
  7. Click Done.

Screen_Shot_2022-12-20_at_4.14.38_PM.png

 

Step 4: Save and Activate the Flow

Now that the Flow is fully configured, it is time to save and activate it.

  1. In the top right corner of the Flow canvas, click on the Save button.
  2. In the Save the Flow modal, enter the Label (e.g. "Move Tasks to Finished When Checklists are Completed") and API Name.
  3. Click Save.
  4. In the top right corner of the Flow canvas, click on the Activate button.

 

Flow Testing

As a best practice, it is always a good idea to test custom automations to make sure that they meet requirements and follow expected behavior. Custom automations can be tested using the Debug options in Flow or in the app, using sample test records. 

To test this automation, you can set up a task with a checklist and then complete the checklist on the task. As the custom Open Checklist Items rollup summary field is updated to zero, the task should be automatically be updated to the Finished status list.

Was this article helpful?

0 out of 1 found this helpful

Have more questions? Submit a request