Skip to content

Y25-703 - Add ability to modify asynchronous accessions#5444

Merged
StephenHulme merged 22 commits intodevelopfrom
y25-286-confirm-accession-add-modify-behaviour
Jan 15, 2026
Merged

Y25-703 - Add ability to modify asynchronous accessions#5444
StephenHulme merged 22 commits intodevelopfrom
y25-286-confirm-accession-add-modify-behaviour

Conversation

@StephenHulme
Copy link
Copy Markdown
Contributor

@StephenHulme StephenHulme commented Jan 8, 2026

Closes #5414

This will allow manifest uploads to update accessioned sample data.

Changes proposed in this pull request

  • Use MODIFY action when changing samples
  • Remove check preventing modifying an already accessioned sample
  • Add stack trace to error logs
  • Add Save and Accession text to submit button when editing a sample
  • Add updated accessioned metadata event to sample history on successful modification

Post deployment

Enable feature flag y25_286_accession_individual_samples_with_sample_accessioning_job

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

@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 9, 2026

Codecov Report

❌ Patch coverage is 97.43590% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 87.19%. Comparing base (2f9e3fd) to head (d1d3063).
⚠️ Report is 25 commits behind head on develop.

Files with missing lines Patch % Lines
app/models/event/accessioning_event.rb 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #5444      +/-   ##
===========================================
+ Coverage    87.16%   87.19%   +0.02%     
===========================================
  Files         1458     1459       +1     
  Lines        32658    32681      +23     
  Branches      3406     3416      +10     
===========================================
+ Hits         28467    28495      +28     
+ Misses        4177     4171       -6     
- Partials        14       15       +1     

☔ View full report in Codecov by Sentry.
📢 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.

Comment thread lib/accession/sample.rb
def update_accession_number(accession_number, event_user)
sample.sample_metadata.sample_ebi_accession_number = accession_number
sample.save
sample.sample_metadata.save # prevent an infinite loop due to after_save callbacks on sample.save
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 is a similar call in app/models/accessionable/sample.rb‎ . However, it does save! there. Here it ignores the return value of just save .

@StephenHulme StephenHulme merged commit 969e727 into develop Jan 15, 2026
28 of 32 checks passed
@StephenHulme StephenHulme deleted the y25-286-confirm-accession-add-modify-behaviour branch January 15, 2026 15:14
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-703 - Add MODIFY action to samples accessioning (present on synchronous path, missing on asynchronous path)

2 participants