Skip to content

Commit

Permalink
Merge pull request #8361 from hzi-braunschweig/bugfix-8191-new-follow…
Browse files Browse the repository at this point in the history
…-up-until-date-not-updated

#8191 - Save associated case after updating a sample
  • Loading branch information
BarnaBartha committed Mar 14, 2022
2 parents a29b2cd + 7d1576f commit 90242d6
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -319,6 +319,10 @@ public CommitDiscardWrapperComponent<SampleEditForm> getSampleEditComponent(
FacadeProvider.getSampleFacade().saveSample(changedDto);
SormasUI.refreshView();

final CaseReferenceDto associatedCase = changedDto.getAssociatedCase();
final CaseDataDto caseDataByUuid = FacadeProvider.getCaseFacade().getCaseDataByUuid(associatedCase.getUuid());
FacadeProvider.getCaseFacade().save(caseDataByUuid);

if (changedDto.getSpecimenCondition() != originalDto.getSpecimenCondition()
&& changedDto.getSpecimenCondition() == SpecimenCondition.NOT_ADEQUATE
&& UserProvider.getCurrent().hasUserRight(UserRight.TASK_CREATE)) {
Expand Down

0 comments on commit 90242d6

Please sign in to comment.