Bug 29197: Add missing import in commit_file.pl
authorTomas Cohen Arazi <tomascohen@theke.io>
Fri, 8 Oct 2021 13:44:00 +0000 (10:44 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 12 Oct 2021 08:14:38 +0000 (10:14 +0200)
This patch adds a new method import to the commit_file.pl script.

To test:
1. Have MARC data staged
2. Run:
   $ kshell
  k$ perl misc/commit_file.pl --list-batches
=> FAIL: You get
Undefined subroutine &main::GetAllImportBatches called at misc/commit_file.pl line 68.
3. Apply this patch
4. Repeat 2
=> SUCCESS: You get the list of batches
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
misc/commit_file.pl

index 2a24343..efabdfc 100755 (executable)
@@ -11,7 +11,7 @@ BEGIN {
 
 use Koha::Script;
 use C4::Context;
-use C4::ImportBatch qw( GetImportBatch BatchCommitRecords BatchRevertRecords );
+use C4::ImportBatch qw( GetAllImportBatches GetImportBatch BatchCommitRecords BatchRevertRecords );
 use Getopt::Long qw( GetOptions );
 
 $| = 1;