Bugzilla – Attachment 56447 Details for
Bug 17444
Export by date and time in export_record.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17444: Enable exporting by time, not only date
Bug-17444-Enable-exporting-by-time-not-only-date.patch (text/plain), 3.08 KB, created by
Josef Moravec
on 2016-10-14 07:17:15 UTC
(
hide
)
Description:
Bug 17444: Enable exporting by time, not only date
Filename:
MIME Type:
Creator:
Josef Moravec
Created:
2016-10-14 07:17:15 UTC
Size:
3.08 KB
patch
obsolete
>From 1a3df5ae01077c571f579b5d4c9cff9802ae6d7a Mon Sep 17 00:00:00 2001 >From: Josef Moravec <josef.moravec@gmail.com> >Date: Tue, 15 Dec 2015 12:07:38 +0100 >Subject: [PATCH] Bug 17444: Enable exporting by time, not only date > >Test plan: >1) Apply the patch >2) Edit a biblio >3) run export_records.pl with date time few minutes in the past >for example: --format=xml --record-type=bibs --date="2016-10-14 10:00:05" --filename="koha.xml" >4) look in the file and cofirm that the right record was exported >5) Try the same but with time after the biblio was edited, it shouldn't be exported >--- > misc/export_records.pl | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > >diff --git a/misc/export_records.pl b/misc/export_records.pl >index 59d0dfe..a9e89da 100755 >--- a/misc/export_records.pl >+++ b/misc/export_records.pl >@@ -35,7 +35,7 @@ use Koha::DateUtils qw( dt_from_string output_pref ); > my ( $output_format, $timestamp, $dont_export_items, $csv_profile_id, $deleted_barcodes, $clean, $filename, $record_type, $id_list_file, $starting_authid, $ending_authid, $authtype, $starting_biblionumber, $ending_biblionumber, $itemtype, $starting_callnumber, $ending_callnumber, $start_accession, $end_accession, $help ); > GetOptions( > 'format=s' => \$output_format, >- 'date=s' => \$timestamp, >+ 'datetime=s' => \$timestamp, > 'dont_export_items' => \$dont_export_items, > 'csv_profile_id=s' => \$csv_profile_id, > 'deleted_barcodes' => \$deleted_barcodes, >@@ -95,7 +95,7 @@ open STDOUT, '>', $filename if $filename; > > my @record_ids; > >-$timestamp = ($timestamp) ? output_pref({ dt => dt_from_string($timestamp), dateformat => 'iso', dateonly => 1, }): ''; >+$timestamp = ($timestamp) ? output_pref({ dt => dt_from_string($timestamp), dateformat => 'iso', dateonly => 0, }): ''; > > if ( $record_type eq 'bibs' ) { > if ( $timestamp ) { >@@ -219,7 +219,7 @@ export records - This script exports record (biblios or authorities) > > =head1 SYNOPSIS > >-export_records.pl [-h|--help] [--format=format] [--date=date] [--record-type=TYPE] [--dont_export_items] [--deleted_barcodes] [--clean] [--id_list_file=PATH] --filename=outputfile >+export_records.pl [-h|--help] [--format=format] [--datetime=datetime] [--record-type=TYPE] [--dont_export_items] [--deleted_barcodes] [--clean] [--id_list_file=PATH] --filename=outputfile > > =head1 OPTIONS > >@@ -235,10 +235,10 @@ Print a brief help message. > > =item B<--date> > >- --date=DATE DATE should be entered as the 'dateformat' syspref is >- set (dd/mm/yyyy for metric, yyyy-mm-dd for iso, >- mm/dd/yyyy for us) records exported are the ones that >- have been modified since DATE. >+ --datetime=DATETIME DATETIME should be entered as the 'dateformat' syspref is >+ set (dd/mm/yyyy[ hh:mm:ss] for metric, yyyy-mm-dd[ hh:mm:ss] for iso, >+ mm/dd/yyyy[ hh:mm:ss] for us) records exported are the ones that >+ have been modified since DATETIME. > > =item B<--record-type> > >-- >2.1.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 17444
:
56447
|
56496
|
56574
|
56629