Bugzilla – Attachment 10125 Details for
Bug 7329
The "undo import into catalog" command deletes items onloan without checking
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7329 [Followup] : when reverting an import, keep matching biblionumber in batch table, if items are not deleted because they are issued.
Bug-7329-Followup--when-reverting-an-import-keep-m.patch (text/plain), 1.38 KB, created by
Sophie MEYNIEUX
on 2012-06-10 15:06:43 UTC
(
hide
)
Description:
Bug 7329 [Followup] : when reverting an import, keep matching biblionumber in batch table, if items are not deleted because they are issued.
Filename:
MIME Type:
Creator:
Sophie MEYNIEUX
Created:
2012-06-10 15:06:43 UTC
Size:
1.38 KB
patch
obsolete
>From 94d04e39696c836eebe3e4942a371a79e02ad7dc Mon Sep 17 00:00:00 2001 >From: Sophie Meynieux <sophie.meynieux@biblibre.com> >Date: Sun, 10 Jun 2012 17:01:26 +0200 >Subject: [PATCH] Bug 7329 [Followup] : when reverting an import, keep > matching biblionumber in batch table, if items are not > deleted because they are issued. > >--- > C4/ImportBatch.pm | 3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) > >diff --git a/C4/ImportBatch.pm b/C4/ImportBatch.pm >index 38d32a5..0bb93df 100644 >--- a/C4/ImportBatch.pm >+++ b/C4/ImportBatch.pm >@@ -687,7 +687,8 @@ sub BatchRevertBibRecords { > $num_items_deleted += BatchRevertItems($rowref->{'import_record_id'}, $rowref->{'matched_biblionumber'}); > SetImportRecordStatus($rowref->{'import_record_id'}, 'reverted'); > } >- my $sth2 = $dbh->prepare_cached("UPDATE import_biblios LEFT JOIN import_items USING (import_record_id) SET matched_biblionumber = NULL WHERE import_record_id = ? AND status != 'imported'" ); >+ # remove matched_biblionumber only if there is no 'imported' item left >+ my $sth2 = $dbh->prepare_cached("UPDATE import_biblios SET matched_biblionumber = NULL WHERE import_record_id = ? AND NOT EXISTS (SELECT * FROM import_items WHERE import_items.import_record_id=import_biblios.import_record_id and status='imported')" ); > $sth2->execute($rowref->{'import_record_id'}); > } > >-- >1.7.5.4
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 7329
:
6635
|
6829
|
10070
|
10125
|
10155
|
10156
|
10157