Fix PUT /processingPeriods/id

Description

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:

"timestamp": "2019-04-02T08:47:48.327+0000",
"status": 500,
"error": "Internal Server Error",
"exception": "java.lang.ClassCastException",
"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",
"path": "/api/processingPeriods/516ac930-0d28-49f5-a178-64764e22b236"

Acceptance Criteria:

  • user should be able to update processing period

Environment

None

Activity

Show:
Joanna Bebak
April 3, 2019, 2:24 PM

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.:

The error:

Joanna Szymańska
April 9, 2019, 9:44 AM

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.

Assignee

Paulina Buzderewicz

Reporter

Klaudia Pałkowska

Labels

None

Story Points

2

Time tracking

8h

Components

Sprint

None

Fix versions

Priority

Blocker
Configure