Bugzilla – Attachment 189512 Details for
Bug 22322
Self-checkin module should provide for automatic logins (like self-checkout)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22322: Handle setting transfer status correctly
0001-Bug-22322-Handle-setting-transfer-status-correctly.patch (text/plain), 14.36 KB, created by
Emmi Takkinen
on 2025-11-12 12:56:54 UTC
(
hide
)
Description:
Bug 22322: Handle setting transfer status correctly
Filename:
MIME Type:
Creator:
Emmi Takkinen
Created:
2025-11-12 12:56:54 UTC
Size:
14.36 KB
patch
obsolete
>From fb9e4f255f01021279ba64fb0923f2c10f2b8793 Mon Sep 17 00:00:00 2001 >From: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> >Date: Tue, 14 Oct 2025 13:01:17 +0300 >Subject: [PATCH] Bug 22322: Handle setting transfer status correctly > >If one checked in an item which has a hold and which >should be put in transfer, reason for transfer was set as >"ResFound". This has been replaced with "Reserve" and using >wrong reason parameter lead to error "The reason parameter >is mandatory". Also if wrong transfer was detected, SCO would >fail with error since branch where item should be transfered >couldn't be determined just using the old transfers branchcode. > >To test: >1. Apply this patch. >2. Find an item which is checked out and has holds for a >patron in different library. >3. Return item via SCO check in from SCO main page. >=> Item should be checked in succesfully. >4. Find an item which is in transit from a branch A to B and >check it out from branch C. >=> Koha shouldn't fail on error. > >Also fix QA tool issues. > >Sponsored-by: Koha-Suomi Oy >--- > .../bootstrap/en/modules/sco/sco-main.tt | 110 +++++++++--------- > opac/sco/sco-main.pl | 5 +- > 2 files changed, 58 insertions(+), 57 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt >index d610862ad0..846cf7ebc6 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt >@@ -319,46 +319,46 @@ > [% END %] > > <div class="row"> >- <div id="sco_entry_checkout" class="sco_entry col" > >+ <div id="sco_entry_checkout" class="sco_entry col"> > <h4>Check out</h4> > <form id="mainform" action="/cgi-bin/koha/sco/sco-main.pl" name="mainform" method="post"> > [% INCLUDE 'csrf-token.inc' %] > <fieldset> > <legend>Log in to your account</legend> >- <div class="col-md-6"> >- [% IF ( Koha.Preference('SelfCheckoutByLogin') ) %] >- <div class="row"> >- <div class="col-md-12"> [% PROCESS login_label for="patronlogin" %] </div> >- <div class="col-md-12"> >- <input type="text" id="patronlogin" class="form-control focus noEnterSubmit" size="20" name="patronlogin" autocomplete="off" /> >- </div> >- <div class="col-md-12"> >- <label for="patronpw">Password:</label> >- </div> >- <div class="col-md-12"> >- <input type="password" id="patronpw" class="form-control" size="20" name="patronpw" autocomplete="off" /> >- </div> >- <div class="col-md-12"> >- <button type="submit" class="btn btn-primary">Log in</button> >- </div> >+ <div class="col-md-6"> >+ [% IF ( Koha.Preference('SelfCheckoutByLogin') ) %] >+ <div class="row"> >+ <div class="col-md-12"> [% PROCESS login_label for="patronlogin" %] </div> >+ <div class="col-md-12"> >+ <input type="text" id="patronlogin" class="form-control focus noEnterSubmit" size="20" name="patronlogin" autocomplete="off" /> > </div> >- <!-- /.row --> >- [% ELSE %] >- <div class="row"> >- <div class="col-md-12"> >- <label for="patronid">Please enter your card number:</label> >- </div> >- <div class="col-md-12"> >- <input type="text" id="patronid" class="form-control focus" size="20" name="patronid" autocomplete="off" /> >- </div> >- <div class="col-md-12"> >- <button type="submit" class="btn btn-primary">Submit</button> >- </div> >+ <div class="col-md-12"> >+ <label for="patronpw">Password:</label> > </div> >- <!-- /.row --> >- [% END %] >- </div> >- <!-- /.col-md-6 --> >+ <div class="col-md-12"> >+ <input type="password" id="patronpw" class="form-control" size="20" name="patronpw" autocomplete="off" /> >+ </div> >+ <div class="col-md-12"> >+ <button type="submit" class="btn btn-primary">Log in</button> >+ </div> >+ </div> >+ <!-- /.row --> >+ [% ELSE %] >+ <div class="row"> >+ <div class="col-md-12"> >+ <label for="patronid">Please enter your card number:</label> >+ </div> >+ <div class="col-md-12"> >+ <input type="text" id="patronid" class="form-control focus" size="20" name="patronid" autocomplete="off" /> >+ </div> >+ <div class="col-md-12"> >+ <button type="submit" class="btn btn-primary">Submit</button> >+ </div> >+ </div> >+ <!-- /.row --> >+ [% END %] >+ </div> >+ <!-- /.col-md-6 --> > [% FOREACH INPUT IN INPUTS %] > <input type="hidden" name="[% INPUT.name | html %]" value="[% INPUT.value | html %]" /> > [% END %] >@@ -368,34 +368,34 @@ > <!-- /#mainform --> > </div> > <!-- / #sco_entry_checkout --> >- <div id="sco_entry_checkin" class="sco_entry col" > >+ <div id="sco_entry_checkin" class="sco_entry col"> > <h4>Check in</h4> > <form id="barcodeform" action="/cgi-bin/koha/sco/sco-main.pl" name="barcodeform" method="post"> > [% INCLUDE 'csrf-token.inc' %] > <fieldset> >- <div class="col-md-6"> >- <div class="row"> >- <div class="col-md-12"> >- <label for="sco_entry_barcode">Please enter barcode:</label> >- </div> >- <div class="col-md-12"> >- [% IF ( returned == 1 || returned == 0 || empty_return ) %] >- <input type="text" id="sco_entry_barcode" class="form-control focus" size="20" name="sco_entry_barcode" autocomplete="off" /> >- [% ELSE %] >- <input type="text" id="sco_entry_barcode" class="form-control" size="20" name="sco_entry_barcode" autocomplete="off" /> >- [% END %] >- </div> >- <div class="col-md-12"> >- <button type="submit" class="btn btn-primary">Submit</button> >- </div> >+ <div class="col-md-6"> >+ <div class="row"> >+ <div class="col-md-12"> >+ <label for="sco_entry_barcode">Please enter barcode:</label> >+ </div> >+ <div class="col-md-12"> >+ [% IF ( returned == 1 || returned == 0 || empty_return ) %] >+ <input type="text" id="sco_entry_barcode" class="form-control focus" size="20" name="sco_entry_barcode" autocomplete="off" /> >+ [% ELSE %] >+ <input type="text" id="sco_entry_barcode" class="form-control" size="20" name="sco_entry_barcode" autocomplete="off" /> >+ [% END %] >+ </div> >+ <div class="col-md-12"> >+ <button type="submit" class="btn btn-primary">Submit</button> > </div> >- <!-- /.row --> >- [% FOREACH INPUT IN INPUTS %] >- <input type="hidden" name="[% INPUT.name |html %]" value="[% INPUT.value |html %]"> >- [% END %] >- <input type="hidden" name="op" value="cud-sco_entry_checkin" /> > </div> >- <!-- /.col-md-6 --> >+ <!-- /.row --> >+ [% FOREACH INPUT IN INPUTS %] >+ <input type="hidden" name="[% INPUT.name |html %]" value="[% INPUT.value |html %]" /> >+ [% END %] >+ <input type="hidden" name="op" value="cud-sco_entry_checkin" /> >+ </div> >+ <!-- /.col-md-6 --> > </fieldset> > </form> > <!-- /#barcodeform --> >diff --git a/opac/sco/sco-main.pl b/opac/sco/sco-main.pl >index 53a274fb30..efc4803735 100755 >--- a/opac/sco/sco-main.pl >+++ b/opac/sco/sco-main.pl >@@ -207,7 +207,7 @@ if ( ( $op eq "cud-sco_entry_checkin" ) || ( $patron && $op eq "cud-returnbook" > > if ($diff_branch_send) { > ModReserveAffect( $itemnumber, $resborrower, $diff_branch_send, $reserve_id ); >- ModItemTransfer( $itemnumber, $branch, $resbranch, 'ResFound' ); >+ ModItemTransfer( $itemnumber, $branch, $resbranch, 'Reserve' ); > } else { > my $set_transit = C4::Context->preference('RequireSCCheckInBeforeNotifyingPickups'); > ModReserveAffect( $itemnumber, $resborrower, $set_transit, $reserve_id ); >@@ -219,8 +219,9 @@ if ( ( $op eq "cud-sco_entry_checkin" ) || ( $patron && $op eq "cud-returnbook" > if ( $messages->{'WrongTransfer'} ) { > my $item = Koha::Items->find( $messages->{'WrongTransferItem'} ); > my $old_transfer = $item->get_transfer; >+ my $to_library = Koha::Libraries->find( $old_transfer->tobranch ); > my $new_transfer = $item->request_transfer( >- { to => $old_transfer->tobranch, reason => $old_transfer->reason, replace => 'WrongTransfer' } ); >+ { to => $to_library, reason => $old_transfer->reason, replace => 'WrongTransfer' } ); > } > > } >-- >2.34.1 >
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 22322
:
123299
|
139170
|
140162
|
143764
|
150770
|
150776
|
161722
|
161723
|
165722
|
165723
|
178815
|
179010
|
180953
|
180954
|
182337
|
182338
| 189512