[Koha-bugs] [Bug 27916] Fee paid message can crash SIP server if paying fee that is not "renewable"

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Apr 23 11:38:12 CEST 2021


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

Marcel de Rooy <m.de.rooy at rijksmuseum.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|BLOCKED                     |Failed QA

--- Comment #14 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
    foreach my $result( @{$pay_response->{renew_result}} ) {
        next unless $result->{itemnumber};
        my $item = Koha::Items->find({ itemnumber => $result->{itemnumber} });
        next unless $item;
        if ($result->{success}) {
            push @success, '"' . $item->biblio->title . '"';
        } else {
            push @fail, '"' . $item->biblio->title . '" : ' .
$failmap->{$result->{error}};
        }
    }

    my $msg = "";
    if (scalar @success > 0) {
        $msg.="The following items were renewed: " . join(", ", @success) . ".
";
    }
    if (scalar @fail > 0) {
        $msg.="The following items were not renewed: " . join(", ", @fail) .
".";
    }
    if (length $msg > 0) {
        $status->screen_msg($status->screen_msg . " $msg");
    }

It is clear that SIP should not crash on the lack of an itemnumber or an
invalid one. But the current adjustments are just silent ignores.
I would at least recommend to not just jump to the next renew outcome but
include these cases in the msg.

When looking at SIP and Accounts, I noticed that renew_item should already
crash on an invalid itemnumber:
    my $itemnumber = $self->item->itemnumber;
So I am wondering if your adjustments are enough? Or should we already do
something here too?

Is there any more information from syslog or so that you could share here about
the actual bug?
If the problem is caused by an invalid itemnumber, do we miss some FKs
somewhere in Accounts?
If the problem is related to the RenewAccruingItem preferences and the
resulting empty return, should we touch renew_fine too? 

Needs some feedback/adjustments

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list