Skip to content

fix(invoicing): restore archive actions for cost entries in the admin - #416

Merged
adRn-s merged 3 commits into
developfrom
fix/restore-cost-archive-admin
Dec 1, 2026
Merged

adRn-s merged 3 commits into
developfrom
fix/restore-cost-archive-admin

Conversation

@adRn-s

@adRn-s adRn-s commented Dec 1, 2026

Copy link
Copy Markdown
Collaborator

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).

@adRn-s
adRn-s merged commit 768ada8 into develop Dec 1, 2026
3 of 8 checks passed
@adRn-s
adRn-s deleted the fix/restore-cost-archive-admin branch December 1, 2026 15:22
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.
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.

1 participant