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

Conversation

1yuv
Copy link
Member

@1yuv 1yuv commented Oct 18, 2023

Update schedules document to include update on start_from. Required documentation for medic/cht-core#8633

Update schedules document to include update on start_from.
@1yuv 1yuv requested a review from garethbowen October 18, 2023 22:12
@1yuv 1yuv changed the title 1207 update start_from, Update schedules.md feat (#1207) document changes on start_from property Oct 18, 2023
Copy link
Contributor

@garethbowen garethbowen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor grammatical suggestions.

@@ -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|
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
|`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_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|

@@ -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+.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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+.
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 create schedule from `reported_date`. Using an array for `start_from` is supported from CHT 4.5.0+.

@1yuv 1yuv requested a review from garethbowen October 19, 2023 13:33
@1yuv
Copy link
Member Author

1yuv commented Oct 19, 2023

Thanks @garethbowen , I have applied the suggestion. Also, I noted that I documented a behavior slightly wrong on the example previously and have corrected that.

Copy link
Contributor

@garethbowen garethbowen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@garethbowen garethbowen merged commit 735995a into main Oct 25, 2023
2 checks passed
@garethbowen garethbowen deleted the 1yuv-patch-1 branch October 25, 2023 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants