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

Scheduled Hourly Check-Ins created more than actual scheduled check-ins. #386

Open
1 of 9 tasks
AmTryingMyBest opened this issue May 17, 2019 · 5 comments
Open
1 of 9 tasks
Assignees
Milestone

Comments

@AmTryingMyBest
Copy link

AmTryingMyBest commented May 17, 2019

Expected Behaviour

Number of check-ins that appear under Scheduled tabs should be an accurate presentation of actual check-ins that are scheduled to go out.

Actual Behaviour

A large number of check-ins are created under the Scheduled tabs. The check-ins appear to be duplicated.

Steps to Reproduce

  • Create a check-in scheduled to go out hourly starting now.
  • Note that time on date/time picker are on GMT.
  • Send out the Check-In with these details.
  • Note that:
    1. Check-ins are backtracked i.e they are sent for times that they should have been sent but are past e.g checkins created to start three hours ago will have one sent out for each hour to the currrent hour.
    2. A large number of check-ins are created/scheduled under the Scheduled tab.
    3. As these check-ins are sent out by the hour, under the Sent tab, the number of check-ins is one for each hour, as expected.

####Additional Info
Screenshot of 170 instances of a check-in where only 20 were expected.
Screenshot from 2019-05-17 12-05-20.png

Environment

  • www.tenfour.org
  • app.tenfour.org
  • staging.tenfour.org
  • dev.tenfour.org
  • localhost:8100
  • iOS App (live)
  • iOS App (testflight)
  • Android App (live)
  • Android App (beta)
@rowasc
Copy link
Collaborator

rowasc commented May 17, 2019

The 170 checkins count is incorrect. 170 checkins are not being created if we believe the API (which I guess we should )
running GET https://api.dev.tenfour.org/api/v1/organizations/10/checkins/?limit=5000&offset=0
Results in 52 checkins, in these groups

"Schedule hourly test 2" => 21 checkins
"Schedule hourly test" => 25 checkins
"Schedule daily check-in test" => 6 checkins

@rowasc
Copy link
Collaborator

rowasc commented May 17, 2019

( while my test is in dev, Walter confirms this happened to him in staging and dev, so it should still be the same) Jumping on a call now to debug with him

@rowasc
Copy link
Collaborator

rowasc commented May 17, 2019

ok so met with Walter, the problem is not that we create 100s of checkins, it's that the limit and offset are kind of broken.
If you request an offset of 9000 with a limit of 5, you'll get the same result as if you request offset 100 and limit 5. The frontend cannot detect the end because the offset isn't working, therefore it keeps adding the same checkins over and over to the screen .
Fixing today

@rowasc
Copy link
Collaborator

rowasc commented May 17, 2019

update: Having some issues to repro this locally but It does happen in staging .

@mackers mackers added this to the Cycle 12 milestone May 17, 2019
@rowasc
Copy link
Collaborator

rowasc commented May 17, 2019

@Obadha2 please retest

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