Bug 15939 - modification logs view now silently defaults to only current day's actions
Summary: modification logs view now silently defaults to only current day's actions
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords: regression
: 15620 (view as bug list)
Depends on: 13813
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-29 18:17 UTC by Galen Charlton
Modified: 2017-12-07 22:16 UTC (History)
5 users (show)

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


Attachments
Bug 15939: Action logs - Do not default dates to today (3.24 KB, patch)
2016-03-01 11:01 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15939: Action logs - Do not default dates to today (3.29 KB, patch)
2016-03-01 13:47 UTC, Galen Charlton
Details | Diff | Splinter Review
[PASSED QA] Bug 15939: Action logs - Do not default dates to today (3.36 KB, patch)
2016-03-01 22:43 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Galen Charlton 2016-02-29 18:17:16 UTC
When accessing the modification logs from a link that does not explicitly set the to and from dates (e.g., from patron or bib details), no results are displayed unless the object had an action occur during the current day.

This is a side-effect of commit 5dceb851 for bug 13813:

In C4/Log.pm:

-    my $iso_datefrom = C4::Dates->new($datefrom,C4::Context->preference("dateformat"))->output('iso');
-    my $iso_dateto = C4::Dates->new($dateto,C4::Context->preference("dateformat"))->output('iso');
+    my $iso_datefrom = output_pref({ dt => dt_from_string( $datefrom ), dateformat => 'iso', dateonly => 1 });
+    my $iso_dateto = output_pref({ dt => dt_from_string( $dateto ), dateformat => 'iso', dateonly => 1 });

In particular, C4::Dates->new($foo... returns undefined if $foo is undefined, whereas output_pref({ dt => dt_from_string( $foo... returns the current date.

This amounts to a regression.
Comment 1 Jonathan Druart 2016-03-01 11:01:13 UTC Comment hidden (obsolete)
Comment 2 Galen Charlton 2016-03-01 13:47:32 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2016-03-01 22:43:49 UTC
Created attachment 48523 [details] [review]
[PASSED QA] Bug 15939: Action logs - Do not default dates to today

When accessing the modification logs from a link that does not
explicitly set the to and from dates (e.g., from patron or bib details),
no results are displayed unless the object had an action occur during
the current day.

This is a side-effect of commit 5dceb851 for bug 13813.

Test plan:
- View the modification logs of a record which has already been modified
(/tools/viewlog.pl?do_it=1&modules=CATALOGUING&action=MODIFY&object=XXX)
=> Without this patch, you won't see any logs (unless you have modified
the record today)
=> With this patch, the behavior is the same as prior bug 13813 (you can
check in 3.20.x), you will see all logs

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Brendan Gallagher 2016-03-02 00:53:51 UTC
Pushed to Master - Should be in the May 2016 Release. Thanks!
Comment 5 Julian Maurice 2016-03-07 10:35:44 UTC
Patch pushed to 3.22.x, will be in 3.22.5
Comment 6 Jonathan Druart 2016-03-08 11:28:15 UTC
*** Bug 15620 has been marked as a duplicate of this bug. ***