Bugzilla – Attachment 183782 Details for
Bug 34200
Lists and merge catalog records
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34200: Move lists when merging records
Bug-34200-Move-lists-when-merging-records.patch (text/plain), 1.48 KB, created by
Jonathan Druart
on 2025-07-04 08:32:09 UTC
(
hide
)
Description:
Bug 34200: Move lists when merging records
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-07-04 08:32:09 UTC
Size:
1.48 KB
patch
obsolete
>From 79c44222527f48873dbe3a210a58fc98ec53f31e Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 4 Jul 2025 10:29:45 +0200 >Subject: [PATCH] Bug 34200: Move lists when merging records > >This is the naive approach, but it's not enough. > >* If the 2 records were in the same list then the resulting record will >appear twice in the list >* What if the record that is going to be deleted was in a private list > and the the logged in user does not have permission to edit it? > >Also we are missing tests. >--- > Koha/Biblio.pm | 7 +++++++ > 1 file changed, 7 insertions(+) > >diff --git a/Koha/Biblio.pm b/Koha/Biblio.pm >index 0df2b489a73..b1099e55d88 100644 >--- a/Koha/Biblio.pm >+++ b/Koha/Biblio.pm >@@ -62,6 +62,7 @@ use Koha::SearchEngine; > use Koha::SearchEngine::Search; > use Koha::SearchEngine::QueryBuilder; > use Koha::Tickets; >+use Koha::Virtualshelfcontents; > > =head1 NAME > >@@ -2336,6 +2337,12 @@ sub merge_with { > { no_triggers => 1 } > ); > >+ # Move lists >+ Koha::Virtualshelfcontents->search( { biblionumber => $from_biblio->biblionumber } )->update( >+ { biblionumber => $ref_biblionumber }, >+ { no_triggers => 1 } >+ ); >+ > my $orders = $from_biblio->orders->unblessed; > for my $order (@$orders) { > $order->{'biblionumber'} = $ref_biblionumber; >-- >2.34.1
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 34200
: 183782