Repository navigation
Record when a request was last approved or denied (last_action_at) - #635
Open
superconductor-for-github[bot] wants to merge 1 commit into
Open
superconductor-for-github[bot] wants to merge 1 commit into
superconductor-for-github[bot] wants to merge 1 commit into
Conversation
Adds requests.last_action_at, stamped whenever a request's status changes and backfilled from updated_at for requests that are already decided. updated_at was standing in for "when was this approved/denied", but it also moves on unrelated writes. The staff requests table, the request page, the status export string, and the digest's auto-approval count now use the new timestamp instead. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This branch has not been 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.
Part 2 of 3 split out of #633. Independent of the other two parts: it branches from
mainand can merge in any order.General Info
Changes
Adds
requests.last_action_at: when the request was last approved or denied.before_savewhenever the status changes, so every path that approves or denies a request sets it.updated_atfor requests that are already decided.updated_atwas standing in for "approved/denied on", but it also moves on unrelated writes. These now use the new timestamp (viaRequest#decided_at):A failed approval attempt does not move the timestamp; only an actual status change does.
Merge note: this PR and the action-log PR each add a migration, so whichever merges second will conflict in
db/schema.rb(the version line and the new column). Re-runningbin/rails db:migrateresolves it. No other files conflict.Testing
Documentation
None needed.
Checklist
🤖 Generated with Claude Code