Repository navigation
Conversation
schema.sql defines rmas.closed_at, but no endpoint ever wrote it, so it
was always null and there was no way to tell when an RMA finished.
POST /rmas and PUT /rmas/{id} now stamp closed_at (UTC) when
resolution_status is Completed or Cancelled. Editing an already-closed
RMA keeps its original close time, and moving it back to an open status
clears closed_at.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0171zWzmNQGv8CgCKbL65TK9
|
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
schema.sqldefinesrmas.closed_at, but no endpoint ever wrote to it, so it was always null.POST /rmasandPUT /rmas/{id}now set it to the current UTC time whenresolution_statusisCompletedorCancelled(the closed statuses offered inRMAs.jsx).select=closed_atlookup, which only runs when the status is a closed one.closed_at.No open PR (#17–#72) or issue touches
closed_at(also searched issues and PRs for "closed_at"). #72 makes the same kind of fix fortickets.updated_at. #46 and #53 also edit the RMA routes and model, so a small merge conflict is possible, but neither changes this logic.Testing
pytest: 47 passed (withSUPABASE_URL/SUPABASE_KEYset).ruff checkandruff format --checkare clean.Generated by Claude Code