Skip to content

Fix Ozwell timer clock guard for teamless events and clean clock test teardown#250

Closed
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-code-comments-review-thread
Closed

Fix Ozwell timer clock guard for teamless events and clean clock test teardown#250
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-code-comments-review-thread

Conversation

Copilot AI commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

This addresses two review-thread regressions from PR #231: Ozwell incorrectly rejected ticket timer starts after user-scoped clock_in, and backend/tests/clock.test.ts teardown could leave fixture clock events behind.

  • Ozwell ticket timer: accept user-scoped active clock events

    • Updated start_ticket_timer validation to allow an active clock event with no teamId (new contract) while still rejecting mismatched explicit team-scoped events.
    • Kept existing ticket/team ownership checks intact.
  • Backend clock test teardown: clean all fixture users

    • Added otherId fixture capture.
    • Changed teardown clockevents cleanup from team-based delete to fixture-user-based delete so teamless events are also removed.
// before
if (ctx.activeClockEvent.teamId !== teamId) { ... }

// after
if (ctx.activeClockEvent.teamId && ctx.activeClockEvent.teamId !== teamId) { ... }

Copilot AI changed the title [WIP] Fix code based on review comments from pull request #231 Fix Ozwell timer clock guard for teamless events and clean clock test teardown Jun 2, 2026
Copilot AI requested a review from mfisher31 June 2, 2026 17:07
@mfisher31

Copy link
Copy Markdown
Collaborator

cherry picked in to #231 , closing.

@mfisher31 mfisher31 closed this Jun 2, 2026
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

Successfully merging this pull request may close these issues.

2 participants