Bugzilla – Attachment 175677 Details for
Bug 38588
Checkin that triggers a transfer => print slip => Internal server error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38588: Don't generate a second transfer when printing transfer slip
Bug-38588-Dont-generate-a-second-transfer-when-pri.patch (text/plain), 5.65 KB, created by
Emily Lamancusa (emlam)
on 2024-12-18 20:48:05 UTC
(
hide
)
Description:
Bug 38588: Don't generate a second transfer when printing transfer slip
Filename:
MIME Type:
Creator:
Emily Lamancusa (emlam)
Created:
2024-12-18 20:48:05 UTC
Size:
5.65 KB
patch
obsolete
>From d69011bc5cd4bc7ffd76f94e6de8c1443db7012a Mon Sep 17 00:00:00 2001 >From: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> >Date: Wed, 18 Dec 2024 12:30:20 -0500 >Subject: [PATCH] Bug 38588: Don't generate a second transfer when printing > transfer slip > >When an item is checked in that should automatically return to its home >branch, AddReturn generates the appropriate transfer. In some cases, the >Print Slip button generates a second transfer, which now causes an >exception to be thrown. > >In returns.pl, the op cud-dotransfer is used when a transfer was not >initiated previously and the librarian has confirmed they want to >initiate and send a transfer. The op cud-transfer is used when a >transfer has already been generated and the page needs to send or >cancel the transfer. > >This patch updates the op from the modal to ensure that the correct of >the two options is generated according to whether a transfer was already >initiated or not. > >To test: >1. Find or create an item that belongs to a branch other than the > logged-in branch >2. In a new tab, check in the item - this should trigger a Return to > Home transfer (keep the bib record tab open for later) >3. Click "Print Slip" >--> Internal server error - 'Active item transfer already exists' >4. Apply patch and restart_all >5. Check in item again and cancel the transfer >6. Check in item again to generate new transfer >7. Click "Print Slip" >--> Checkin page loads correctly >--> Refresh bib record and confirm item shows as in-transit >8. Enable syspref ShowAllCheckins >9. Repeat steps 5-7 >--> Ensure item displays correctly in checkins table >--> Refresh bib record and confirm item still shows as in-transit >10. Repeat steps 5-7, except this time click "Yes" instead of "Print > Slip" >--> Ensure item displays correctly in the checkins table >--> Refresh bib record and confirm item shows as in-transit >10. Set syspref TransfersBlockCirc to Don't Block, and set > AutomaticConfirmTransfer to Enable >11. Check in the item again and cancel the transfer >12. Check in the item to generate new transfer >13. Click away from the modal without selecting a response >--> Ensure item displays correctly in the checkins table >--> Refresh bib record and confirm item shows as in-transit >14. Check out the item to a customer >15. Check the item in and click "Yes" >--> Ensure item displays correctly in the checkins table >--> Refresh bib record and confirm item shows as in-transit >16. Repeat steps 14-15, clicking "Print Slip" instead of "Yes" >--> Ensure item displays correctly in the checkins table >--> Refresh bib record and confirm item shows as in-transit >17. Repeat steps 14-15, clicking away from the modal without selecting a > response >--> Ensure item displays correctly in the checkins table >--> Refresh bib record and confirm item shows as in-transit >--- > koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >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 98a1ea119b..d445341b95 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >@@ -770,16 +770,17 @@ > <input type="hidden" name="tobranch" value="[% returnbranch | html %]" /> > <input type="hidden" name="transferitem" value="[% itemnumber | html %]" /> > <input type="hidden" name="barcode" value="0" /> >- <input type="hidden" name="op" value="cud-dotransfer" /> > <input type="hidden" name="trigger" value="[% trigger | html %]" /> > [% INCLUDE all_checkin_messages %] > </div> > <div class="modal-footer"> > [% IF !transfer %] >+ <input type="hidden" name="op" value="cud-dotransfer" /> > <button type="submit" name="dotransfer" value="Yes" class="btn btn-default approve" accesskey="y"><i class="fa fa-check"></i> Yes (Y)</button> > <button type="button" name="dotransfer" class="btn btn-default print openWin" data-url="transfer-slip.pl?transferitem=[% itemnumber | uri %]&&branchcode=[% returnbranch | uri %]&op=slip"><i class="fa fa-print"></i> Yes, print slip</button> > <button type="button" data-bs-dismiss="modal" class="btn btn-default deny" name="notransfer" value="No" accesskey="n"><i class="fa fa-times"></i> No (N)</button> > [% ELSE %] >+ <input type="hidden" name="op" value="cud-transfer" /> > <input type="hidden" name="transit" value="[% transfer | uri %]"/> > <button type="button" data-bs-dismiss="modal" class="btn btn-default" accesskey="y"><i class="fa fa-check"></i> OK (Y)</button> > <button type="button" data-bs-dismiss="modal" class="btn btn-default print openWin" data-url="transfer-slip.pl?transferitem=[% itemnumber | uri %]&branchcode=[% transfer | uri %]&op=slip" accesskey="p"><i class="fa fa-print"></i> Print slip (P)</button> >-- >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 38588
:
175677
|
175798
|
175958
|
175959
|
175978
|
175979
|
176290
|
176291