When I was reviewing OLMIS-6212, I noticed that currently, it's impossible to create the kit unpack list. When trying to do so, errors in the console occur, as visible on screenshots. The issue occurs on both browsers.
Whole error from Network:
"timestamp" : "2020-09-30T06:32:25.443+0000",
"status" : 400,
"error" : "Bad Request",
"message" : "JSON parse error: null; nested exception is com.fasterxml.jackson.databind.JsonMappingException: N/A\n at [Source: (PushbackInputStream); line: 1, column: 544] (through reference chain: org.openlmis.referencedata.dto.OrderableDto["children"]->java.util.HashSet->org.openlmis.referencedata.dto.OrderableChildDto["orderable"]->org.openlmis.referencedata.domain.Orderable["id"])",
"path" : "/api/orderables/d602d0c6-4052-456c-8ccd-61b4ad77bece"
Log in as administrator.
Go to Administration > Products.
Click the “Edit” button next to any product.
Go to the “Kit Unpack List” tab.
Click the “Add Product” button.
Select any product and click the “Add Products” button.
Enter any number in the “Quantity” field and click the “Save Kit Unpack List” button.
The list is not created. Instead, errors occur.
It should be possible to create kit unpack lists;
It should be possible to update kit unpack lists (including deletion).
NOTE: After clicking the "Unpack kit" button next to Essential Meds an internal error occurs.
Please don’t work on this yet
I tested the ticket, and now creation, update and deletion of the kit unpack list works correctly on all browsers. I only noticed a regression that might be related to the changes introduced in this ticket - after adding a product to the list, the already-added product is not selected in the “Add Products” modal after saving the list and re-opening the modal. This shouldn’t be so, and it works correctly on demo-v3, so it’s a regression. Please check if the issue is related to your changes and let me know. If not, I’ll close the ticket and create a new one for the issue found.
I checked this and it looks like my changes don't affect this unwanted behavior. In response, we get the correct orderable so it looks like the problem is on UI. We should create a new ticket to fix this bug.
OK, I see, thank you for looking into it! In that case, I’ll move the ticket to Done.