Skip to content

Y25-263 - Bug - fix to various classes to facilitate loop back to XP plate - #5982

Open
andrewsparkes wants to merge 17 commits into
developfrom
y25-263-bug-cannot-redo-multiplexing-submission
Open

andrewsparkes wants to merge 17 commits into
developfrom
y25-263-bug-cannot-redo-multiplexing-submission

Conversation

@andrewsparkes

@andrewsparkes andrewsparkes commented Aug 12, 2026 •

Copy link
Copy Markdown
Member

To fix bug preventing creation of additional Multiplexing submissions from XP plate.

Closes #5981

Changes proposed in this pull request

Instructions for Reviewers

The story description explains how to replicate the original issue.

Essentially you run a pipeline once, then want to go back to the XP plate and create a new Multiplexing and Seq submission.

It was failing because it was using the submission id from the first run (via the outer request) when trying to create transfer requests, instead of filtering to the newer, active submission with it's requests in well.requests_as_source. This causes it to try to re-use the MX pool tube from the first run, and triggers a tag clash error as it tries to put new aliquots (with the same tags) into that previously used tube.

The fixes in this PR look for that new active submission, and defaults to the current way of looking in outer request if not present.

Integration test PR
https://gitlab.internal.sanger.ac.uk/psd/integration-suite/-/merge_requests/328

@andrewsparkes andrewsparkes self-assigned this Aug 12, 2026
@codecov

codecov Bot commented Aug 12, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.65%. Comparing base (59a35a7) to head (4111180).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #5982      +/-   ##
===========================================
- Coverage    83.79%   83.65%   -0.15%     
===========================================
  Files         1297     1298       +1     
  Lines        31820    31827       +7     
  Branches      3520     3521       +1     
===========================================
- Hits         26665    26625      -40     
- Misses        4336     4382      +46     
- Partials       819      820       +1     
Flag Coverage Δ
javascript 85.29% <ø> (ø)
ruby 83.50% <100.00%> (-0.14%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@andrewsparkes andrewsparkes linked an issue Aug 13, 2026 that may be closed by this pull request

@StephenHulme StephenHulme left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good, a fair bit of complexity there but thank you for the good doc-strings they make it much easier to understand.

@KatyTaylor KatyTaylor left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for slowness, finding the code quite dense (not very familiar with this area) and getting distracted by other things. I've only looked at the first class in detail, but have a few concerns. Let me know if you want to talk through. Obviously seems to be behaving well in your tests though 🤔 Thanks.

Comment thread app/models/transfer/from_plate_to_tube_by_submission.rb Outdated
Comment thread app/models/transfer/from_plate_to_tube_by_submission.rb Outdated
Comment thread app/models/transfer/from_plate_to_tube_by_submission.rb Outdated
Comment thread app/models/transfer/from_plate_to_tube_by_submission.rb Outdated

@yoldas yoldas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a few naming suggestions in other comments. The tests cover the path and the scenario from the ticket (old completed request + new active one). I have highlighted a few hot spots with notes. I think this PR resolves the issue.

Comment thread app/models/transfer/from_plate_to_tube_by_submission.rb Outdated
Comment thread app/models/transfer/from_plate_to_tube_by_submission.rb Outdated
Comment thread app/models/transfer_request.rb
Comment thread app/models/transfer/from_plate_to_tube_by_submission.rb
ACTIVE_STATES = %w[pending started passed qc_complete].freeze

# States considered to be transferable
TRANSFERABLE_STATES = %w[pending started].freeze

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: this is no longer used anywhere

@yoldas yoldas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the latest change that adds LB Cap Lib PCR-XP record in SS will set the purpose type correctly for a fresh database. For existing databases, it needs a post-deployment procedure to set it.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Y25-263 - [BUG] Can't redo multiplexing submission

4 participants