Repository navigation
Conversation
POST /tickets inserted the ticket but never wrote a history row, so the audit trail for API-created tickets started at the first status change and the original status was lost. The seed data already models creation as old_status=null -> initial status; the endpoint now does the same. The Tickets page also rendered null old_status as an empty pill; it now shows "Created". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0171zWzo7vSa9Ls6xtBaJgNJ
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
POST /ticketsinserted the ticket but never wrote aticket_historyrow. For tickets created through the API, the audit trail started at the first status change, and the starting status was never recorded. The seed data inschema.sqlalready logs creation asold_status = null → <initial status>, and the endpoint now writes the same row.idandstatusreturned by Supabase (Prefer: return=representation). If the insert returns no row, no history row is written.old_statusused to show an empty pill. It now shows "Created".No open PR (#17–#73) or issue covers creation history; I searched issues and PRs for "ticket_history", "initial status history" and "creation history". #45, #47 and #72 edit
update_ticket/Ticket, and #71 editsTickets.jsx, so small merge conflicts are possible. None of them change this logic.Testing
test_create_ticket_records_initial_status_historyandtest_create_ticket_skips_history_when_insert_returns_no_row.pytest: 45 passed (withSUPABASE_URL/SUPABASE_KEYset).ruff checkandruff format --checkare clean.npx eslint src/pages/Tickets.jsxis clean andvite buildsucceeds.Generated by Claude Code