Add admin-side import of game metadata into requests #943

Closed
opened 2026-09-09 18:40:28 -05:00 by Veilor · 2 comments
Member

Game requests can represent the same game across multiple platforms, creating repetitive admin data entry.

Provide an admin-only source game ID field and import action that reuses existing game metadata without changing request submission or review flows.

Scope

  • Add source-game lookup and import behavior to the existing admin request workflow.
  • Copy supported game metadata into the selected request while preserving request-specific platform, status, requester, and review fields.
  • Display validation and not-found errors without mutating the request.
  • Reuse existing authorization, game models, request handling, and admin UI conventions.

Acceptance Criteria

  • An authorized administrator can enter a valid existing game ID on a request and import its supported metadata.
  • The target request is updated with the imported metadata and retains its own platform and request-specific values.
  • Invalid, missing, or inaccessible source IDs produce a clear validation error and leave the target request unchanged.
  • The import control is unavailable to non-administrators and does not alter public request submission behavior.
  • The admin interface clearly indicates which fields are imported and provides success or failure feedback.

Test Coverage Required

  • Feature coverage for an authorized administrator importing metadata from an existing game into a request.
  • Feature coverage confirming request-specific fields remain unchanged after import.
  • Feature coverage for invalid and nonexistent source IDs, including no partial update.
  • Authorization coverage confirming non-admin users cannot invoke the import behavior.

Progress Checklist

  • Trace the existing request model, admin controller or Livewire surface, routes, and views.
  • Define the allowlisted game fields eligible for import.
  • Implement validated admin-only lookup and atomic metadata copy.
  • Add focused feature and authorization tests.
  • Run the affected test suite and formatting checks.
Game requests can represent the same game across multiple platforms, creating repetitive admin data entry. Provide an admin-only source game ID field and import action that reuses existing game metadata without changing request submission or review flows. ## Scope - Add source-game lookup and import behavior to the existing admin request workflow. - Copy supported game metadata into the selected request while preserving request-specific platform, status, requester, and review fields. - Display validation and not-found errors without mutating the request. - Reuse existing authorization, game models, request handling, and admin UI conventions. ## Acceptance Criteria - An authorized administrator can enter a valid existing game ID on a request and import its supported metadata. - The target request is updated with the imported metadata and retains its own platform and request-specific values. - Invalid, missing, or inaccessible source IDs produce a clear validation error and leave the target request unchanged. - The import control is unavailable to non-administrators and does not alter public request submission behavior. - The admin interface clearly indicates which fields are imported and provides success or failure feedback. ## Test Coverage Required - Feature coverage for an authorized administrator importing metadata from an existing game into a request. - Feature coverage confirming request-specific fields remain unchanged after import. - Feature coverage for invalid and nonexistent source IDs, including no partial update. - Authorization coverage confirming non-admin users cannot invoke the import behavior. ## Progress Checklist - [x] Trace the existing request model, admin controller or Livewire surface, routes, and views. - [x] Define the allowlisted game fields eligible for import. - [x] Implement validated admin-only lookup and atomic metadata copy. - [x] Add focused feature and authorization tests. - [x] Run the affected test suite and formatting checks.
Codex changed title from The ability to import game info from other entries to requests to Add admin-side import of game metadata into requests 2026-09-09 18:41:01 -05:00
Codex self-assigned this 2026-10-19 13:40:53 -05:00
Member

Implemented and merged in PR #991 (merge commit 6dda2c5b19).

The pending-request review page now accepts an existing enabled game ID and imports populated metadata. Empty source fields preserve current request values. Platform, requester, status, processing staff, and review reason are preserved; boxart is not imported. Import saves immediately and reloads the page, so unsaved review-form edits are discarded. Review imported regional release dates for the target platform before approving.

Access follows the existing game-management roles (1–3), with CSRF protection and the admin mutation rate limiter. Invalid, missing, nonexistent, and deleted source IDs leave the request unchanged. Metadata changes and their audit entry are transactional, and the pending status is rechecked under a row lock. The metadata allowlist is shared with cloning without changing its behavior.

Verification: 104 request/cloning tests passed (939 assertions), Pint, PHPStan, frontend build, and desktop/mobile rendered success/error checks passed. Coverage includes protected-field preservation, empty source values, authorization, invalid IDs, rollback on audit failure, concurrent processing, and approval after import. No migrations or dependency changes are required.

