You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
introduces a comprehensive bulk activation workflow for contest instances, improves entry editing logic to better support administrative corrections, and adds several supporting utilities and policy updates. - #282
This pull request introduces a comprehensive bulk activation workflow for contest instances, improves entry editing logic to better support administrative corrections, and adds several supporting utilities and policy updates. The main themes are the addition of bulk contest instance activation, enhanced entry update handling, and supporting service and model changes.
Bulk Contest Instance Activation
Added a new controller BulkContestInstanceActivationsController to handle the bulk activation flow, including form handling, validation, and reporting.
Introduced BulkContestInstanceActivationForm for validating activation requests, including date parsing and confirmation logic.
Implemented BulkContestInstanceActivator service to activate contest instances in bulk, with detailed reporting of activated, deactivated, skipped, failed, and unchanged instances.
Added supporting scopes to ContestInstance for querying inactive, not archived, and date-specific instances.
The bulk activation report is now shown on the container page after activation, using session and cache for temporary storage. [1][2]
Bulk Creation and Activation Flow Improvements
After bulk creation of contest instances, the user is redirected to the new bulk activation screen for the created season, streamlining the workflow. [1][2][3][4]
Entry Editing and Profile Handling
Entry updates now always target the entry owner's profile (not the editor's), ensuring that administrative users (like Axis Mundi) do not accidentally update their own profile when editing another user's entry. [1][2][3][4]
Entry update parameters are now restricted to prevent changing the contest instance after creation, maintaining contest integrity.
The entry update policy has been clarified: owners can edit while the contest is open, and admins can always edit for corrections.
Supporting Service and Model Improvements
Judging round date updates are now applied per-round in a single update to avoid validation errors from partial updates.
These changes collectively provide a robust and user-friendly workflow for managing contest instance activations and ensure data integrity and proper permission handling throughout the entry lifecycle.
Restore EntryPolicy#update? so owners can edit open submissions, sync the
in-memory profile class level used during answer validation, and cover
upsert, class-level switching, and non-applicable answer preservation.
Co-authored-by: rsmoke <rsmoke@umich.edu>
Let admins activate a shared date_open season after bulk create (or later), promoting each contest’s newest instance while closing the predecessor and completing its judging rounds.
Co-authored-by: Cursor <cursoragent@cursor.com>
…rgeting.
Keep contest_instance_id immutable on update, and always read/write the entry owner's profile so Axis Mundi edits cannot reassign contests or mutate an admin profile.
…rgeting.
Keep contest_instance_id immutable on update, and always read/write the entry owner's profile so Axis Mundi edits cannot reassign contests or mutate an admin profile.
Co-authored-by: Cursor <cursoragent@cursor.com>
Scope activation to the selected season date, serialize per-description updates with row locks, cache the report instead of the cookie session, and validate malformed open dates before querying.
Co-authored-by: Cursor <cursoragent@cursor.com>
…test close.
Apply start and end date changes in one update so validations see the intended state instead of rejecting against a stale start_date.
Co-authored-by: Cursor <cursoragent@cursor.com>
Activation reports are not scoped to their container
app/controllers/containers_controller.rb:208
This loader consumes the session's single report key for whichever container is shown, without recording or checking the container that produced the report. If a user activates one collection and then opens another collection (for example in a second tab), the second page can display the first collection's activation report and the intended page loses it. Include the container id in the cached/session payload and only consume the report when it matches @container (or otherwise scope the key to the container).
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
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.
This pull request introduces a comprehensive bulk activation workflow for contest instances, improves entry editing logic to better support administrative corrections, and adds several supporting utilities and policy updates. The main themes are the addition of bulk contest instance activation, enhanced entry update handling, and supporting service and model changes.
Bulk Contest Instance Activation
BulkContestInstanceActivationsControllerto handle the bulk activation flow, including form handling, validation, and reporting.BulkContestInstanceActivationFormfor validating activation requests, including date parsing and confirmation logic.BulkContestInstanceActivatorservice to activate contest instances in bulk, with detailed reporting of activated, deactivated, skipped, failed, and unchanged instances.ContestInstancefor querying inactive, not archived, and date-specific instances.Bulk Creation and Activation Flow Improvements
Entry Editing and Profile Handling
Supporting Service and Model Improvements
These changes collectively provide a robust and user-friendly workflow for managing contest instance activations and ensure data integrity and proper permission handling throughout the entry lifecycle.