https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39239

--- Comment #1 from Marcel de Rooy <[email protected]> ---
Already tested this tiny change with a local use pref:

diff --git a/suggestion/suggestion.pl b/suggestion/suggestion.pl
index 2090a8a..f221bc7 100755
--- a/suggestion/suggestion.pl
+++ b/suggestion/suggestion.pl
@@ -409,6 +409,10 @@ if ($op=~/else/) {
             my $from_dt = $from && eval { dt_from_string($from) };
             my $to_dt   = $to && eval { dt_from_string($to) };

+            if ( ( my $from_pref =
C4::Context->preference('SuggestionsDefaultManagedFrom') ) && $field eq
'manageddate' ) {
+                $from_dt  ||= dt_from_string()->subtract( days => $from_pref
);
+                $template->param( "${field}_from" => $from_dt );
+            }
             if ( $from_dt || $to_dt ) {
                 my $dtf =
Koha::Database->new->schema->storage->datetime_parser;
                 if ( $from_dt && $to_dt ) {

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to