Page 1 of 1

Rest API - Booking endpoint issues

PostPosted: Thu Sep 12, 2019 11:35 am
by JiwaNewb
Hi all,

Currently trying to get BookIns working but having some troubles.

Current issues:
    1. Duplicate lines being created
    2. Can't seem to get LineDetail to work

My current process is (all stateless)
    1. Create a shipment in Jiwa
    2. Commit shipment for booking
    3. Create a BookIn using /BookIns/FromShipmentNo
    4. Based on the response from /BookIns/FromShipmentNo
    a) Update the JSON/Lines/Quantity fields
    b) Add a line details entry to JSON/Lines/LineDetails
    6. Patch the shipment using the updated data from 4. using /BookIns/{BookInID} patch endpoint

This will result in the lines being updated but the original lines are duplicated.

It will also ignore the contents of JSON/Lines/LineDetails and just create a dummy value based on JSON/Lines/Quantity.
This is an issue because I am passing Expiry and Batch/Serials through JSON/Lines/LineDetails.


If I update the lines via the /BookIns/{BookInID}/Lines/{LineID} patch endpoint, there are no duplicates created but JSON/Lines/LineDetails are still ignored.
I would also like to avoid this and do it via a single BookIn patch request if possible.

I have attached a sample /BookIns/{BookInID} patch request.
I have tried updating all the JSON/Lines/Quantity* fields with appropriate in/left/allocated fields and fully populated JSON/Lines/LineDetails nodes but they didn't seem to have any affect, so I have left them out of my example.

Re: Rest API - Booking endpoint issues

PostPosted: Mon Sep 16, 2019 11:20 am
by Mike.Sheen
I'll look into this - but before I go investing time testing the scenarios you outlined - can you tell me what version of Jiwa you are having these issues with?

Re: Rest API - Booking endpoint issues

PostPosted: Mon Sep 16, 2019 2:22 pm
by JiwaNewb
Hi Mike,

Thanks, this was in version 7.2.1.0 using the Demo database as a base

Re: Rest API - Booking endpoint issues  Topic is solved

PostPosted: Sun Sep 22, 2019 1:44 pm
by Mike.Sheen
Hi JiwaNewb,

Sorry about the slow reply (it's been a busy week!) - and thanks for your detailed and clear steps to repro - this made my life much easier.

The bad news, I'm afraid, is this is just a dumb bug - I've logged it as DEV-7804 to be fixed in the next SR.

You can track our progress on the next SR with this query - when there's none left then we're pretty much done.

Hopefully we'll get that done this week.

Mike

Re: Rest API - Booking endpoint issues

PostPosted: Mon Sep 23, 2019 11:09 am
by JiwaNewb
Thanks Mike.

Fellow developers know finding bugs can be painful with no detail, happy to help.

I will follow the release