Bugzilla – Attachment 14990 Details for
Bug 8292
clicking ignore on hold cancels transfer
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8292 - Clicking ignore on hold cancels transfer
Bug-8292---Clicking-ignore-on-hold-cancels-transfe.patch (text/plain), 8.29 KB, created by
Liz Rea
on 2013-02-01 02:33:02 UTC
(
hide
)
Description:
Bug 8292 - Clicking ignore on hold cancels transfer
Filename:
MIME Type:
Creator:
Liz Rea
Created:
2013-02-01 02:33:02 UTC
Size:
8.29 KB
patch
obsolete
>From 8966b300ebecd00bb0e799b7539d60da72e69aea Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 10 Oct 2012 10:27:47 -0400 >Subject: [PATCH] Bug 8292 - Clicking ignore on hold cancels transfer > >Clicking 'ignore' in the hold confirmation box does nothing >but make the confirmation box disappear. No further actions are >taken. The code to do the transfer is never executed, and the item sits >at the holdingbranch library. > >If you're ignoring the hold, you want the checkin to proceed as if the >hold had never popped up in the first place, and that means doing a >return home if appropriate. > >To test, place a hold on an item for delivery to Library A. Check that >item in at Library B. Click "Ignore" in the hold confirmation message. >Before the patch, doing so would simply trigger JavaScript to hide the >dialog. After the patch the form will be sumitted and the item will be >transfered without fulfilling the hold. > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> > >Added description and test plan to the best of my understanding of what >this patch is trying to accomplish based on the bug report. The patch >works if I'm correct in my test plan. > >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >All tests and QA script pass. > >Tests done: >1) Add an item hold on an item from library B for a patron from library A, > pickup location is library A >2) Check in item at library A >3) Click 'ignore' >a) AutomaticItemReturn is ON = Koha provides a link to print the transfer > slip. >b) AutomaticItemReturn is OFF = Koha provides 3 options: Confirm transfer > and print slip, confirm transfer, don't confirm transfer. > >Without the patch the item was returned, but the transfer wasn't triggered. > >Signed-off-by: Liz Rea <liz@catalyst.net.nz> >--- > C4/Circulation.pm | 19 +++++++++------ > circ/returns.pl | 6 +++-- > .../intranet-tmpl/prog/en/modules/circ/returns.tt | 25 ++++++++++++++++---- > 3 files changed, 37 insertions(+), 13 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 063a409..dd2969d 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -1612,7 +1612,7 @@ sub GetBranchItemRule { > =head2 AddReturn > > ($doreturn, $messages, $iteminformation, $borrower) = >- &AddReturn($barcode, $branch, $exemptfine, $dropbox); >+ &AddReturn($barcode, $branch, $exemptfine, $dropbox, $ignore_reserves); > > Returns a book. > >@@ -1631,6 +1631,9 @@ overdue charges are applied and C<$dropbox> is true, the last charge > will be removed. This assumes that the fines accrual script has run > for _today_. > >+=item C<$ignore_reserves> indicates that the check-in should not >+attempt to find reserves to full using this item. >+ > =back > > C<&AddReturn> returns a list of four items: >@@ -1684,7 +1687,7 @@ patron who last borrowed the book. > =cut > > sub AddReturn { >- my ( $barcode, $branch, $exemptfine, $dropbox ) = @_; >+ my ( $barcode, $branch, $exemptfine, $dropbox, $ignore_reserves ) = @_; > > if ($branch and not GetBranchDetail($branch)) { > warn "AddReturn error: branch '$branch' not found. Reverting to " . C4::Context->userenv->{'branch'}; >@@ -1843,11 +1846,13 @@ sub AddReturn { > > # find reserves..... > # if we don't have a reserve with the status W, we launch the Checkreserves routine >- my ($resfound, $resrec); >- ($resfound, $resrec, undef) = C4::Reserves::CheckReserves( $item->{'itemnumber'} ) unless ( $item->{'wthdrawn'} ); >- if ($resfound) { >- $resrec->{'ResFound'} = $resfound; >- $messages->{'ResFound'} = $resrec; >+ my ( $resfound, $resrec ); >+ unless ( $ignore_reserves ) { >+ ( $resfound, $resrec ) = C4::Reserves::CheckReserves( $item->{'itemnumber'} ) unless ( $item->{'wthdrawn'} ); >+ if ($resfound) { >+ $resrec->{'ResFound'} = $resfound; >+ $messages->{'ResFound'} = $resrec; >+ } > } > > # update stats? >diff --git a/circ/returns.pl b/circ/returns.pl >index 9472797..b2d0260 100755 >--- a/circ/returns.pl >+++ b/circ/returns.pl >@@ -171,6 +171,7 @@ my $messages; > my $issueinformation; > my $itemnumber; > my $barcode = $query->param('barcode'); >+my $ignore_reserves = $query->param('ignore_reserves'); > my $exemptfine = $query->param('exemptfine'); > my $dropboxmode = $query->param('dropboxmode'); > my $dotransfer = $query->param('dotransfer'); >@@ -216,7 +217,7 @@ if ($barcode) { > # save the return > # > ( $returned, $messages, $issueinformation, $borrower ) = >- AddReturn( $barcode, $userenv_branch, $exemptfine, $dropboxmode); # do the return >+ AddReturn( $barcode, $userenv_branch, $exemptfine, $dropboxmode, $ignore_reserves ); # do the return > my $homeorholdingbranchreturn = C4::Context->preference('HomeOrHoldingBranchReturn'); > $homeorholdingbranchreturn ||= 'homebranch'; > >@@ -390,7 +391,6 @@ if ( $messages->{'ResFound'}) { > borcnum => $borr->{'cardnumber'}, > debarred => $borr->{'debarred'}, > gonenoaddress => $borr->{'gonenoaddress'}, >- barcode => $barcode, > destbranch => $reserve->{'branchcode'}, > borrowernumber => $reserve->{'borrowernumber'}, > itemnumber => $reserve->{'itemnumber'}, >@@ -556,5 +556,7 @@ $template->param( > # } > #} > >+$template->param( barcode => $barcode ); >+ > # actually print the page! > output_html_with_http_headers $query, $cookie, $template->output; >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 7fd8d1d..9a4ff22 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >@@ -299,11 +299,12 @@ $(document).ready(function () { > <input type="submit" class="approve" value="Confirm hold" /> > <input type="submit" value="Print slip and confirm" class="print" onclick="Dopop('hold-transfer-slip.pl?borrowernumber=[% borrowernumber %]&biblionumber=[% itembiblionumber %]&op=slip'); this.form.submit();" /> > [% END %] >- <input type="submit" class="deny" value="Ignore" onclick="$('.dialog:visible').hide('slow'); $('#barcode').focus(); return false;" /> >+ > [% FOREACH inputloo IN inputloop %] >- <input type="hidden" name="ri-[% inputloo.counter %]" value="[% inputloo.barcode %]" /> >- <input type="hidden" name="dd-[% inputloo.counter %]" value="[% inputloo.duedate %]" /> >- <input type="hidden" name="bn-[% inputloo.counter %]" value="[% inputloo.borrowernumber %]" />[% END %] >+ <input type="hidden" name="ri-[% inputloo.counter %]" value="[% inputloo.barcode %]" /> >+ <input type="hidden" name="dd-[% inputloo.counter %]" value="[% inputloo.duedate %]" /> >+ <input type="hidden" name="bn-[% inputloo.counter %]" value="[% inputloo.borrowernumber %]" /> >+ [% END %] > <input type="hidden" name="itemnumber" value="[% itemnumber %]" /> > <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" /> > <input type="hidden" name="resbarcode" value="[% barcode %]" /> >@@ -311,6 +312,22 @@ $(document).ready(function () { > <input type="hidden" name="exemptfine" value="[% exemptfine %]" /> > <input type="hidden" name="dropboxmode" value="[% dropboxmode %]" /> > </form> >+ >+ <form method="post" action="returns.pl" class="ignore"> >+ [% FOREACH inputloo IN inputloop %] >+ <input type="hidden" name="ri-[% inputloo.counter %]" value="[% inputloo.barcode %]" /> >+ <input type="hidden" name="dd-[% inputloo.counter %]" value="[% inputloo.duedate %]" /> >+ <input type="hidden" name="bn-[% inputloo.counter %]" value="[% inputloo.borrowernumber %]" /> >+ [% END %] >+ >+ <input type="hidden" name="exemptfine" value="[% exemptfine %]" /> >+ <input type="hidden" name="dropboxmode" value="[% dropboxmode %]" /> >+ >+ <input type="hidden" name="barcode" value="[% barcode %]" /> >+ <input type="hidden" name="ignore_reserves" value="1" /> >+ >+ <input type="submit" class="deny" value="Ignore" /> >+ </form> > </div> > [% END %] > [% ELSE %] >-- >1.7.9.5
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 8292
:
12760
|
14356
|
14474
|
14841
| 14990