Bugzilla – Attachment 16311 Details for
Bug 7593
merging bib records loses connection to order line
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PATCH][Revised] Bug 7593: Move orders on the destination record when merging 2 records
0005-Bug-7593-Move-orders-on-the-destination-record-when-.patch (text/plain), 1.68 KB, created by
Mathieu Saby
on 2013-03-18 20:43:21 UTC
(
hide
)
Description:
[PATCH][Revised] Bug 7593: Move orders on the destination record when merging 2 records
Filename:
MIME Type:
Creator:
Mathieu Saby
Created:
2013-03-18 20:43:21 UTC
Size:
1.68 KB
patch
obsolete
>From e7e2185d4ce326f4c01362896d31008022f290ca Mon Sep 17 00:00:00 2001 >From: Mathieu Saby <mathieu.saby@univ-rennes2.fr> >Date: Wed, 13 Mar 2013 16:12:03 +0100 >Subject: [PATCH][Revised] Bug 7593: Move orders on the destination record when merging 2 records > >Revision : execute code before deleting the record > >Note : this patch uses Acquisition::GetOrdersByBiblionumber created by bug 9780. >So you need to apply bug 9780 before testing this one. > >At present, merging records breaks the link order/record. >This patch moves existing orders from deleted record to destination record. > >To test : >1. create a basket with one order >2. put the record used by this order in a list >3. put an other record in the list >4. merge the 2 records >5. check if the order in the basket is updated > >--- > cataloguing/merge.pl | 10 ++++++++++ > 1 file changed, 10 insertions(+) > >diff --git a/cataloguing/merge.pl b/cataloguing/merge.pl >index 6a46d2f..18de702 100755 >--- a/cataloguing/merge.pl >+++ b/cataloguing/merge.pl >@@ -29,6 +29,7 @@ use C4::Biblio; > use C4::Serials; > use C4::Koha; > use C4::Reserves qw/MergeHolds/; >+use C4::Acquisition qw/ModOrder GetOrdersByBiblionumber/; > > my $input = new CGI; > my @biblionumber = $input->param('biblionumber'); >@@ -101,6 +102,15 @@ if ($merge) { > > # TODO : Moving reserves > >+ # Moving orders >+ my @allorders = GetOrdersByBiblionumber($frombiblio); >+ foreach my $myorder (@allorders) { >+ $myorder->{'biblionumber'} = $tobiblio; >+ $myorder->{'biblioitemnumber'} = $tobiblio; #maybe useless >+ ModOrder ($myorder); >+ # TODO : add error control (in ModOrder?) >+ } >+ > # Deleting the other record > if (scalar(@errors) == 0) { > # Move holds >-- >1.7.9.5 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 7593
:
16093
|
16311
|
16322
|
17162
|
17657
|
17700
|
17833
|
17913
|
17914
|
18113
|
18114