Bugzilla – Attachment 4218 Details for
Bug 6074
setting import flags when staged file imported in aqbasket
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Signed off patch
0001-SIGNED-OFF-BZ6074-setting-import-flag-when-staged-fi.patch (text/plain), 3.49 KB, created by
Katrin Fischer
on 2011-05-22 19:16:40 UTC
(
hide
)
Description:
Signed off patch
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2011-05-22 19:16:40 UTC
Size:
3.49 KB
patch
obsolete
>From 55fdfee0d86da2b4b25ededf27f49ef5cfe25116 Mon Sep 17 00:00:00 2001 >From: Paul Poulain <paul.poulain@biblibre.com> >Date: Tue, 5 Apr 2011 22:11:15 +0200 >Subject: [PATCH] [SIGNED-OFF] BZ6074: setting import flag when staged file imported in aqbasket >Content-Type: text/plain; charset="utf-8" > >Lines issued from a staged file have a flag that can be set when the order has >been added in a basket. It's set when a staged file is imported into the >catalogue, it should be set also when a record is inserted through aquisition. > >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >- Add order from staged file to a new basket >- Add single order from one item >- Import rest using the bulk feature >- Staged file will no longer be shown after all titles > have been ordered and import_status in import_batches > is correctly set to 'imported' >--- > acqui/addorderiso2709.pl | 28 +++++++++++++++++++--------- > 1 files changed, 19 insertions(+), 9 deletions(-) > >diff --git a/acqui/addorderiso2709.pl b/acqui/addorderiso2709.pl >index c46263a..2e6de2f 100755 >--- a/acqui/addorderiso2709.pl >+++ b/acqui/addorderiso2709.pl >@@ -179,6 +179,7 @@ if ($op eq ""){ > } > } > ( $biblionumber, $bibitemnum ) = AddBiblio( $marcrecord, $cgiparams->{'frameworkcode'} || '' ); >+ SetImportRecordStatus( $biblio->{'import_record_id'}, 'imported' ); > # 2nd add authorities if applicable > if (C4::Context->preference("BiblioAddsAuthorities")){ > my ($countlinked,$countcreated)=BiblioAddAuthorities($marcrecord, $cgiparams->{'frameworkcode'}); >@@ -249,6 +250,8 @@ if ($op eq ""){ > my ( $biblionumber, $bibitemnum, $itemnumber ) = AddItemFromMarc( $record, $biblionumber ); > NewOrderItem( $itemnumber, $ordernumber ); > } >+ } else { >+ SetImportRecordStatus( $biblio->{'import_record_id'}, 'imported' ); > } > } > # go to basket page >@@ -324,15 +327,22 @@ sub import_batches_list { > my @list = (); > foreach my $batch (@$batches) { > if ($batch->{'import_status'} eq "staged") { >- push @list, { >- import_batch_id => $batch->{'import_batch_id'}, >- num_biblios => $batch->{'num_biblios'}, >- num_items => $batch->{'num_items'}, >- upload_timestamp => $batch->{'upload_timestamp'}, >- import_status => $batch->{'import_status'}, >- file_name => $batch->{'file_name'}, >- comments => $batch->{'comments'}, >- }; >+ # check if there is at least 1 line still staged >+ my $stagedList=GetImportBibliosRange($batch->{'import_batch_id'}, undef, undef, 'staged'); >+ if (scalar @$stagedList) { >+ push @list, { >+ import_batch_id => $batch->{'import_batch_id'}, >+ num_biblios => $batch->{'num_biblios'}, >+ num_items => $batch->{'num_items'}, >+ upload_timestamp => $batch->{'upload_timestamp'}, >+ import_status => $batch->{'import_status'}, >+ file_name => $batch->{'file_name'}, >+ comments => $batch->{'comments'}, >+ }; >+ } else { >+ # if there are no more line to includes, set the status to imported >+ SetImportBatchStatus( $batch->{'import_batch_id'}, 'imported' ); >+ } > } > } > $template->param(batch_list => \@list); >-- >1.7.4.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 6074
:
3716
| 4218