Koha/tools
Jonathan Druart 87afa5142b Bug 17736: Replace GetReservesFromBiblionumber with Koha::Biblio->holds
The C4::Reserve::GetReservesFromBiblionumber took 3 parameters, the
biblionumber, an optional itemnumber and a "all_dates" flag.
If set, the subroutine returned all the holds placed on a given bibliographic
record, even the ones placed in the future. Almost all of the calls had this
flag set, they will be replaced with a call to Koha::Biblio->holds.

But 5 did not have it:
- C4::Biblio::DelBiblio
-tools/batch_delete_records.pl
=> These 2 were wrong, we want to retrieve the holds to cancel them
before deleting the record. We need to get all the holds, even the ones
placed in the future /!\ CHANGE IN THE BEHAVIOR

- acqui/parcel.pl
=> 1 call per item were made to this subroutine. They have been replaced
with only 1 call to the new method Koha::Biblios->holds_placed_before_today
Then we filter on the itemnumbers.
I think this is wrong: we need the number of holds to know if the record
can be deleted, so even if future holds exist, the deletion should not
be possible.

- serials/routing-preview.pl
- C4::ILSDI::Services::GetRecords
- C4::SIP::ILS::Item->new
=> Seems ok, we just one to display holds placed before today

Test plan:
I would suggest to test this patch with patches from bug 17737 and bug 17738,
to place different kind of holds (biblio and item level, future and
past).
Then do a whole workflow to detect bug, view a record, delete record,
order, place a hold on an item which has been ordered, etc.
The hold's informations should always be the same without or without
these patches.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2017-03-31 12:02:14 +00:00
..
csv-profiles
quotes Bug 17411: Remove 3 other occurrences of exit 1 2016-10-21 15:08:54 +00:00
ajax-inventory.pl
automatic_item_modification_by_age.pl Bug 16889: Remove C4::Items::biblioitems_columns and use Koha::Biblioitems->columns instead 2016-07-15 18:12:13 +00:00
background-job-progress.pl
batch_delete_records.pl Bug 17736: Replace GetReservesFromBiblionumber with Koha::Biblio->holds 2017-03-31 12:02:14 +00:00
batch_record_modification.pl Bug 16154: CGI->multi_param - Declare a list 2016-04-26 23:16:42 +00:00
batch_records_ajax.pl
batchMod.pl Bug 18256: Koha::Items - Remove GetItemsCount 2017-03-22 19:18:15 +00:00
cleanborrowers.pl Bug 16966: move parameters to hashref 2017-03-03 17:20:05 +00:00
copy-holidays.pl
csv-profiles.pl Bug 15451: Better error handling 2016-07-22 17:18:37 +00:00
exceptionHolidays.pl Bug 16154: Fix some other occurrences 2016-04-26 23:16:44 +00:00
export.pl Bug 15498: Let the user choose the CSV profile to export circ history 2017-03-31 11:13:47 +00:00
holidays.pl Bug 15758: Koha::Libraries - Remove GetBranches 2016-09-08 14:36:03 +00:00
import_borrowers.pl Bug 18124: Change the calls to generate and check CSRF tokens 2017-03-30 09:07:09 +00:00
inventory.pl Bug 15801: Koha::BiblioFrameworks - Remove C4::Koha::getframeworks 2016-10-28 12:04:59 +00:00
koha-news.pl Bug 17960: Rename opac_news.new with opac_news.content 2017-02-06 17:42:12 +00:00
letter.pl Bug 5260 - Add option to send an order by e-mail to the acquisition module 2016-10-28 11:52:25 +00:00
manage-marc-import.pl Bug 15801: Koha::BiblioFrameworks - Remove C4::Koha::getframeworks 2016-10-28 12:04:59 +00:00
marc_modification_templates.pl Bug 16148 - Revised layout and behavior of marc modification template management 2016-06-17 16:11:43 +00:00
modborrowers.pl Bug 16852: Remove GetBorrowerCategorycode 2016-11-02 10:56:39 +00:00
newHolidays.pl Bug 15758: Koha::Libraries - Remove GetBranches 2016-09-08 14:36:03 +00:00
overduerules.pl Bug 15758: Koha::Libraries - Move mybranch to C4::Context 2016-09-08 14:36:03 +00:00
picture-upload.pl Bug 18124: Change the calls to generate and check CSRF tokens 2017-03-30 09:07:09 +00:00
quotes-upload.pl
quotes.pl
scheduler.pl Bug 16154: Fix some other occurrences 2016-04-26 23:16:44 +00:00
showdiffmarc.pl Bug 17804: Remove some modules from showdiffmarc.pl 2016-12-23 11:26:36 +00:00
stage-marc-import.pl Bug 17501: Remove Koha::Upload::get from Koha::Upload 2017-01-20 14:20:05 +00:00
tools-home.pl Bug 15839: Koha::Reviews - Remove getnumberofreviews 2016-09-09 10:29:58 +00:00
upload-cover-image.pl Bug 17501: Remove Koha::Upload::get from Koha::Upload 2017-01-20 14:20:05 +00:00
upload-file.pl Bug 17501: Rename Upload to Uploader 2017-01-20 14:20:06 +00:00
upload.pl Bug 17501: [Follow-up] QA Requests 2017-01-20 14:20:07 +00:00
viewlog.pl Bug 17578: GetMemberDetails - Remove GetMemberDetails 2016-12-16 13:12:44 +00:00