Koha-clms/C4/SIP/ILS/Transaction
Colin Campbell fcd8e322f5 Bug 15438 - Checking out an on-hold item sends holder's borrowernumber in AF (screen message) field.
The returns from C4::Circulation::CanBookBeIssued used
to be structured as a hashref of entries like
   REASON => {
       data => 'foo',
       moredata => 'bar',
   };
Some entries still are. But many are now
   REASON => 1,
   data   => 'foo',
   moredata => 'bar',

The sip Checkout routine still assumed the former, as it
reports any causes it was not aware of (to maintain support for
a changing api) The data fields could leak into the screen message
field of the response. e.g. the borrowernumber or surname of the
borrower who has a hold on an issued title. Some real messages were
getting obscured by this

This patch sanatizes the return from from CanBookBeIssued
by removing keys which are not all uppercase
It also fixes a case where the key's data element was used
for the screen message when we should use the key itself

Updated the documentation of CanBookBeIssued to flag up
the assumption re case and the fact that 3 elements rather
than two may be returned

The loop through the returned keys was a bit bogus
so we now explicitly jump out if noerror is unset

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested quite extensively. Test results put on Bugzilla.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 4d223bdc61)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2017-09-19 16:55:48 +02:00
..
Checkin.pm Bug 18996: Handle data corruption from old_issues at SIP checkin 2017-09-06 13:52:53 +02:00
Checkout.pm Bug 15438 - Checking out an on-hold item sends holder's borrowernumber in AF (screen message) field. 2017-09-19 16:55:48 +02:00
FeePayment.pm Bug 16895 [QA Followup] - Don't require fee payment to be exact full payment 2017-04-21 10:59:53 -04:00
Hold.pm Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
Renew.pm Bug 14673: Work around change to AddIssue return 2015-11-06 12:03:37 -03:00
RenewAll.pm Bug 7904 Change SIP modules to use standard LIB path 2015-02-05 14:44:54 -03:00