Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: reporting and case actions update

...

This feature allows users with Edit Data access (see CommCareHQ Web Users) to configure updates to cases, including the ability to close cases. Without this feature, the only ways to close cases are by filling out a form that closes a case, finding the case in the Case List and manually using the Close Case button, or by using the Importing Cases Using Excel Case Importer tool.

Note that automatic update rules will only trigger on cases that are currently open. If a case has already been closed, it will not be updated by a rule, even if it otherwise matches the filter criteria.

...

  1. You can create a rule by navigating to Data → Automatically Update Cases+ Add Automatic Case Update Rule button: 



  2. Fill out the basic information by giving the rule a name you can use to remember what it's for:

  3. Choose the "Case Type" and "Run when". "ALL of the criteria are met" works when you want to apply all your filter criteria. "ANY of the criteria are met" works only when you want ANY of the filter criteria to apply in the Auto Update Cases. 

  4. Next, add your filter criteria which define the cases that the rule will apply to. Notice that the wording "AND" "OR" next to the rule filter changes with the button. 
    When selecting the Case Property filter, a data list will be displayed as you begin typing. This will search the applications Data Dictionary, and allow you to select the relevant Case Property.
    1. Notes:
      1. Projects without the Data Dictionary flag will see a plain text field instead of a data list.
      2. The field will also accept free text if the Data Dictionary is out-of-date.
      3. The data list only retrieves project-defined case properties, from the Data Dictionary. The list will not contain System Properties, but this will be added at a future date.

  5. And lastly, specify the actions that will be applied to the cases that match these criteria. These actions say to close the case and update case property "close_reason", setting it to the value "automatic" and save.

...

The case close action shows up in the case history as a form submission. You can view the form that closed the case by looking in the Submit History report or the Manage Forms tool. The form will also show up in the Case History of any cases closed by a rule. In the case history for the form name will show up as "Unknown" and the user as "system":Image RemovedAutomatic Case Update Rule" and indicate which rule was executed as displayed below:

Image Added

It is important to note that Automatic Case Update Rules may have duplicate names. For this reason, you should verify the rule that was executed by the system, via the Submit History page. Also, if a rule name is edited, the case history tab will display the name of the rule at the time it was executed, and not the updated rule name. 
This behaviour may be changed in the future.

Reversing a Rule

If a rule ran and closed cases and you want to undo that action, you should go to Manage Forms or Submit History report, locate the form submission that closed the cases, and archive it. This will restore the case to its prior status. For more information on archiving forms, please see Archive Forms.

...