All five progress checklist items are complete. Deployment to dev and production follows this closeout.

Implemented and merged in PR #991 (merge commit 6dda2c5b1992ffb5fe4f8b3453ad78c1b958203d). The pending-request review page now accepts an existing enabled game ID and imports populated metadata. Empty source fields preserve current request values. Platform, requester, status, processing staff, and review reason are preserved; boxart is not imported. Import saves immediately and reloads the page, so unsaved review-form edits are discarded. Review imported regional release dates for the target platform before approving. Access follows the existing game-management roles (1–3), with CSRF protection and the admin mutation rate limiter. Invalid, missing, nonexistent, and deleted source IDs leave the request unchanged. Metadata changes and their audit entry are transactional, and the pending status is rechecked under a row lock. The metadata allowlist is shared with cloning without changing its behavior. Verification: 104 request/cloning tests passed (939 assertions), Pint, PHPStan, frontend build, and desktop/mobile rendered success/error checks passed. Coverage includes protected-field preservation, empty source values, authorization, invalid IDs, rollback on audit failure, concurrent processing, and approval after import. No migrations or dependency changes are required. All five progress checklist items are complete. Deployment to dev and production follows this closeout.
Member

Deployment completed to dev and production at merged master revision 6dda2c5b1992ffb5fe4f8b3453ad78c1b958203d.

  • Deployed dev first and verified it before deploying production.
  • Preserved all 19 pre-existing dev-only source differences, including the pending-game workflow and Debugbar restrictions. The overlapping game controller and routes were merged without discarding those changes. Each environment retained its existing Font Awesome kit version.
  • Verified artifact hashes, rebuilt route and Blade caches, and generated release manifests for the merged revision. Environment files and unrelated source files were preserved.
  • On both hosts, enforced read-only MariaDB checks confirmed the import route's POST/role/rate-limit configuration, rendered the real pending-request review and cloning pages, and verified that imported metadata excludes protected request fields.
  • Both homepages returned HTTP 200; the new import route advertised POST successfully through HTTP OPTIONS, and served CSS/JavaScript checksums matched the deployment artifacts.
  • No migrations, dependency updates, environment-file changes, or domain-data writes were performed. Actual imports were verified by the isolated feature tests rather than modifying live requests.

Rollback backups:

  • Dev: /home/mvgldev/deploy-backups/issue943-6dda2c5b-nhjtgy_f
  • Production: /home/mvgl/deploy-backups/issue943-6dda2c5b-j93ru3ss

Deployment plans, checksums, runtime smoke results, and receipts are available under each account's releases/issue943-6dda2c5b directory. All five checklist items are complete; this issue is closed with status/done.

Deployment completed to dev and production at merged master revision `6dda2c5b1992ffb5fe4f8b3453ad78c1b958203d`. - Deployed dev first and verified it before deploying production. - Preserved all 19 pre-existing dev-only source differences, including the pending-game workflow and Debugbar restrictions. The overlapping game controller and routes were merged without discarding those changes. Each environment retained its existing Font Awesome kit version. - Verified artifact hashes, rebuilt route and Blade caches, and generated release manifests for the merged revision. Environment files and unrelated source files were preserved. - On both hosts, enforced read-only MariaDB checks confirmed the import route's POST/role/rate-limit configuration, rendered the real pending-request review and cloning pages, and verified that imported metadata excludes protected request fields. - Both homepages returned HTTP 200; the new import route advertised POST successfully through HTTP OPTIONS, and served CSS/JavaScript checksums matched the deployment artifacts. - No migrations, dependency updates, environment-file changes, or domain-data writes were performed. Actual imports were verified by the isolated feature tests rather than modifying live requests. Rollback backups: - Dev: `/home/mvgldev/deploy-backups/issue943-6dda2c5b-nhjtgy_f` - Production: `/home/mvgl/deploy-backups/issue943-6dda2c5b-j93ru3ss` Deployment plans, checksums, runtime smoke results, and receipts are available under each account's `releases/issue943-6dda2c5b` directory. All five checklist items are complete; this issue is closed with `status/done`.
Sign in to join this conversation.
No milestone
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MyVideoGameList/myvideogamelist.com#943
No description provided.