Skip to content

Conversation

@otchet-broad
Copy link
Contributor

Addresses

https://broadworkbench.atlassian.net/browse/DT-2750

Summary

Removes all study properties when receiving a new registration for a study. This allows patching to work for a particular study property through the new patch endpoint, but cleans up old study properties that may no longer be relevant when submitting a new registration and applying it to an existing study.


Have you read CONTRIBUTING.md lately? If not, do that first.

  • Label PR with a Jira ticket number and include a link to the ticket
  • Label PR with a security risk modifier [no, low, medium, high]
  • PR describes scope of changes
  • Get a minimum of one thumbs worth of review, preferably two if enough team members are available
  • Get PO sign-off for all non-trivial UI or workflow changes
  • Verify all tests go green
  • Test this change deployed correctly and works on dev environment after deployment

Optional<StudyProperty> updatedProp1 =
updatedStudy.getProperties().stream()
.filter(p -> p.getStudyPropertyId().equals(prop1.getStudyPropertyId()))
.filter(p -> p.getKey().equals(prop1.getKey()))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since we're deleting and reinserting the property now, the ID can change. Using the property Key ensures that we're finding the property we expect.

@otchet-broad otchet-broad changed the title [DT-2750] erase old study properties before applying new registration to a study. [DT-2750] Erase old study properties before applying new registration to a study. Dec 15, 2025
@otchet-broad otchet-broad marked this pull request as ready for review December 15, 2025 17:57
@otchet-broad otchet-broad requested a review from a team as a code owner December 15, 2025 17:57
@otchet-broad otchet-broad requested review from kevinmarete and rushtong and removed request for a team December 15, 2025 17:57
Copy link
Contributor

@rushtong rushtong left a comment

Choose a reason for hiding this comment

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

Minor comment inline, address as you see fit. 👍🏽

@sonarqubecloud
Copy link

@otchet-broad otchet-broad merged commit 1a011fe into develop Dec 15, 2025
14 checks passed
@otchet-broad otchet-broad deleted the otchet-dt-2750-erase-old-properties-before-registration-based-changes branch December 15, 2025 20: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.

4 participants