Bugzilla – Attachment 146726 Details for
Bug 29792
Transfers created from 'wrong transfer' checkin are not sent if modal is dismissed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29792: [22.05.x] Automatically send wrong transfers
Bug-29792-2205x-Automatically-send-wrong-transfers.patch (text/plain), 5.87 KB, created by
Nick Clemens (kidclamp)
on 2023-02-16 12:14:43 UTC
(
hide
)
Description:
Bug 29792: [22.05.x] Automatically send wrong transfers
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2023-02-16 12:14:43 UTC
Size:
5.87 KB
patch
obsolete
>From fe4fd5ce862634d498c804eb82194116a1badcb4 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 30 Sep 2022 11:01:56 +0000 >Subject: [PATCH] Bug 29792: [22.05.x] Automatically send wrong transfers > >Bug 24434 reinstated the 'updateWrongTransfer' call here, but made the assertion that >the transfer should not be sent until 'Ok' was clicked. > >I see how unsent transfers are useful for rotation, but I believe for wrong transfer we shouldn't require a confirm or print. If a library does want to, the 'transfersblockcirc' system preference will enforce clicking the button >to continue > >This patch also confirms a transfer when item already has a transfer and only options are Confirm/Print because the transfer already exists > >To test: >1 - Disable TransfersBlockCirc system preference >2 - Manually transfer an item from branch A to branch B >3 - Check in the item at branch A >4 - Dismiss modal without confirming >5 - View item on biblio details page, item not in transit >6 - Check in item, confirm transfer >7 - Note item in transit on details page >8 - Check in the item at branch C >9 - Dismiss modal without confirm >10 - View item on biblio detail, not in transit >11 - Checkin at A, cancel transfer >12 - Apply patch >13 - repeat 1 - 4 >14 - Confirm item appears in transit >15 - Check in at branch C, dismiss modal >16 - Confirm item in transit > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > ...92_add_AutomaticConfirmTransfer_preference.pl | 16 ++++++++++++++++ > installer/data/mysql/mandatory/sysprefs.sql | 1 + > .../modules/admin/preferences/circulation.pref | 6 ++++++ > .../prog/en/modules/circ/returns.tt | 10 ++++++++++ > 4 files changed, 33 insertions(+) > create mode 100755 installer/data/mysql/atomicupdate/bug_29792_add_AutomaticConfirmTransfer_preference.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_29792_add_AutomaticConfirmTransfer_preference.pl b/installer/data/mysql/atomicupdate/bug_29792_add_AutomaticConfirmTransfer_preference.pl >new file mode 100755 >index 0000000000..5bda1b1b4f >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_29792_add_AutomaticConfirmTransfer_preference.pl >@@ -0,0 +1,16 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "29792", >+ description => "Add AutomaticConfirmTransfer system preference", >+ up => sub { >+ my ($args) = @_; >+ my ($dbh, $out) = @$args{qw(dbh out)}; >+ $dbh->do(q{ >+ INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES >+ ('AutomaticConfirmTransfer','0',NULL,'Defines whether transfers should be automatically confirmed at checkin if modal dismissed','YesNo') >+ }); >+ # Print useful stuff here >+ say $out "AutomaticConfirmTransfer system preference added"; >+ }, >+}; >diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql >index 37e3c72a7a..21dfacb89e 100644 >--- a/installer/data/mysql/mandatory/sysprefs.sql >+++ b/installer/data/mysql/mandatory/sysprefs.sql >@@ -81,6 +81,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('AutoShareWithMana','subscription','','defines datas automatically shared with mana','multiple'), > ('AutoLocation','0',NULL,'If ON, IP authentication is enabled, blocking access to the staff interface from unauthorized IP addresses','YesNo'), > ('AutomaticItemReturn','1',NULL,'If ON, Koha will automatically set up a transfer of this item to its homebranch','YesNo'), >+('AutomaticWrongTransfer','0',NULL,'Defines whether transfers should be automatically confirmed at checkin if modal dismissed','YesNo'), > ('autoMemberNum','0','','If ON, patron number is auto-calculated','YesNo'), > ('AutoRemoveOverduesRestrictions','0',NULL,'Defines whether an OVERDUES debarment should be lifted automatically if all overdue items are returned by the patron.','YesNo'), > ('AutoRenewalNotices','cron','cron|preferences|never','How should Koha determine whether to end autorenewal notices','Choice'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >index 10fe95c2cd..3a93e77a83 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >@@ -657,6 +657,12 @@ Circulation: > 1: "Block" > 0: "Don't block" > - staff from continuing to checkin items when a transfer is triggered. >+ - >+ - pref: AutomaticConfirmTransfer >+ choices: >+ 1: "Do" >+ 0: "Don't" >+ - automatically confirm a transfer when the modal is dismissed without clicking 'Yes'. > - > - pref: StoreLastBorrower > default: 0 >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 df75c72f6a..3f812efffb 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >@@ -1368,6 +1368,16 @@ > window.open("/cgi-bin/koha/members/printslip.pl?borrowernumber=" + borrowernumber + "&print=checkinslip", "printwindow"); > }); > >+ [% IF ( !(Koha.Preference('TransfersBlockCirc')) && Koha.Preference('AutomaticConfirmTransfer') ) %] >+ $("#wrong-transfer-modal").on('hidden.bs.modal',function(){ >+ $("#wrongtransferform").submit(); >+ }); >+ [% IF (transfer) %] >+ $("#item-transfer-modal").on('hidden.bs.modal',function(){ >+ $("#mainform").submit(); >+ }); >+ [% END %] >+ [% END %] > }); > </script> > [% 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 29792
:
129008
|
129009
|
141124
|
141576
|
143049
| 146726