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

Temporary Target Top and Bottom validation problem #4993

Closed
Nightfoxy opened this issue Sep 19, 2019 · 5 comments
Closed

Temporary Target Top and Bottom validation problem #4993

Nightfoxy opened this issue Sep 19, 2019 · 5 comments

Comments

@Nightfoxy
Copy link

Describe the bug
Setting a temporary target with a Top value 100 or above and a Bottom value of 99 or below results in an error that says "The low target must be lower than the high target and high target must be higher than the low target." and the temporary target cannot be submitted.

If I enter the bottom value with a "0" in front like "080" and a top value over 100, then the error message is not triggered.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '+'
  2. Choose Event Type of 'Temporary Target'
  3. Enter a top value of 100 and bottom value of 90
  4. Press Submit Form button and see the error.
  5. Repeat step 3 with "090" and you'll see the confirmation message instead of an error.

Expected behavior
Should be able to enter a smaller number in the "bottom" field without a leading 0 under 100 and a top number 100 or over without an error.

Screenshots
image
image

Your setup information

  • What version of Nightscout - 0.12.4
  • What type of CGM, and how do you get your data there? G6 via Share
  • Is your issue specific to a browser (Firefox/Safari/Chrome?) or a device (Android phone, etc.)? Both Windows and Android Chrome is what I tested in.

Additional context
Add any other context about the problem here.

@unsoluble
Copy link
Contributor

unsoluble commented Sep 19, 2019

What plugin is this from? It's not one of the core careportal events. OpenAPS?

@sulkaharo
Copy link
Member

Yup OpenAPS users get to enter temporary target events. That error is really strange, which browser is that? The error indicates a simple check between the numbers is failing (is 130 < 90 / is 90 > 130).

@unsoluble
Copy link
Contributor

unsoluble commented Sep 19, 2019

Yeah I'm staring at the validation code in careportal.js here, can't see anything that would cause this comparison to fail. And the zero-padding success just makes it weirder. Best hunch because of that quirk is that it could be a type mismatch somewhere in the data chain from the input field to the validator.

@Nightfoxy
Copy link
Author

Yes, OpenAPS. Current version of Chrome for windows. Happens on Android and multiple comptuers.
I was hoping it would be fixed in this release, but I guess no one noticed? I have to use at least a 30 point spread to mostly get around the IOB calc issue in Loop. Strange it hasn't been mentioned before.

@Nightfoxy
Copy link
Author

I know some changes were made to the Temporary Target options in 0.12.3 to try and enforce the Top being higher than the Bottom. It ended up breaking the Temporary Target Cancel event and this issue, as far as I can tell.

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

No branches or pull requests

3 participants