Bug 20485 - Don't account for items timestamps when combining "dont_export_items=1" and "date" in misc/export_records.pl
Summary: Don't account for items timestamps when combining "dont_export_items=1" and "...
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: David Gustafsson
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-28 11:36 UTC by David Gustafsson
Modified: 2020-01-06 20:14 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This enhancement changes the way dates are used to calculate records for export. If not including items in the export, we only consider the date of last biblio record edit, rather than including records where only the items were edited in the date range.
Version(s) released in:
19.05.00


Attachments
Bug 20485: Don't account for items timestamps when items not included (2.91 KB, patch)
2018-03-28 11:53 UTC, David Gustafsson
Details | Diff | Splinter Review
Bug 20485: Don't account for items timestamps when items not included (2.97 KB, patch)
2018-03-28 11:54 UTC, David Gustafsson
Details | Diff | Splinter Review
Bug 20485: Don't account for items timestamps when items not included (3.07 KB, patch)
2018-05-07 12:13 UTC, David Gustafsson
Details | Diff | Splinter Review
Bug 20485: Don't account for items timestamps when items not included (3.07 KB, patch)
2019-02-18 12:43 UTC, David Gustafsson
Details | Diff | Splinter Review
Bug 20485: Don't account for items timestamps when items not included (3.12 KB, patch)
2019-02-22 19:20 UTC, Maryse Simard
Details | Diff | Splinter Review
Bug 20485: Don't account for items timestamps when items not included (3.22 KB, patch)
2019-05-03 10:20 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description David Gustafsson 2018-03-28 11:36:02 UTC
When combining "dont_export_items=1" and "date" it seams it would be safe and sane not to account for items timestamps in the date conditions, thus avoiding to include biblios that has not been modified but has modified/deleted items (which are included in the export anyway).
Comment 1 David Gustafsson 2018-03-28 11:53:35 UTC
Created attachment 73378 [details] [review]
Bug 20485: Don't account for items timestamps when items not included

If combining "--dont_export_items" and "--date" options
in export_records.pl, don't include items modification/deletion
i in biblio query conditions.

How to test:
1) Delete or modify a biblio item.
2) Run export_records.pl with "--dont_export_items" and "--date"
   options with a date value before item was deleted or modified,
   but after the biblio was modified.
3) The biblio for which an item was changed should not be included in
   the export.
Comment 2 David Gustafsson 2018-03-28 11:54:58 UTC
Created attachment 73380 [details] [review]
Bug 20485: Don't account for items timestamps when items not included

If combining "--dont_export_items" and "--date" options
in export_records.pl, don't include items modification/deletion
timestamp in biblio query conditions.

How to test:
1) Delete or modify a biblio item.
2) Run export_records.pl with "--dont_export_items" and "--date"
   options with a date value before item was deleted or modified,
   but after the biblio was modified.
3) The biblio for which an item was changed should not be included in
   the export.

Sponsored-by: Gothenburg University Library
Comment 3 David Gustafsson 2018-05-07 12:13:53 UTC
Created attachment 75112 [details] [review]
Bug 20485: Don't account for items timestamps when items not included

If combining "--dont_export_items" and "--date" options
in export_records.pl, don't include items modification/deletion
timestamp in biblio query conditions.

How to test:
1) Delete or modify a biblio item.
2) Run export_records.pl with "--dont_export_items" and "--date"
   options with a date value before item was deleted or modified,
   but after the biblio was modified.
3) The biblio for which an item was changed should not be included in
   the export.

Sponsored-by: Gothenburg University Library
Comment 4 David Gustafsson 2018-05-07 12:14:05 UTC
Rebased against Koha master.
Comment 5 Maryse Simard 2019-02-15 21:57:23 UTC
With the patch applied, I still get the biblio for wich items were modified in the output.
Comment 6 David Gustafsson 2019-02-18 12:43:16 UTC
Created attachment 85239 [details] [review]
Bug 20485: Don't account for items timestamps when items not included

If combining "--dont_export_items" and "--date" options
in export_records.pl, don't include items modification/deletion
timestamp in biblio query conditions.

How to test:
1) Delete or modify a biblio item.
2) Run export_records.pl with "--dont_export_items" and "--date"
   options with a date value before item was deleted or modified,
   but after the biblio was modified.
3) The biblio for which an item was changed should not be included in
   the export.

Sponsored-by: Gothenburg University Library
Comment 7 David Gustafsson 2019-02-18 12:44:59 UTC
Seams like I got the condition wrong, and it skipped items timestamps when items where included and not the other way around. Should now be fixed.
Comment 8 Maryse Simard 2019-02-22 19:20:43 UTC
Created attachment 85573 [details] [review]
Bug 20485: Don't account for items timestamps when items not included

If combining "--dont_export_items" and "--date" options
in export_records.pl, don't include items modification/deletion
timestamp in biblio query conditions.

How to test:
1) Delete or modify a biblio item.
2) Run export_records.pl with "--dont_export_items" and "--date"
   options with a date value before item was deleted or modified,
   but after the biblio was modified.
3) The biblio for which an item was changed should not be included in
   the export.

Sponsored-by: Gothenburg University Library
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Comment 9 Marcel de Rooy 2019-05-03 10:20:47 UTC
Created attachment 89306 [details] [review]
Bug 20485: Don't account for items timestamps when items not included

If combining "--dont_export_items" and "--date" options
in export_records.pl, don't include items modification/deletion
timestamp in biblio query conditions.

How to test:
1) Delete or modify a biblio item.
2) Run export_records.pl with "--dont_export_items" and "--date"
   options with a date value before item was deleted or modified,
   but after the biblio was modified.
3) The biblio for which an item was changed should not be included in
   the export.

Sponsored-by: Gothenburg University Library
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 10 Nick Clemens 2019-05-10 17:44:24 UTC
Awesome work all!

Pushed to master for 19.05
Comment 11 Martin Renvoize 2019-05-24 13:18:39 UTC
Enhancement/Change of behaviour will not be backported to 18.11.x series.