Bug 17444 - Export by date and time in export_record.pl
Summary: Export by date and time in export_record.pl
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Josef Moravec
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-14 06:45 UTC by Josef Moravec
Modified: 2017-06-14 22:13 UTC (History)
8 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 17444: Enable exporting by time, not only date (3.08 KB, patch)
2016-10-14 07:17 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 17444: Enable exporting by time, not only date (3.12 KB, patch)
2016-10-14 09:25 UTC, Radek Šiman (R-Bit Technology, s.r.o.)
Details | Diff | Splinter Review
Bug 17444: Follow-up, don't change the name of parameter "date" (2.13 KB, patch)
2016-10-16 20:11 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 17444: Enable exporting by time, not only date (2.56 KB, patch)
2016-10-18 16:25 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Josef Moravec 2016-10-14 06:45:58 UTC

    
Comment 1 Josef Moravec 2016-10-14 06:47:45 UTC
As we exports record from Koha for VuFind every few minutes, we need to be able to base the export on the time of record change, not only on the date.
Comment 2 Josef Moravec 2016-10-14 07:17:15 UTC
Created attachment 56447 [details] [review]
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
Comment 3 Radek Šiman (R-Bit Technology, s.r.o.) 2016-10-14 09:25:34 UTC
Created attachment 56496 [details] [review]
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

Signed-off-by: radiuscz <radek.siman@centrum.cz>
Comment 4 Katrin Fischer 2016-10-16 11:15:14 UTC
Not about this feature, but interested to know - why are you not using OAI-PMH to feed VuFind? It seems to work well for us.
Comment 5 Katrin Fischer 2016-10-16 11:16:48 UTC
Changing the parameter name will break any automatism that others have created for this. Could we avoid this somehow?
Comment 6 Josef Moravec 2016-10-16 20:03:30 UTC
(In reply to Katrin Fischer from comment #4)
> Not about this feature, but interested to know - why are you not using
> OAI-PMH to feed VuFind? It seems to work well for us.

We import data from Koha to VuFind every 5 minutes, because we are indexing status of each item to be able to show the "Show only available" checkbox facet in VuFind interface.
And the problems of OAI-PMH from this point of view are two:
1. Koha OAI provider granularity is yyyy-mm-dd - will be fixed by bug 15108
2. VuFind OAI harvester mark the time of last harvest an hour or two in the past, which leads to consuming server resources much more than it should

But in long term, we want to migrate to OAI-PMH, it's much easier and simpler solution.
Comment 7 Josef Moravec 2016-10-16 20:04:17 UTC
(In reply to Katrin Fischer from comment #5)
> Changing the parameter name will break any automatism that others have
> created for this. Could we avoid this somehow?

Surely, I'll add a followup
Comment 8 Josef Moravec 2016-10-16 20:11:54 UTC
Created attachment 56574 [details] [review]
Bug 17444: Follow-up, don't change the name of parameter "date"
Comment 9 Jonathan Druart 2016-10-18 16:25:55 UTC
Created attachment 56629 [details] [review]
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

Signed-off-by: radiuscz <radek.siman@centrum.cz>

Bug 17444: Follow-up, don't change the name of parameter "date"

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 10 Jonathan Druart 2016-10-18 16:26:19 UTC
I have squashed the patches.
Comment 11 Kyle M Hall 2016-10-21 17:13:10 UTC
Pushed to master for 16.11, thanks Josef!
Comment 12 Frédéric Demians 2016-10-22 13:18:52 UTC
Pushed in 16.05. Will be in 16.05.05.