Bugzilla – Attachment 16093 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] Bug 7593: Move orders on the destination record when merging 2 records
0006-bug7593-v1.patch (text/plain), 1.62 KB, created by
Mathieu Saby
on 2013-03-13 15:24:32 UTC
(
hide
)
Description:
[PATCH] Bug 7593: Move orders on the destination record when merging 2 records
Filename:
MIME Type:
Creator:
Mathieu Saby
Created:
2013-03-13 15:24:32 UTC
Size:
1.62 KB
patch
obsolete
>From 6c180bdec8e73e44ce2a85e055dd46c79b9f811d 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] Bug 7593: Move orders on the destination record when merging 2 records > >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, 9 insertions(+) > >diff --git a/cataloguing/merge.pl b/cataloguing/merge.pl >index 6a46d2f..bfb3222 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'); >@@ -109,6 +110,14 @@ if ($merge) { > push @errors, $error if ($error); > } > >+ # 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?) >+ } > # Parameters > $template->param( > result => 1, >-- >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