Skip to content

Conversation

@kdp-cloud
Copy link
Collaborator

@kdp-cloud kdp-cloud commented Jan 13, 2026

image image

@kdp-cloud kdp-cloud requested a review from Copilot January 13, 2026 15:44
@kdp-cloud kdp-cloud self-assigned this Jan 13, 2026
@kdp-cloud kdp-cloud linked an issue Jan 13, 2026 that may be closed by this pull request
@kdp-cloud kdp-cloud added this to the 1.18.0 milestone Jan 13, 2026
@kdp-cloud kdp-cloud moved this to In review in SEEK 1.18.x Jan 13, 2026
Copy link
Contributor

Copilot AI left a 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_type string column to the sops table
  • 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.

@kdp-cloud kdp-cloud requested a review from stuzart January 14, 2026 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

Add SOP type to SOPs

2 participants