Bugzilla – Attachment 162682 Details for
Bug 8461
Block returns of withdrawn items show as 'not checked out'
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8461: Display information on whithdrawn item when checked in
Bug-8461-Display-information-on-whithdrawn-item-wh.patch (text/plain), 5.18 KB, created by
Andrew Fuerste-Henry
on 2024-03-01 18:11:08 UTC
(
hide
)
Description:
Bug 8461: Display information on whithdrawn item when checked in
Filename:
MIME Type:
Creator:
Andrew Fuerste-Henry
Created:
2024-03-01 18:11:08 UTC
Size:
5.18 KB
patch
obsolete
>From 4d2176e66ab4e7a9cf9ae38a09271b817cc893c7 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 24 Jan 2024 14:49:53 +0000 >Subject: [PATCH] Bug 8461: Display information on whithdrawn item when checked > in > >This patch displays the due date and withdrawn information in the Checked-in items table when 'ShowAllCheckins' is enabled. While the top message is clear, if a staff member checks in two items, then refers to the table they would not have all the information. > >To test: >1 - Enable system preference 'ShowAllCheckins' >2 - Set system preference 'BlockReturnOfWithdrawnItems' to 'Block' >3 - Check out an item to a patron >4 - Mark the item as withdrawn >5 - Check the item in >6 - Note message at top says things like 'Cannot check in' 'Item has been withdrawn' >7 - Note the Checked-in items table says 'Not checked out' >8 - Apply patch, restart all >9 - Check the item in again >10 - Note top message has not changed >11 - Note the table now say 'Item was not checked in' and displays the due date and patron info >12 - Note the table also includes the withdrawn value for the item > >Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org> >--- > circ/returns.pl | 15 +++++++++++++-- > .../intranet-tmpl/prog/en/modules/circ/returns.tt | 6 ++++++ > 2 files changed, 19 insertions(+), 2 deletions(-) > >diff --git a/circ/returns.pl b/circ/returns.pl >index 5b119e3726b..8586e878059 100755 >--- a/circ/returns.pl >+++ b/circ/returns.pl >@@ -414,9 +414,17 @@ if ($barcode && $op eq 'cud-checkin') { > } > > } elsif ( C4::Context->preference('ShowAllCheckins') and !$messages->{'BadBarcode'} and !$needs_confirm and !$bundle_confirm ) { >- $input{duedate} = 0; >+ my $duedate = 0; >+ if( $issue ){ >+ my $date_due_dt = dt_from_string( $issue->date_due, 'sql' ); >+ $duedate = $date_due_dt->strftime('%Y-%m-%d %H:%M'); >+ $input{borrowernumber} = $issue->borrowernumber; >+ $riborrowernumber{0} = $borrower->{'borrowernumber'}; >+ } >+ $input{duedate} = $duedate; >+ $input{not_returned} = 1; > $returneditems{0} = $barcode; >- $riduedate{0} = 0; >+ $riduedate{0} = $duedate; > push( @inputloop, \%input ); > } > $template->param( privacy => $borrower->{privacy} ); >@@ -790,6 +798,8 @@ foreach ( sort { $a <=> $b } keys %returneditems ) { > next unless $item; # FIXME The item has been deleted in the meantime, > # we could handle that better displaying a message in the template > >+ >+ $ri{not_returned} = 1 unless $returned; > my $biblio = $item->biblio; > # FIXME pass $item to the template and we are done here... > $ri{itembiblionumber} = $biblio->biblionumber; >@@ -811,6 +821,7 @@ foreach ( sort { $a <=> $b } keys %returneditems ) { > $ri{homebranch} = $item->homebranch; > $ri{transferbranch} = $item->get_transfer ? $item->get_transfer->tobranch : ''; > $ri{damaged} = $item->damaged; >+ $ri{withdrawn} = $item->withdrawn; > $ri{transferreason} = $item->get_transfer ? $item->get_transfer->reason : ''; > > $ri{location} = $item->location; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >index 6aecdfefbe9..47218575e82 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >@@ -1254,6 +1254,9 @@ > [% FOREACH riloo IN riloop %] > <tr> > <td class="ci-duedate"> >+ [% IF ( riloo.not_returned ) %] >+ <span class="problem">Item was not checked in</span> >+ [% END %] > [% IF ( riloo.duedate ) %] > [% IF ( riloo.return_overdue ) %] > <span class="overdue">[% riloo.duedate | $KohaDates as_due_date => 1 %] (overdue)</span> >@@ -1266,6 +1269,9 @@ > [% IF ( riloo.damaged ) %] > <span class="dmg">[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.damaged', authorised_value => riloo.damaged ) | html %]</span> > [% END %] >+ [% IF ( riloo.withdrawn ) %] >+ <span class="withdrawn">[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.withdrawn', authorised_value => riloo.withdrawn ) | html %]</span> >+ [% END %] > </td> > <td class="ci-title"> > <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% riloo.itembiblionumber | uri %]"> >-- >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 8461
:
161342
|
161371
|
161372
|
162682
|
164828
|
164829
|
165157
|
165158
|
167326