[Koha-bugs] [Bug 32684] Implement SIP patron status field "too many items lost"
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Tue Mar 7 21:01:03 CET 2023
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32684
--- Comment #7 from Kyle M Hall <kyle at bywatersolutions.com> ---
(In reply to Marcel de Rooy from comment #6)
> The crux is here:
>
> + my $too_many_lost = 0;
> + if ( my $lost_block_checkout =
> $server->{account}->{lost_block_checkout} ) {
> + my $lost_block_checkout_value =
> $server->{account}->{lost_block_checkout_value} // 1;
> + my $lost_checkouts = Koha::Checkouts->search({ borrowernumber =>
> $patron->borrowernumber, 'itemlost' => { '>=', $lost_block_checkout_value }
> }, { join => 'item'} )->count;
> + $too_many_lost = $lost_checkouts >= $lost_block_checkout;
> + }
>
>
> But we still have:
> C4/SIP/ILS/Patron.pm: too_many_lost => 0, # for
> patron_status[9]
> C4/SIP/ILS/Patron.pod: $bool = $patron->too_many_lost;
> C4/SIP/ILS/Patron.pod: $bool = $patron-E<gt>too_many_lost;
>
> So we should probably move the block to ILS/Patron and leave MsgType as-is,
> or we should remove the obsoleted too_many_lost from ILS/Patron.
> Although it is not a big deal, it looks like moving to Patron was expected
> design-wise. But this has a performance penalty since we dont always need it.
>
> Needs feedback
I think the encapsulation is worth the "possible" single extra query here which
only happens if the feature in enabled.
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list