Repository navigation
fix(invoicing): restore archive actions for cost entries in the admin - #416
Merged
Merged
Conversation
adRn-s
added a commit
that referenced
this pull request
Dec 1, 2026
#416 restored the archive actions and the archived column in the cost admins, so TestCostAdminArchivalRemoved asserted the opposite and failed on every build-and-test job.
adRn-s
added a commit
that referenced
this pull request
Dec 1, 2026
Libraries and samples get an optional secondary organism (for example a spike-in), using the same Organism list as the primary one. The Add Request form does not offer it yet, so this PR changes the backend only. - Model: nullable FK to Organism on Library and Sample, with history tables. - API and admin: both return and filter on the field. - Summary tables: complete_library_data_mv and complete_sample_data_mv carry secondary_organism_name, and it is part of the search text. Older summary-table migrations use a select without the field, so a fresh database still migrates. - Cache refresh follows the secondary FK when an Organism changes. - Excel resources, RO-Crate (secondaryOrganism, shares the organism entity) and the metadata exporter include the field. ENA TSV headers are unchanged, because that format has one organism per sample. - Removed the TestCostAdminArchivalRemoved tests. #416 restored the archive actions they asserted were gone, and they failed on develop too.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Restores the Mark as archived / Mark as non-archived actions and the Archived filter for Fixed, Library Preparation and Sequencing costs. #390 removed them on the wrong assumption that an archived price zeroes old runs. The lookup uses the price in force at each flowcell's date, so archiving only affects flowcells dated after it.
Checked: ruff check and format. No tests run (admin-only change). pk2test still holds all archived flags (read-only check).