Bugzilla – Attachment 158462 Details for
Bug 27992
When recording local use with statistical patron items are not checked in
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27992: Call AddReturn on stats patron
Bug-27992-Call-AddReturn-on-stats-patron.patch (text/plain), 5.87 KB, created by
Katrin Fischer
on 2023-11-05 12:41:01 UTC
(
hide
)
Description:
Bug 27992: Call AddReturn on stats patron
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2023-11-05 12:41:01 UTC
Size:
5.87 KB
patch
obsolete
>From 0453ea4fb6fee7a898cccd795f6e6a52565af557 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Fri, 27 Oct 2023 23:36:05 +0000 >Subject: [PATCH] Bug 27992: Call AddReturn on stats patron > >To test: >1. Create a Statistical Patron >2. Check out an item to the Stat Patron, that is checked out to another user >3. See that the local use is recorded, but the item does not get checked in >4. Check out an item that has a lost status and note that the local use is recorded, and the lost status is cleared. >5. Item is NOT checked in >6. Apply patch >7. Repeat steps 2 - 4. Item is checked in. >8. Set BlockReturnOfLostItems to Block. >9. Have a checkout to another patron then mark it as lost. >10. Check it out to the Statistical Patron. You should see the message "Item was lost, cannot be returned." >12. Conform the item remains on the patron's account. >13. Turn off BlockReturnOfLostItems, check out the same item to the Statistical Patron. You should see a message "Item was lost, now found." >14. Conform the item was actually checked in. > >15. Set BlockReturnOfWithdrawnItems to Block. >16. Have a checkout to another patron then mark it as withdrawn. >17. Check it out to the Statistical Patron. You should see the message "Item was withdrawn, cannot be returned." >18. Conform the item remains on the patron's account. >19. Turn off BlockReturnOfWithdrawnItems, check out the same item to the Statistical Patron. You should see a message "Item was withdrawn." >20. Conform the item was actually checked in. > >21. Have an item on a regular patron account that has a hold on it. >22. Check it out to the Statistical Patron >23. See the message "Item on hold, please checkin." > >24. Have an item on a regular patron account that has a claim return on it. >25. Checkit it out to the Statistical Patron. >26. See the message "Item claimed returned, please checkin." > >27. Have an item on a regular patron account that has been recalled. >28. Checkit it out to the Statistical Patron. >29. See the message "Item can fill a recall, please checkin." > >Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > C4/Circulation.pm | 16 +++++++++-- > .../prog/en/modules/circ/circulation.tt | 27 ++++++++++++++++++- > 2 files changed, 40 insertions(+), 3 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index e11a94e26b..7341efe42e 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -826,8 +826,20 @@ sub CanBookBeIssued { > interface => C4::Context->interface, > } > ); >- ModDateLastSeen( $item_object->itemnumber ); # FIXME Move to Koha::Item >- return( { STATS => 1 }, {}); >+ my $block_lost_return = C4::Context->preference("BlockReturnOfLostItems") ? 1 : 0; >+ my ( $stats_return, $stats_messages, $stats_iteminformation, $stats_borrower) = >+ AddReturn( $item_object->barcode, C4::Context->userenv->{'branch'} ); >+ ModDateLastSeen( $item_object->itemnumber, $block_lost_return ); # FIXME Move to Koha::Item >+ return ( >+ { >+ STATS => 1, >+ CHECKEDIN => $stats_return, >+ MESSAGES => $stats_messages, >+ ITEM => $stats_iteminformation, >+ BORROWER => $stats_borrower, >+ }, >+ {} >+ ); > } > > if ( $patron->gonenoaddress && $patron->gonenoaddress == 1 ) { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >index cdd223688f..37e9e60529 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -445,8 +445,33 @@ > > [% IF ( STATS ) %] > <li>Local use recorded</li> >+ [% IF ( CHECKEDIN ) %] >+ <li>Item returned from: [% INCLUDE 'patron-title.inc' patron=BORROWER %]</li> >+ [% END %] >+ [% IF ( MESSAGES.ResFound ) %] >+ <li>Item on hold, please checkin.</li> >+ [% END %] >+ [% IF ( MESSAGES.ReturnClaims ) %] >+ <li>Item claimed returned, please checkin.</li> >+ [% END %] >+ [% IF ( MESSAGES.RecallFound ) %] >+ <li>Item can fill a recall, please checkin.</li> >+ [% END %] >+ [% IF ( MESSAGES.WasLost ) %] >+ [% IF ( Koha.Preference('BlockReturnOfLostItems') ) %] >+ <li>Item was lost, cannot be returned.</li> >+ [% ELSE %] >+ <li>Item was lost, now found.</li> >+ [% END %] >+ [% END %] >+ [% IF ( MESSAGES.withdrawn ) %] >+ [% IF ( Koha.Preference('BlockReturnOfWithdrawnItems') ) %] >+ <li>Item was withdrawn, cannot be returned.</li> >+ [% ELSE %] >+ <li>Item was withdrawn</li> >+ [% END %] >+ [% END %] > [% END %] >- > [% IF ( INVALID_DATE ) %] > <li>The due date "[% INVALID_DATE | $KohaDates %]" is invalid</li> > [% END %] >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 27992
:
126865
|
127189
|
128633
|
128634
|
146041
|
158011
|
158073
|
158086
|
158216
|
158217
| 158462 |
158463
|
158464
|
158465
|
158900