Looking through the code, it seems that when we save Observations through ObsService, then the ObsValidator gets triggered.
But if we create an Encounter and put the Observations in the encounter. Then we save the Encounter through EncounterService, the Obs also gets saved becuase of the hibernate cascade. But the validation (ObsValidator) doesn’t get triggered in this case
Most of our observations gets saved through EncounterService and therefore this validation doesn’t get triggered.
We needed this validation to get triggered also when we saved Obs directly through and encounter save
@ysachinta108 you are correct. It was fixed with TRUNK-50 but never got back ported.
I personally feel that back porting to 1.12.x is fine. What do others think? @wyclif@darius@burke
It is a huge commit though!
It is up to @bharatak (as release manager for Platform 1.12) to decide whether he wants this bugfix backported to the 1.12.x branch.
Since Platform 1.12.0 has not been released yet, it’s still okay to backport new features to that branch (as long as it’s also in Platform 2.0). The issue in question is a bugfix, not a new feature, so it is technically okay to backport even in a maintenance release. Though, with the size of the change I would definitely prefer to do it in a .0 vs a .1.
So, @ysachinta108, if Bahmni wants/needs this bugfix backported, you should ask @bharatak (wearing his OpenMRS Release Manager hat) to approve that backporting.
I dont think we should go with the bugfix backported at this time when we are about to release 1.12 considering the size of the change. Spoke with @ysachinta108 and he is fine with it. So, we are not doing it in 1.12.0. If it is required, we may consider doing it in .1 as @darius suggested.