5
11
Fork
You've already forked tomato
1

Events are being created that end before they start #17

Closed
opened 2025年08月14日 23:44:56 +02:00 by edwardloveall · 0 comments

Many events in our DB have a starts_at that is greater than ends_at.

SELECT*FROMeventsWHEREends_at<starts_at

You can see related event counts (events that have the shift) like this:

SELECTshift_events.shift_id,count(*)FROMeventsJOINshift_eventsONshift_events.id=events.eventable_idWHEREevents.ends_at<events.starts_atGROUPBYshift_events.shift_id;

This is causing the one-time shift page to crash. It's unclear right now how these are being entered.

Many events in our DB have a `starts_at` that is greater than `ends_at`. ```sql SELECT * FROM events WHERE ends_at < starts_at ``` You can see related event counts (events that have the shift) like this: ```sql SELECT shift_events.shift_id, count(*) FROM events JOIN shift_events ON shift_events.id = events.eventable_id WHERE events.ends_at < events.starts_at GROUP BY shift_events.shift_id; ``` This is causing the one-time shift page to crash. It's unclear right now how these are being entered.
Sign in to join this conversation.
No Branch/Tag specified
main
el-tracker-cleanup
el-tracker-receipts
el-edit-tracker
el-exclude-tracker-site-receipt
el-trackers
el-occurrence-view
el-fix-shift-filter-time-zone
bb-reports
No results found.
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
rootable/tomato#17
Reference in a new issue
rootable/tomato
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?