Skip to content

Tickets - credit first responder on owner self-close#274

Merged
vertyco merged 1 commit into
mainfrom
claude/tickets-close-credit-bug-GPV0w
May 27, 2026
Merged

Tickets - credit first responder on owner self-close#274
vertyco merged 1 commit into
mainfrom
claude/tickets-close-credit-bug-GPV0w

Conversation

@vertyco
Copy link
Copy Markdown
Owner

@vertyco vertyco commented May 27, 2026

When a ticket owner closed their own ticket, record_ticket_closed
skipped the staff stats block entirely, so the assigned/first-responding
staff member never received tickets_closed credit, resolution time, or
a TICKET_CLOSED event. The function already attributes ticket.claimed_by
to the first responder when no explicit claimer exists, so route close
credit to that staff member on self-close.

https://claude.ai/code/session_01PcnLXE9Ek2Yu6tChjDp3Vc

When a ticket owner closed their own ticket, record_ticket_closed
skipped the staff stats block entirely, so the assigned/first-responding
staff member never received tickets_closed credit, resolution time, or
a TICKET_CLOSED event. The function already attributes ticket.claimed_by
to the first responder when no explicit claimer exists, so route close
credit to that staff member on self-close.

https://claude.ai/code/session_01PcnLXE9Ek2Yu6tChjDp3Vc
Copilot AI review requested due to automatic review settings May 27, 2026 15:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes ticket analytics attribution so that when a ticket owner self-closes their own ticket, the relevant staff member (claimer or first responder) still receives “tickets closed” credit, resolution-time aggregation, and a TICKET_CLOSED staff event.

Changes:

  • Updates record_ticket_closed to compute a staff_credit_id for closures.
  • Credits the closing staff member when applicable, otherwise credits the attributed staff member (ticket.claimed_by) on owner self-close.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@vertyco vertyco merged commit 51939ce into main May 27, 2026
1 check passed
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.

3 participants