Skip to content

Issue 53168: An aliquot can be updated to be its own parent’s parent#7091

Merged
XingY merged 3 commits intodevelopfrom
fb_issue53168
Oct 6, 2025
Merged

Issue 53168: An aliquot can be updated to be its own parent’s parent#7091
XingY merged 3 commits intodevelopfrom
fb_issue53168

Conversation

@XingY
Copy link
Contributor

@XingY XingY commented Oct 2, 2025

Rationale

We don't allow a sample/data to be its own parent, but we allow its descendent to be added as ancestors, resulting in circular lineage. This PR add check to see if a new parent is a existing child. This PR doesn't check for >1 generation descendants against parents.

Related Pull Requests

Changes

  • disallow adding direct children as sample/data's direct parent
  • add junit tests for circular lineage for aliquots, samples and sources

Tasks 📍

  • Manual Testing @labkey-chrisj
    • check adding sample's derivative as its parent
    • check adding sample's aliquot as its parent
    • check adding sample's child source as its data parent
    • adding source's source child as it's parent
    • check update from App ui
    • check update/merge from file
  • Needs Automation (junit tests added)
  • Verify Fix

@XingY XingY self-assigned this Oct 2, 2025
@XingY XingY requested a review from labkey-susanh October 3, 2025 17:44
}
catch (Exception e)
{
assertThat(e.getMessage(), containsString("'C1' is aliquoted from sample 'P2-1'. Circular relationships are not allowed."));
Copy link
Contributor

Choose a reason for hiding this comment

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

The message seems wrong here. C1 is derived not aliquoted, isn't it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch. Fixed.

@XingY XingY requested a review from labkey-susanh October 3, 2025 19:33
@XingY XingY merged commit 841755d into develop Oct 6, 2025
13 checks passed
@XingY XingY deleted the fb_issue53168 branch October 6, 2025 21:16
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.

2 participants