-
Notifications
You must be signed in to change notification settings - Fork 58
2333 add sop type to sops #2468
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds a new "SOP type" field to SOPs that can be set either as free text or selected from a controlled vocabulary. The implementation includes database schema changes, UI components for viewing and editing the SOP type, controller logic for dynamically loading vocabulary terms, and comprehensive test coverage.
Changes:
- Added
sop_typestring column to thesopstable - Created UI components for selecting SOP type with optional controlled vocabulary support
- Added controller action to dynamically fetch vocabulary term options via AJAX
- Implemented comprehensive test scenarios covering various use cases
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| db/migrate/20251210090925_add_sop_type_to_sops.rb | Migration to add sop_type column to sops table |
| db/schema.rb | Schema updated with new sop_type column and version |
| app/controllers/sops_controller.rb | Added sop_type_options action and updated permitted parameters |
| app/views/sops/show.html.erb | Display SOP type field on show page |
| app/views/sops/new.html.erb | Include SOP type selector in new form |
| app/views/sops/edit.html.erb | Include SOP type selector in edit form |
| app/views/sops/_sop_type_selector.html.erb | Partial for SOP type selection with CV support and AJAX handling |
| app/views/sops/_sop_type_options.html.erb | Partial for rendering vocabulary term options |
| config/routes.rb | Added route for sop_type_options action |
| test/functional/sops_controller_test.rb | Comprehensive tests for SOP type functionality |
| test/factories/sample_attribute_types.rb | Factory for protocol types controlled vocabulary |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.