Bugzilla – Attachment 114280 Details for
Bug 24470
Set import_status when file used to populate basket in acquisitions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24470: Mark a batch as 'imported' if all the bib has been imported
Bug-24470-Mark-a-batch-as-imported-if-all-the-bib-.patch (text/plain), 1.94 KB, created by
Jonathan Druart
on 2020-12-09 14:27:03 UTC
(
hide
)
Description:
Bug 24470: Mark a batch as 'imported' if all the bib has been imported
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-12-09 14:27:03 UTC
Size:
1.94 KB
patch
obsolete
>From 9dd5762d96084775bccc4959f17cec4c593de852 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 9 Dec 2020 15:22:35 +0100 >Subject: [PATCH] Bug 24470: Mark a batch as 'imported' if all the bib has been > imported > >When a staged MARC file is used to populate a basket in acquisitions, >the status of the batch is kept as "staged" until a user repeat the operation. >The "imported" status is added to the batch when new orders are added to >a basket "from a new file" (yes!...) > >Test plan: >- Create a basket >- Add to basket From a New File >- Select a marc file and stage >- Add titles to your basket >Until all your records are imported the batch will have the status >"staged" >When all your records will be imported, the status of the batch will be >"imported" >--- > acqui/addorderiso2709.pl | 7 +++++++ > 1 file changed, 7 insertions(+) > >diff --git a/acqui/addorderiso2709.pl b/acqui/addorderiso2709.pl >index af2af987b2..a1ff5a70f4 100755 >--- a/acqui/addorderiso2709.pl >+++ b/acqui/addorderiso2709.pl >@@ -390,6 +390,12 @@ if ($op eq ""){ > } > $imported++; > } >+ >+ # If all bibliographic records from the batch have been imported we modifying the status of the batch accordingly >+ SetImportBatchStatus( $import_batch_id, 'imported' ) >+ if @{ GetImportRecordsRange( $import_batch_id, undef, undef, 'imported' )} >+ == @{ GetImportRecordsRange( $import_batch_id )}; >+ > # go to basket page > if ( $imported ) { > print $input->redirect("/cgi-bin/koha/acqui/basket.pl?basketno=".$cgiparams->{'basketno'}."&duplinbatch=$duplinbatch"); >@@ -450,6 +456,7 @@ sub import_batches_list { > }; > } else { > # if there are no more line to includes, set the status to imported >+ # FIXME This should be removed in the future. > SetImportBatchStatus( $batch->{'import_batch_id'}, 'imported' ); > } > } >-- >2.20.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 24470
:
114280
|
114825
|
114966
|
115009