Skip to content

[LIMS-1669] Allow samples to have ancestors/descendants #1

Merged
gfrn merged 9 commits intomasterfrom
feature/lims-1669/parent-child
Apr 23, 2025
Merged

[LIMS-1669] Allow samples to have ancestors/descendants #1
gfrn merged 9 commits intomasterfrom
feature/lims-1669/parent-child

Conversation

@gfrn
Copy link
Collaborator

@gfrn gfrn commented Apr 11, 2025

JIRA ticket: LIMS-1669

Pull the latest version of the dev-env repository to update the database version

Summary:

To allow users to describe how a sample is modified through time, sample copies can now have parents/children that can help describe the process that took place.

Changes:

  • GET requests for samples now return a list of parents/children
  • POST requests for samples now allow users to set sample parents when creating samples

To test:

  • Send a POST request to /shipments/1/samples with {"containerId": 4, "subLocation": 1, "proteinId": 4407, "parents": [561]} as the body, ensure a new entry is created in the SampleParnetChild table is created with 561 as the parentId and the ID of the sample you just created as the child ID.
  • Send a GET request to /shipments/117/samples, ensure the derivedSamples field has a sample in it with sample ID 1877
  • Send a GET request to /shipments/229/samples, ensure the originSamples field has a sample in it with sample ID 612

Copy link
Collaborator

@ndg63276 ndg63276 left a comment

Choose a reason for hiding this comment

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

LGTM

@gfrn gfrn merged commit 32fc2b0 into master Apr 23, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants