-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -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 4.5.0, array of property names is also supported; in this case, first non-undefined 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| | ||||||
|
@@ -57,3 +57,25 @@ This sample shows a schedule with a single message, which will be sent on Monday | |||||
} | ||||||
] | ||||||
``` | ||||||
|
||||||
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 both fields don't exist, it will create schedule from `reported_date`. This feature on `start_from` is supported from CHT 4.5.0+. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
```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" | ||||||
} | ||||||
] | ||||||
} | ||||||
] | ||||||
``` |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.