Bugzilla – Attachment 24166 Details for
Bug 11018
Add order from a reverted file
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11018 - Add order from a reverted file
Bug-11018---Add-order-from-a-reverted-file.patch (text/plain), 2.34 KB, created by
Biblibre Sandboxes
on 2014-01-10 17:18:28 UTC
(
hide
)
Description:
Bug 11018 - Add order from a reverted file
Filename:
MIME Type:
Creator:
Biblibre Sandboxes
Created:
2014-01-10 17:18:28 UTC
Size:
2.34 KB
patch
obsolete
>From 38a029068d11c0c73e02ebb353dc413c1bebd264 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Tue, 8 Oct 2013 17:17:45 +0200 >Subject: [PATCH] Bug 11018 - Add order from a reverted file > >Weird behavior: >When an import is undone into catalog, the status is set to "reverted". >But if you open the add orders from iso2709, the status is automatically >set to "imported" and does not appear in the list. >So it is not possible to import a reverted batch. > >Test plan: >- verify you reproduce the weird behavior >- apply this patch >- import a file and the batch into the catalog >- verify (in the your mysql/MariaDB cli) the status is "imported" >- verify it does not appears in the add orders from iso2809 page >- undo the import >- verify (in the your mysql/MariaDB cli) the status is "reverted" >- verify it appears in the add orders from iso2809 page and the status > is always "reverted" >- finish the order > >Signed-off-by: Pierre Angot <tredok.pierre@gmail.com> >--- > acqui/addorderiso2709.pl | 7 ++++--- > 1 files changed, 4 insertions(+), 3 deletions(-) > >diff --git a/acqui/addorderiso2709.pl b/acqui/addorderiso2709.pl >index d40e912..e56bd06 100755 >--- a/acqui/addorderiso2709.pl >+++ b/acqui/addorderiso2709.pl >@@ -329,9 +329,9 @@ sub import_batches_list { > > my @list = (); > foreach my $batch (@$batches) { >- if ($batch->{'import_status'} eq "staged") { >+ if ( $batch->{'import_status'} =~ /^staged$|^reverted$/ ) { > # check if there is at least 1 line still staged >- my $stagedList=GetImportRecordsRange($batch->{'import_batch_id'}, undef, undef, 'staged'); >+ my $stagedList=GetImportRecordsRange($batch->{'import_batch_id'}, undef, undef, $batch->{import_status}); > if (scalar @$stagedList) { > push @list, { > import_batch_id => $batch->{'import_batch_id'}, >@@ -356,7 +356,8 @@ sub import_batches_list { > sub import_biblios_list { > my ($template, $import_batch_id) = @_; > my $batch = GetImportBatch($import_batch_id,'staged'); >- my $biblios = GetImportRecordsRange($import_batch_id,'','','staged'); >+ return () unless $batch and $batch->{import_status} =~ /^staged$|^reverted$/; >+ my $biblios = GetImportRecordsRange($import_batch_id,'','',$batch->{import_status}); > my @list = (); > > foreach my $biblio (@$biblios) { >-- >1.7.2.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 11018
:
21883
|
24166
|
24180