Y26 031 labware location report by retention instructions#5637
Y26 031 labware location report by retention instructions#5637
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #5637 +/- ##
===========================================
- Coverage 87.34% 87.30% -0.04%
===========================================
Files 1477 1477
Lines 33526 33532 +6
Branches 3550 3552 +2
===========================================
- Hits 29284 29276 -8
- Misses 4221 4235 +14
Partials 21 21
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Adds retention-instruction support to Location Reports so users can filter returned labware by retention instruction, while persisting the selected instructions on the report record.
Changes:
- Add
retention_instructions(serialized array) toLocationReportand persist it via a new DB column. - Extend the selection form + controller strong params to allow multi-select retention instructions.
- Filter selected labware by retention instruction and add an RSpec scenario for it.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| spec/models/location_report_spec.rb | Adds coverage for filtering by retention instruction. |
| db/schema.rb | Updates schema with the new location_reports.retention_instructions column. |
| db/migrate/20260325134057_add_retention_instructions_to_lcation_reports.rb | Introduces the migration adding the new column. |
| app/views/location_reports/_location_labware_selection_form.html.erb | Adds a multi-select retention instruction filter UI. |
| app/models/location_report/location_report_form.rb | Passes retention_instructions from the form into the model. |
| app/models/location_report.rb | Serializes retention_instructions and filters labware results accordingly. |
| app/controllers/location_reports_controller.rb | Permits retention_instructions as an array param. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
BenTopping
left a comment
There was a problem hiding this comment.
Couple questions about whether we need to support multiple retention_instructions.
N.B. Haven't tested locally.
…ntion-instructions
…ntion-instructions
…ntion-instructions
…ntion-instructions
…ntion-instructions
…ntion-instructions
StephenHulme
left a comment
There was a problem hiding this comment.
Looks good in general, but a couple comments and questions.
In the specs, why has plate_1_custom_metadatum changed to plate_1_retention_instruction?
Because the retention instruction used to live in custom_metadata table, but now move to labware table. so the custom_metadata no longer needed. |
Was the old column deleted? If so, how did this test pass before the change was made? Or was the column move made in an earlier PR and these tests were not updated? |
It wasn't a column, it is a table called 'custom_metadata' , the table has 'key' & 'value' column, so can store different type of data, the retention instruction was stored there using key 'retention_instruction'. Since the table 'custom_metadata' schema/columns not changed, so the test still works, just not returning any data, I think. |
|
Ah that makes a lot more sense, thanks - I'd forgotton that that table used a key-value architecture. |
…ntion-instructions
Closes #
Changes proposed in this pull request
add retention instruction column in location report table
add filter by retention instruction on the return record
Instructions for Reviewers
[All PRs] - Confirm PR template filled
[Feature Branches] - Review code
[Production Merges to
main]- Check story numbers included
- Check for debug code
- Check version