Rename open_access to open_access_upload on WorkVersion#1996
Merged
Alex Kiessling (ajkiessl) merged 8 commits intoJun 11, 2026
Merged
Conversation
Alex Kiessling (ajkiessl)
requested changes
Jun 5, 2026
Alex Kiessling (ajkiessl)
left a comment
Collaborator
There was a problem hiding this comment.
This looks good. The only issue here is that the db/schema got a little messed up. This tends to happen locally for some reason. I explain what needs reverted below 👇
| ActiveRecord::Schema[7.2].define(version: 2026_04_28_182459) do | ||
| ActiveRecord::Schema[7.2].define(version: 2026_06_04_000000) do | ||
| # These are extensions that must be enabled in order to support this database | ||
| enable_extension "pg_stat_statements" |
Collaborator
There was a problem hiding this comment.
enable_extension "pg_stat_statements" needs added back in.
| create_table "versions", force: :cascade do |t| | ||
| t.string "item_type", null: false | ||
| t.string "item_type" | ||
| t.string "{null: false}" |
Collaborator
There was a problem hiding this comment.
This needs reverted too.
…? helper Resolved merge conflicts in work_version.rb and work_version_spec.rb by taking main's version (WorkPublishedWebhookJob moved to publish_controller). Fixed four new open_access column references introduced via main's OA workflow additions. Restored open_access_upload? helper method and its tests.
Alex Kiessling (ajkiessl)
requested changes
Jun 10, 2026
Comment on lines
+396
to
+398
| def open_access_upload? | ||
| open_access_upload == true | ||
| end |
Collaborator
There was a problem hiding this comment.
I actually think Rails automatically gives us this method for booleans. So, you can remove this and either implement open_access_upload? in all the places like: work_version.open_access_upload, or just leave the implementations as they are.
…atically for boolean columns
These references to the old open_access column name were introduced by the open access workflow code merged from main and missed during the initial rename.
…heckbox The checkbox id was renamed to open_access_upload_checkbox but the label for attribute and several feature specs still referenced the old open_access_checkbox id.
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.
Renames the open_access boolean column on WorkVersion to open_access_upload to avoid conflicts with the existing open_access? method on the Permissions concern, which checks access controls and is unrelated to this field.
Changes:
Migration to rename the column
Updated all references across models, forms, controllers, and views
Added explicit open_access_upload? helper method on WorkVersion
Updated all affected specs
Note: The open_access? method in app/models/concerns/permissions.rb was intentionally left unchanged as it checks ACL-based visibility and is unrelated to this column.