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

Allow Remote Carb Entries in Past or Future #7512

Merged
merged 2 commits into from
Aug 14, 2022

Conversation

gestrich
Copy link
Contributor

@gestrich gestrich commented Aug 13, 2022

This will send the Event Time from the Careportal in a push notification when sending a remote carb entry. This will allow users to input carbs in the past or in the future. The feature has been requested a few times in Loop's Zulip.

The screenshot below is just to show where the date fields exists in the Careportal. There is no new UI coming to the Careportal.

Loop PR 1771 contains the Loop side changes to parse this field from the notification.

Screen Shot 2022-08-13 at 1 03 35 PM

@@ -81,6 +81,9 @@ function init (env, ctx) {
if (data.otp !== undefined && data.otp.length > 0) {
payload["otp"] = ""+data.otp
}
if (data.created_at !== undefined) {
payload['created-at'] = data.created_at;
Copy link
Contributor

Choose a reason for hiding this comment

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

I see that NS is referring this to as "created-at", but a better name for the Loop side of things would be "start-time", since Loop uses "created at" as the time of entry, which can be different from the time of eating, which is start time.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This has been updated to "start-time". Thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just a note - There is an problem on dev that is causing dev to be not deployable on Heroku: #7475

I've worked around that by testing with the branch that Ben has which is linked in that case in another PR.

I'm mentioning as whomever wants to try this change, that uses Heroku, will need to cherry-pick it to a NS branch that is working like master or Ben's branch.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks for contributing! Cherry-pick shouldn't be needed. We'll merge this in.

@gestrich gestrich force-pushed the bugfix/remote-carb-created-date branch from b2cc95f to 4172a67 Compare August 14, 2022 10:03
@bewest bewest merged commit df85fd2 into nightscout:dev Aug 14, 2022
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.

None yet

3 participants