During work on OLMIS-3634, I found that updating the processing period is not working. When I tried to do it, I get the following error:
"error": "Internal Server Error",
"message": "org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.ClassCastException: org.openlmis.referencedata.dto.ProcessingPeriodDto cannot be cast to org.openlmis.referencedata.domain.ProcessingPeriod",
user should be able to update processing period
I was able to reproduce the issue. I also noticed that the 500 code is returned because of a different exception when trying to update the period with the use of a JSON containing its current, unaltered data, e.g.:
I checked that after updating the period I don't receive the status 500, only one that is suitable for the changes made, so it works well.
But it turned out that one can create periods without a name so I created a ticket for that OLMIS-6188.
I also noticed that for a quarterly processing schedule I can't add a period, because it appears that Start Date is incorrect, and dates of periods don't match the dates that give back-end, each time there is a shift of one day I created a separate ticket for it OLMIS-6189.