HTML-777: Validate that encounter dates times are within visit start and end date.#48
HTML-777: Validate that encounter dates times are within visit start and end date.#48icrc-toliveira wants to merge 7 commits intoopenmrs:masterfrom
Conversation
| if (validationErrors.size() > 0) { | ||
| return returnHelper(validationErrors, fes, null); | ||
| } | ||
| } else if(visit != null) { |
There was a problem hiding this comment.
thanks @icrc-toliveira we can put this on the same line
There was a problem hiding this comment.
Hi @HerbertYiga
I´m not sure if this was you mean, but I change the indentation to be on the same line.
However, I noticed that if I let the project auto-ident, the entire file will have changes
mks-d
left a comment
There was a problem hiding this comment.
@icrc-toliveira please add appropriate unit tests for this.
…mlformentryui into HTML-777 � Conflicts: � omod/src/test/java/org/openmrs/module/htmlformentryui/fragment/controller/htmlform/EnterHtmlFormFragmentControllerComponentTest.java
|
Hi @mks-d, @HerbertYiga I just created the requested test, |
|
@icrc-toliveira the new test passes even without your fix/changes |
…houldNotChangeTimeOfEncounterDateIfNewDateIsPriorToDateOfVisit
@dkayiwa Yes thx for noticing Unfortunately I had mistyped the second request. And since the test was validating the existence of error messages, the test would always pass |
hi @icrc-toliveira,thanks too for also working on this,we will also need this could you kindly attend to @dkayiwa 's comments above |
|
hi @icrc-toliveira trying to re ping you on this |
|
Hi @HerbertYiga, @dkayiwa Will have a look |
|
hi @dkayiwa does this look good enough to be merged now so that we release htmlformentryui? |
|
@HerbertYiga did you check the previous comments? |
hi @icrc-toliveira do you still have some time to complete this so that we release htmlformentryui as soon as possible? |
|
Hi @HerbertYiga, @dkayiwa I have been looking into the validation method mention by @dkayiwa, and yes indeed the Validation is called. It is possible to handled the error, but the message that we get from it its far from perfect and not translatable. Example on how to handle the exception: |
|
@icrc-toliveira are you able to reproduce this from here? https://qa-refapp.openmrs.org/ |
hi @icrc-toliveira ,@dkayiwa left some comment for you!! |
|
Hi @dkayiwa @HerbertYiga For now, I´m able to get the error but I´m unable to save the form. |
hi @dkayiwa could we be having any next steps here basing on these comments? cc @sherrif10 |
|
@icrc-toliveira is still investigating. |
|
hi @icrc-toliveira any progress on investigating this? |
Hi @HerbertYiga Not, much I tried to replicate the forms causing the error in https://qa-refapp.openmrs.org/, |


Background
The encounter date can be changed to be prior to the visit start date
Issue:
https://issues.openmrs.org/browse/HTML-777
Change:
Edit mode will now be validated