Fix Ownership Type Values on Game List Edit Form #369
Labels
No labels
automated
code-quality
component: admin dashboard
component: backend
component: billing
component: content management
component: faqs
component: game genres
component: game lists
component: game reviews
component: game search
component: games
component: internal notifications
component: platforms
component: security
component: tests
component: user api
component: user badges
component: user blogs
component: user consoles
component: user favorites
component: user friends
component: user notifications
component: user profiles
component: user site notifications
component: user wishlists
component: web design
dependencies
javascript
php
priority
high
priority
low
priority
medium
security-hotspot
source: codex
source: sonarqube
status
awaiting feedback
status
backlog
status
done
status
in progress
status
in queue
status
in review
status
needs codex review
status
needs investigation
status
wontfix
type: bug
type: documentation
type: feature
type: improvement
type: regression
type: task
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MyVideoGameList/myvideogamelist.com#369
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Users can choose an ownership type when adding or editing a game list entry, but the edit form currently saves a shifted value compared with the ownership badge shown on the list page.
The canonical ownership values are
1through4:Played, but don't own,Digital Copy,Retail Version, andCollector's Edition. The create/edit form should submit those same values, validation should accept them, and the public list should display the matching badge after save.Scope
-option remains nullable and does not triggerThe selected ownership is invalid.Played, but don't owncan be selected and saved as ownership value1.Digital Copy,Retail Version, andCollector's Editionsave as values2,3, and4respectively.Acceptance Criteria
Played, but don't ownsucceeds without validation errors.Digital Copystores ownership value2and the list page showsDigital Copy.Retail Versionstores ownership value3and the list page showsRetail Version.Collector's Editionstores ownership value4and the list page showsCollector's Edition.-ownership option storesnulland the list page shows the fallback-badge./list/{username}remain unchanged for values1,2,3, and4.Test Coverage Required
1,2,3, and4.game-lists.updateand persists togame_lists.ownership.null.vendor/bin/pint --dirtybefore closing the issue.Progress Checklist
game_lists.ownershipsupports canonical values1,2,3, and4GameListControllercentralizes ownership labels for the form and badge presenterGameListControllervalidates ownership against values1,2,3, and4Played, but don't owncan be selected and savedDigital Copy,Retail Version, andCollector's Editionsave without shiftingOwnership type different in list than in edit modeto Fix Ownership Type Values on Game List Edit FormImplemented in
25d7e6a(Fix game list ownership select values).Notes:
Collection::merge()with numeric keys, which reindexed the canonical ownership values and shifted the submitted values.1,2,3, and4render and submit as expected.GameListPageTestcoverage for canonical option rendering, edit-page preselection for every supported ownership value, update persistence for1through4, public label rendering after edits, and blank ownership persisting asnull.Verification:
php artisan test --compact tests/Feature/GameListPageTest.phppassed: 43 tests, 500 assertions.vendor/bin/pint --dirty --format agentpassed.