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

--- Comment #757 from David Nind <da...@davidnind.com> ---
Hi Aleisha, I finally finished running through the test plan!

Two items where I had issues:

1. Steps 61 + 100: I get an error trace when accessing Circulation > Recalls
awaiting pickup
(http://127.0.0.1:8081/cgi-bin/koha/recalls/recalls_waiting.pl), see partial
details below.

2. Error when running expiry cronjob (perl
misc/cronjobs/recalls/expire_recalls.pl):
   . Step 112: 
     - Undefined subroutine &main::dt_from_string called at
misc/cronjobs/recalls/expire_recalls.pl line 42.
     - Recall not expired - still showing as 'Requested'
   . Step 118: 
     - Undefined subroutine &main::dt_from_string called at
misc/cronjobs/recalls/expire_recalls.pl line 53.
     - Recall not expired - still showing as 'Ready for pickup'
   . Step 128:
     - Undefined subroutine &main::dt_from_string called at
misc/cronjobs/recalls/expire_recalls.pl line 53.
     - Recall not expired - still showing as 'Ready for pickup'

David

Error trace - recalls_waiting.pl
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Undefined subroutine
&CGI::Compile::ROOT::kohadevbox_koha_recalls_recalls_waiting_2epl::dt_from_string
called at /kohadevbox/koha/recalls/recalls_waiting.pl line 58

    in (eval) at /kohadevbox/koha/recalls/recalls_waiting.pl line 58

       55:     my $borrower = Koha::Patrons->find( $loggedinuser );
       56:     my @over;
       57:     my $maxdelay = C4::Context->preference('RecallsMaxPickUpDelay')
|| 7;
       58:     my $today = dt_from_string();
       59:     foreach my $r ( @recalls ){
       60:         my $lastwaitingday = dt_from_string( $r->waitingdate )->add(
days => $maxdelay );
       61:         if ( $today > $lastwaitingday ){

    in
CGI::Compile::ROOT::kohadevbox_koha_recalls_recalls_waiting_2epl::__ANON__ at
/kohadevbox/koha/recalls/recalls_waiting.pl line 2

        1: #!/usr/bin/perl
        2: 
        3: # Copyright 2020 Aleisha Amohia <alei...@catalyst.net.nz>
        4: #
        5: # This file is part of Koha.

    Show function arguments
    in
CGI::Compile::ROOT::kohadevbox_koha_recalls_recalls_waiting_2epl::recalls_waiting_2epl
at /usr/share/perl5/CGI/Compile.pm line 151

      148:             # this is necessary for MSWin32
      149:             my $orig_warn = $SIG{__WARN__} || sub { warn(@_) };
      150:             local $SIG{__WARN__} = sub { $orig_warn->(@_) unless
$_[0] =~ /^No such signal/ };
      151:             $code->($self, $data, $path, $dir, \@args)
      152:         };
      153:     };
      154: 

    in CGI::Emulate::PSGI::__ANON__ at /usr/share/perl5/CGI/Emulate/PSGI.pm
line 30

       27:                 local *STDOUT = $stdout;
       28:                 local *STDERR = $env->{'psgi.errors'};
       29: 
       30:                 $code->();
       31:             }
       32:         }
       33: 
....


Notes for myself - SQL queries
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Step 111: SQL should be: UPDATE recalls SET expirationdate = NOW() - interval
2 day WHERE recall_id = X;
- Step 127: SQL should be: UPDATE recalls SET waitingdate = NOW() - interval 2
day WHERE recall_id = X;
- Step 133: SQL should be: UPDATE issues SET date_due = NOW() - interval 2 day
WHERE issue_id = X;
- Step 134: Script path should be recalls (not recall): perl
misc/cronjobs/recalls/overdue_recalls.pl
- Step 150: SQL should be: UPDATE issues SET date_due = NOW() - interval 2 day
WHERE issue_id = X;

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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