Skip to content

Fix: timeclock: allow overlapping sessions with same account name #2422

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

brymut
Copy link

@brymut brymut commented Jul 2, 2025

This PR fixes a regression that broke existing timeclock files containing overlapping sessions with the same account name. The issue was in pairClockEntries function which added a validation that prevented clock-in entries for accounts that already had active sessions.

However, the existing findInForOut logic already had handling for multiple sessions with the same account name using partition to correctly pair clock-ins with clock-outs.

Closes #2417

Added test

Screenshot 2025-07-02 at 16 10 43

@brymut brymut force-pushed the patch/timeclock-same-account-overlap branch 2 times, most recently from 8797d0e to 88f5c6b Compare July 2, 2025 13:12
@brymut
Copy link
Author

brymut commented Jul 2, 2025

Hi @simonmichael, made an attempt at #2417 here.
Edit: Apologies, may have found some issues with my approach. Will Draft this PR until I figure it out.

@brymut brymut marked this pull request as draft July 2, 2025 14:06
@brymut brymut force-pushed the patch/timeclock-same-account-overlap branch from 88f5c6b to d1eefba Compare July 2, 2025 14:24
@simonmichael simonmichael added the timeclock The timeclock file format. label Jul 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
timeclock The timeclock file format.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1.43: timeclock no longer accepts overlapping sessions with same account name
2 participants