Bug 7454 - Sip renewal all response returns incorrect info
Summary: Sip renewal all response returns incorrect info
Alias: None
Product: Koha
Classification: Unclassified
Component: SIP2 (show other bugs)
Version: 3.6
Hardware: All All
: P5 - low major (vote)
Assignee: Colin Campbell
QA Contact: Ian Walls
Depends on:
Reported: 2012-01-20 12:36 UTC by Colin Campbell
Modified: 2013-12-05 20:01 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:

Proposed Patch (1.43 KB, patch)
2012-01-20 15:14 UTC, Colin Campbell
Details | Diff | Splinter Review
Bug 7454 Initialize return arrays in ILS/Transaction/RenewAll (1.53 KB, patch)
2012-02-19 06:51 UTC, Chris Cormack
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Colin Campbell 2012-01-20 12:36:11 UTC
Testing by talkingtech to use the Koha sip interface for telephone renewals found that the response to a renew all request was returning more renewed items than the user actually had on loan.

The usual workflow is for the client to send a patron info request to get a list of onloan items. The client can then send renewal requests individually or for all.

Subsequent testing found that in a simple case after a couple of calls to renew_all for the same patron with one item on loan caused the response to list the same item twice, then three times, then four etc (on initial testing the number of items was wrong but as they came from another borrower it was not so clear that the list was just repeating from a previous session. 
Cause is that the data members used to return the list of item barcodes was not being cleared for the transaction and items could persist from a previous transaction
Comment 1 Colin Campbell 2012-01-20 15:14:49 UTC Comment hidden (obsolete)
Comment 2 Colin Campbell 2012-01-20 15:17:30 UTC
talkingtech and Staffordshire University have tested on their systems and the proposed patch corrects the system behaviour
Comment 3 Chris Cormack 2012-02-19 06:51:09 UTC
Created attachment 7750 [details] [review]
Bug 7454 Initialize return arrays in ILS/Transaction/RenewAll

Explicitly clear these arrays and update them directly.
In practice item numbers were already in them when called
so that more items were being returned than were actually
renewed (or failed)

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Functionally sound patch, and tested in production
Comment 4 Paul Poulain 2012-02-21 16:35:45 UTC
QA comment: tiny patch, passed QA
Comment 5 Jared Camins-Esakov 2012-05-23 23:30:07 UTC
This patch will be included in the forthcoming 3.6.5 release (no string changes).