Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat (#1207) document changes on start_from property #1208

Merged
merged 2 commits into from
Oct 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion content/en/apps/reference/app-settings/schedules.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The `schedules` key contains an array of schedule objects, each representing the
|`name`|A unique string label that is used to identify the schedule. Spaces are allowed.|yes|
|`summary`|Short description of the of the schedule.|no|
|`description`|A narrative for the schedule.|no|
|`start_from`|The base date from which the `messages[].offset` is added to determine when to send individual messages. You could specify any property on the report that contains a date value. The default is `reported_date`, which is when the report was submitted.|no|
|`start_from`|The base date from which the `messages[].offset` is added to determine when to send individual messages. You could specify any property on the report that contains a date value. Starting from 4.5.0, an array of property names is also supported; in this case, the first defined field is used. The default is `reported_date`, which is when the report was submitted.|no|
|`start_mid_group`|Whether or not a schedule can start mid-group. If not present, the schedule will not start mid-group. In other terms, the default value is `false`|no|
|`messages`|Array of objects, each containing a message to send out and its properties.|yes|
|`messages[].translation_key`|The translation key of the message to send out. Available in 2.15+.|yes|
Expand Down Expand Up @@ -57,3 +57,25 @@ This sample shows a schedule with a single message, which will be sent on Monday
}
]
```

The following sample schedules a message for 270 days from `lmp_date`. If `lmp_date` doesn't exist on report, it will schedule a message for 270 days from `fields.lmp_date`. If neither field exists, it will not create a schedule. Using an array for `start_from` is supported from CHT 4.5.0+.

```json
"schedules": [
{
"name": "Delivery Reminder",
"summary": "",
"description": "",
"start_from": ["lmp_date", "fields.lmp_date"],
"start_mid_group": true,
"messages": [
{
"translation_key": "messages.schedule.deliery",
"group": 1,
"offset": "270 days",
"recipient": "reporting_unit"
}
]
}
]
```
Loading