Skip to content

Improve validation of values after calculations to catch errors #119

@ROODAY

Description

@ROODAY

E.g. a recent error with timeslots not showing up in timezones far from EST was due to not applying % 24 to the start and end hours, causing them to be values like 28 (which doesn't make sense for a clock with 24 hours). This led to issues with the slot generation in the ScheduleColumn (which uses minute offsets in a hashmap for fast calculation) as slots ended up being negative (which should never happen). An example fix would be adding a check to this function to ensure that slots are always positive.

There are probably lots of other places throughout the codebase that could benefit from checks like this (where if the check fails throw an error so we can debug easily). We also benefit from rewriting the app to use Typescript (since it's cross-compatible we can have some files in TS and others in plain JS until it's completely rewritten, although this will be a bigger undertaking). Discuss any other places for checks here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is neededv3.1Target Release - v3.1

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions