Bugzilla – Attachment 80782 Details for
Bug 19532
Recalls for Koha
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19532 - New RECALL_REQUESTER_DET notice and print option on confirm recall popup
Bug-19532---New-RECALLREQUESTERDET-notice-and-prin.patch (text/plain), 11.91 KB, created by
Alex Buckley
on 2018-10-17 23:11:12 UTC
(
hide
)
Description:
Bug 19532 - New RECALL_REQUESTER_DET notice and print option on confirm recall popup
Filename:
MIME Type:
Creator:
Alex Buckley
Created:
2018-10-17 23:11:12 UTC
Size:
11.91 KB
patch
obsolete
>From 31aaa394cdea5d0825216a2304ada31b9ab66899 Mon Sep 17 00:00:00 2001 >From: Alex Buckley <alexbuckley@catalyst.net.nz> >Date: Sat, 21 Jul 2018 09:56:27 +0000 >Subject: [PATCH] Bug 19532 - New RECALL_REQUESTER_DET notice and print option > on confirm recall popup > >This patch adds a new notice RECALL_REQUESTER_DET which like HOLD_SLIP >outlines borrower and item information so the item can be put aside for >the requester. > >This patch also adds a 'Print and confirm' button to the 'Confirm >recall' popup that appears when returning a recalled item. This >functionality works the same as the 'Print and confirm' functionality >for the Hold slip: A print modal popup will appear for the user to >choose print settings, and choose to print or cancel. > >Test plan: >1. Ensure 'UseRecalls' sypref is enabled and you have inputted >values for recalls fields in the circulation rules >(Administration->Circulation and fines rules) > >2. Check item out to patron 1 > >3. Log into the OPAC as patron 2 and place a recall on the checked out >item > >4. Return the item in the staff client > >5. Notice there are only two buttons on the 'Confirm recall' popup which >appears: 'Confirm' and 'Cancel' > >6. Apply patch, run updatedatabase.pl (as there is a SQL atomicupdate >file to be run), and restart memcached and plack > >7. Using a new item repeat steps 2,3 > >8. In a new tab, in the staff client go to Circulation->Recalls queue, >and notice the recall has a status of 'Requested' > >8. Back in your first tab return the item and notice that a new button >'Print and confirm' is on the 'Confirm recall' popup. Select this button >and notice two new popup windows appear: Browsers print window, and a >window showing what the notice to be print looks like. > >9. If you have a printer available print the notice. > >Otherwise you can look at what the notice would look like in the notice window, observing the notice outlines the following information: > >* Current date and time >* Recall pickup branch >* Borrowers first name and surname >* Borrowers cardnumber, phonenumber, address, address2, city, zipcode, email >* Recalled item title, author, barcode, callnumber. >* Recall waiting date, and recall notes > >Some of these values will not be displayed on the notice if they are not >set. For example the patron may not have set an address, or email. > >10. After either printing the notice, or selecting 'Cancel' in the print >window. Go back to your second tab and refresh the page and notice the >status of the recall has changed to 'Ready for pickup' this shows the >'Print and confirm' button does actually confirm the recall. > >11. Making sure the changes implemented in the previous commit (Bug >19532 - Make the Recall confirmation popup appear everytime a recalled item is put through returns) still work. Try returning the item again and notice the 'Confirm recall' popup with the 'Print and confirm' button is displayed again and you can choose to print the notice again if you want. > >Sponsored-By: Toi Ohomai Institute of Technology, New Zealand >--- > C4/Letters.pm | 1 + > circ/recall-pickup-slip.pl | 88 ++++++++++++++++++++++ > circ/returns.pl | 10 +++ > .../bug_19532_recall_requester_details_notice.sql | 1 + > .../prog/en/modules/circ/recall-pickup-slip.tt | 26 +++++++ > .../intranet-tmpl/prog/en/modules/circ/returns.tt | 10 +++ > 6 files changed, 136 insertions(+) > create mode 100755 circ/recall-pickup-slip.pl > create mode 100644 installer/data/mysql/atomicupdate/bug_19532_recall_requester_details_notice.sql > create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/circ/recall-pickup-slip.tt > >diff --git a/C4/Letters.pm b/C4/Letters.pm >index f12a014..65915af 100644 >--- a/C4/Letters.pm >+++ b/C4/Letters.pm >@@ -40,6 +40,7 @@ use Koha::Notice::Messages; > use Koha::DateUtils qw( format_sqldatetime dt_from_string ); > use Koha::Patrons; > use Koha::Subscriptions; >+use Data::Dumper; > > use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); > >diff --git a/circ/recall-pickup-slip.pl b/circ/recall-pickup-slip.pl >new file mode 100755 >index 0000000..daf6c88 >--- /dev/null >+++ b/circ/recall-pickup-slip.pl >@@ -0,0 +1,88 @@ >+#!/usr/bin/perl >+ >+ >+# Copyright 2018 Catalyst IT >+# >+# This file is part of Koha. >+# >+# Koha is free software; you can redistribute it and/or modify it >+# under the terms of the GNU General Public License as published by >+# the Free Software Foundation; either version 3 of the License, or >+# (at your option) any later version. >+# >+# Koha is distributed in the hope that it will be useful, but >+# WITHOUT ANY WARRANTY; without even the implied warranty of >+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >+# GNU General Public License for more details. >+# >+# You should have received a copy of the GNU General Public License >+# along with Koha; if not, see <http://www.gnu.org/licenses>. >+ >+use Modern::Perl; >+use C4::Context; >+use C4::Output; >+use CGI qw ( -utf8 ); >+use C4::Auth qw/:DEFAULT get_session/; >+use Koha::Recall; >+use Koha::Recalls; >+use C4::Letters; >+use C4::Message; >+use Data::Dumper; >+use Koha::Patrons; >+use Koha::Items; >+use Koha::Biblios; >+use Koha::Libraries; >+use vars qw($debug); >+ >+BEGIN { >+ $debug = $ENV{DEBUG} || 0; >+} >+ >+my $input = new CGI; >+my $sessionID = $input->cookie("CGISESSID"); >+my $session = get_session($sessionID); >+ >+my $borrowernumber = $input->param('borrowernumber'); >+my $biblionumber = $input->param('biblionumber'); >+my $itemnumber = $input->param('itemnumber'); >+my $recallid = $input->param('recall_id'); >+my ( $template, $loggedinuser, $cookie ) = get_template_and_user( >+ { >+ template_name => "circ/recall-pickup-slip.tt", >+ query => $input, >+ type => "intranet", >+ authnotrequired => 0, >+ flagsrequired => { circulate => "circulate_remaining_permissions" }, >+ debug => $debug, >+ } >+); >+ >+my $recall = Koha::Recalls->find($recallid); >+my $patron = Koha::Patrons->find($borrowernumber); >+my $item = Koha::Items->find($recall->itemnumber); >+my $biblio = Koha::Biblios->find($item->biblionumber); >+my $library = Koha::Libraries->find($recall->branchcode); >+ >+#Print slip to inform library staff of details of recall requester, so the item can be put aside for requester >+my ($slip, $is_html); >+my $letter = C4::Letters::GetPreparedLetter ( >+ module => 'circulation', >+ letter_code => 'RECALL_REQUESTER_DET', >+ tables => { >+ 'branches' => $library->branchcode, >+ 'borrowers' => $patron->borrowernumber, >+ 'biblio' => $biblio->biblionumber, >+ 'items' => $item->itemnumber, >+ 'recalls' => $recall->recall_id >+ } >+); >+ >+if ($letter) { >+ $slip = $letter->{content}; >+ $is_html = $letter->{is_html}; >+} >+ >+$template->param( slip => $slip ) if ($slip); >+$template->param( plain => !$is_html ); >+ >+output_html_with_http_headers $input, $cookie, $template->output; >diff --git a/circ/returns.pl b/circ/returns.pl >index 32d3c21..cc13b9a 100755 >--- a/circ/returns.pl >+++ b/circ/returns.pl >@@ -89,6 +89,16 @@ if ( $query->param('print_slip') ) { > ); > } > >+if ( $query->param('print_recall_slip') ) { >+ $template->param( >+ print_recall_slip => 1, >+ borrowernumber => scalar $query->param('borrowernumber'), >+ biblionumber => scalar $query->param('biblionumber'), >+ itemnumber => scalar $query->param('itemnumber'), >+ recall_id => scalar $query->param('recall_id') >+ ); >+} >+ > ##################### > #Global vars > my $printers = GetPrinters(); >diff --git a/installer/data/mysql/atomicupdate/bug_19532_recall_requester_details_notice.sql b/installer/data/mysql/atomicupdate/bug_19532_recall_requester_details_notice.sql >new file mode 100644 >index 0000000..8c841d5 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_19532_recall_requester_details_notice.sql >@@ -0,0 +1 @@ >+insert into letter (module, code, name, is_html, title, content, message_transport_type, lang) values ('circulation', 'RECALL_REQUESTER_DET', 'Details of patron who recalled item', 0, 'Details of patorn who recalled item', '<h5>Date: <<today>></h5><h3> Recall for pickup at <<branches.branchname>></h3><h3><<borrowers.surname>>, <<borrowers.firstname>></h3><ul><li><<borrowers.cardnumber>></li><li><<borrowers.phone>></li><li><<borrowers.address>><br /><<borrowers.address2>><br /><<borrowers.city >><<borrowers.zipcode>></li><li><<borrowers.email>></li></ul><br /><h3>ITEM RECALLED</h3><h4><<biblio.title>></h4><h5><<biblio.author>></h5><ul><li><<items.barcode>></li><li><<items.itemcallnumber>></li><li><<recalls.waitingdate>></li></ul><p>Notes:<pre><<recalls.recallnotes>></pre></p>', 'email', default); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/recall-pickup-slip.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/recall-pickup-slip.tt >new file mode 100644 >index 0000000..a2ba1e7 >--- /dev/null >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/recall-pickup-slip.tt >@@ -0,0 +1,26 @@ >+[% USE Asset %] >+[% USE Koha %] >+[% INCLUDE 'doc-head-open.inc' %] >+<title>Koha › Circulation › Recall print receipt</title> >+[% INCLUDE 'doc-head-close.inc' %] >+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> >+<link rel="shortcut icon" href="[% IF ( IntranetFavicon ) %][% IntranetFavicon %][% ELSE %][% interface %]/[% theme %]/img/favicon.ico[% END %]" type="image/x-icon" /> >+[% Asset.css("css/print.css") %] >+[% IF ( Koha.Preference('SlipCSS') ) %] >+<link rel="stylesheet" type="text/css" href="[% Koha.Preference('SlipCSS') %]" /> >+[% END %] >+ >+[% INCLUDE 'slip-print.inc' #printThenClose %] >+</head> >+<body id="circ_printslip" class="circ"> >+<div id="receipt"> >+ >+[% IF plain %] >+<pre> >+[% IF ( slip ) %][% slip %][% ELSE %]No slip template found[% END %] >+</pre> >+[% ELSE %] >+[% IF ( slip ) %][% slip %][% ELSE %]No slip template found[% END %] >+[% END %] >+ >+[% INCLUDE 'intranet-bottom.inc' %] >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 254b1db..ae2b303 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >@@ -559,6 +559,8 @@ > <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber %]" /> > <input type="hidden" name="biblionumber" value="[% itembiblionumber %]" /> > <input type="hidden" name="recall_id" value="[% recall.recall_id %]" /> >+ <input type="hidden" name="diffBranch" value="[% recall.branchcode %]" /> >+ <input type="hidden" name="print_recall_slip" value="0" /> > </div> > > <div class="modal-footer"> >@@ -566,6 +568,11 @@ > <i class="fa fa-check"></i> Confirm recall [% IF transfer_recall %]and transfer[% END %] > </button> > >+ <input type="hidden" name="print_slip" value="0" /> >+ <button type="submit" class="btn btn-default print" onclick="this.form.print_recall_slip.value = 1; this.form.submit();"> >+ <i class="fa fa-print"></i> Print and confirm >+ </button> >+ > <button data-dismiss="modal" aria-hidden="true" type="submit" class="btn btn-danger deny" onclick="$('#barcode').focus(); return false;"> > <i class="fa fa-times"></i> Ignore > </button> >@@ -838,6 +845,9 @@ > e.preventDefault(); > Dopop('hold-transfer-slip.pl?borrowernumber=[% patron.borrowernumber | html %]&biblionumber=[% biblionumber | html %]'); > }); >+ [% IF print_recall_slip %] >+ Dopop('recall-pickup-slip.pl?borrowernumber=[% borrowernumber %]&biblionumber=[% biblionumber %]&recall_id=[% recall_id %]') ; >+ [% END %] > > [% IF print_slip %] > Dopop('hold-transfer-slip.pl?borrowernumber=[% borrowernumber | html %]&biblionumber=[% biblionumber | html %]&itemnumber=[% itemnumber | html %]'); >-- >2.1.4
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 19532
:
68569
|
68570
|
68571
|
68572
|
68642
|
68643
|
68644
|
68645
|
68653
|
69100
|
69102
|
69147
|
69148
|
69149
|
69170
|
69172
|
69221
|
69222
|
69223
|
69322
|
69353
|
69354
|
69405
|
69409
|
69410
|
69411
|
69841
|
69872
|
69873
|
69874
|
69875
|
69876
|
69877
|
69878
|
69879
|
69880
|
69881
|
69882
|
69883
|
69884
|
69885
|
69886
|
69887
|
69888
|
69889
|
69890
|
69986
|
70093
|
71409
|
71574
|
71575
|
71576
|
71577
|
71578
|
71579
|
71580
|
71581
|
71582
|
71583
|
71584
|
71585
|
71586
|
71587
|
71588
|
71589
|
71590
|
71591
|
71592
|
72244
|
72311
|
72312
|
72313
|
72314
|
72315
|
72316
|
72317
|
72318
|
72319
|
72320
|
72321
|
72322
|
72323
|
72324
|
72325
|
72326
|
72327
|
72328
|
72329
|
72330
|
72331
|
72332
|
72333
|
72334
|
72335
|
72336
|
72337
|
72338
|
72527
|
76817
|
76818
|
76819
|
76820
|
76821
|
76822
|
76823
|
76824
|
76825
|
76826
|
76827
|
76828
|
76829
|
76830
|
76831
|
76832
|
76833
|
76834
|
76835
|
76836
|
76837
|
76838
|
76839
|
76840
|
76841
|
76842
|
76843
|
76844
|
76845
|
76846
|
76847
|
77177
|
77178
|
77179
|
78755
|
78757
|
78759
|
78761
|
78763
|
78765
|
78766
|
78768
|
78770
|
78772
|
78773
|
78774
|
78775
|
78776
|
78777
|
78778
|
78780
|
78782
|
78785
|
78787
|
78789
|
78790
|
78792
|
78794
|
78797
|
78800
|
78801
|
78802
|
78803
|
78804
|
78805
|
78806
|
78807
|
78808
|
80763
|
80764
|
80765
|
80766
|
80767
|
80768
|
80769
|
80770
|
80771
|
80772
|
80773
|
80774
|
80775
|
80776
|
80777
|
80778
|
80779
|
80780
|
80781
|
80782
|
80783
|
80784
|
80785
|
80786
|
80787
|
80788
|
80789
|
80793
|
80878
|
81204
|
81205
|
81206
|
81207
|
81208
|
81209
|
81210
|
81211
|
81212
|
81213
|
81214
|
81215
|
81216
|
81217
|
81218
|
81219
|
81220
|
81221
|
81222
|
81223
|
81224
|
81225
|
81226
|
81227
|
81228
|
81229
|
81230
|
81231
|
81232
|
81233
|
81234
|
81235
|
81236
|
81237
|
81238
|
81239
|
81240
|
81241
|
81242
|
81243
|
81244
|
81245
|
81246
|
81247
|
81547
|
81548
|
81549
|
81550
|
81551
|
81552
|
81553
|
81554
|
81555
|
81556
|
81557
|
81558
|
81559
|
81560
|
81561
|
81562
|
81563
|
81564
|
81565
|
81566
|
81567
|
81568
|
81569
|
81583
|
81584
|
81585
|
81586
|
81587
|
81588
|
81595
|
81618
|
81652
|
81653
|
81654
|
81655
|
81656
|
81657
|
81658
|
81659
|
81660
|
81661
|
81662
|
81663
|
81664
|
81665
|
81666
|
81667
|
81668
|
81669
|
81670
|
81671
|
81672
|
81673
|
81674
|
81675
|
81676
|
81677
|
81678
|
81679
|
81680
|
81681
|
81682
|
81683
|
103887
|
103888
|
103890
|
103899
|
103900
|
103901
|
103999
|
104000
|
104001
|
104002
|
104005
|
104006
|
104007
|
104066
|
104067
|
104068
|
104069
|
104070
|
104071
|
104246
|
104247
|
104248
|
104249
|
104250
|
104322
|
104323
|
104324
|
104325
|
104326
|
104327
|
104328
|
104329
|
104330
|
104331
|
104332
|
104333
|
104334
|
104335
|
104336
|
104391
|
104392
|
104393
|
104394
|
104395
|
104396
|
104397
|
104398
|
104474
|
104475
|
104476
|
104477
|
104478
|
104479
|
104480
|
104481
|
104545
|
104546
|
104547
|
104548
|
104549
|
104550
|
104551
|
104552
|
104646
|
104647
|
104648
|
104649
|
104650
|
104651
|
104652
|
104653
|
104722
|
104723
|
104724
|
104725
|
104726
|
104727
|
104728
|
104729
|
104806
|
104807
|
104808
|
104809
|
104810
|
104811
|
104812
|
104813
|
104814
|
104815
|
104816
|
104817
|
104818
|
104819
|
104820
|
104821
|
104863
|
104864
|
104865
|
104866
|
104867
|
104868
|
104869
|
104870
|
104902
|
104903
|
104904
|
104905
|
104906
|
104907
|
104908
|
104909
|
104910
|
104913
|
104914
|
104915
|
104916
|
104917
|
104918
|
104919
|
104920
|
104988
|
104989
|
104990
|
104991
|
104992
|
106268
|
106269
|
106371
|
106372
|
106373
|
106374
|
106375
|
106376
|
106377
|
106378
|
106810
|
106811
|
106812
|
106813
|
106814
|
106815
|
106816
|
106817
|
106857
|
107198
|
107199
|
107200
|
107201
|
107202
|
107203
|
107204
|
107205
|
107807
|
107808
|
107809
|
107810
|
107811
|
107812
|
107813
|
107814
|
107918
|
107919
|
107920
|
107921
|
107922
|
107923
|
107924
|
107925
|
108222
|
108223
|
108224
|
108225
|
108226
|
108227
|
108228
|
108229
|
108980
|
108981
|
108982
|
109306
|
109307
|
109308
|
109309
|
109310
|
109311
|
109312
|
109313
|
109314
|
109315
|
109316
|
109317
|
109318
|
109463
|
109464
|
109465
|
109466
|
109467
|
109468
|
109469
|
109775
|
109776
|
109777
|
109778
|
109779
|
109780
|
109781
|
109782
|
109783
|
109784
|
109785
|
111199
|
111200
|
111201
|
111202
|
111203
|
111204
|
111205
|
111206
|
112316
|
112317
|
112321
|
112322
|
112323
|
112324
|
112325
|
112326
|
112346
|
112472
|
112491
|
112540
|
112612
|
112613
|
112614
|
112615
|
112616
|
112617
|
112618
|
112619
|
112620
|
112621
|
112622
|
113195
|
113196
|
113197
|
113198
|
113199
|
113200
|
113201
|
113202
|
113203
|
113204
|
113205
|
113286
|
113287
|
113288
|
113289
|
113290
|
113291
|
113292
|
113293
|
113294
|
113295
|
113296
|
113297
|
113298
|
113335
|
113351
|
113352
|
113353
|
113354
|
113355
|
113356
|
113357
|
113358
|
113359
|
113361
|
113362
|
113363
|
113364
|
113365
|
113430
|
113431
|
113432
|
113433
|
113434
|
113435
|
113436
|
113437
|
113438
|
113439
|
113440
|
113441
|
113442
|
113443
|
113444
|
113445
|
116121
|
116122
|
116123
|
116124
|
116125
|
116126
|
116127
|
116128
|
116129
|
116130
|
116131
|
116132
|
116133
|
116134
|
118267
|
118268
|
118269
|
118270
|
118271
|
118272
|
118273
|
118274
|
118275
|
118276
|
118277
|
118278
|
118279
|
118280
|
122993
|
122994
|
122995
|
122996
|
122997
|
122998
|
122999
|
123000
|
123001
|
123002
|
123003
|
123004
|
123005
|
126244
|
126245
|
126246
|
126247
|
126248
|
126249
|
126250
|
126251
|
126252
|
126253
|
126254
|
126255
|
126256
|
126257
|
126453
|
126454
|
126455
|
126456
|
126457
|
126458
|
126459
|
126460
|
126469
|
126470
|
126565
|
126566
|
126568
|
126569
|
126570
|
126571
|
126572
|
126573
|
126574
|
126575
|
126576
|
126577
|
126578
|
126579
|
126580
|
129305
|
129306
|
129307
|
129308
|
129309
|
129310
|
129311
|
129312
|
129313
|
129314
|
129315
|
129316
|
129317
|
129318
|
129319
|
130641
|
130642
|
130643
|
130644
|
130645
|
130646
|
130647
|
130648
|
130649
|
130650
|
130651
|
130652
|
130653
|
130654
|
130655
|
130656
|
131108
|
131156
|
131157
|
131158
|
131159
|
131160
|
131193
|
131213
|
131257
|
131260
|
131261
|
131262
|
131263
|
131264
|
131265
|
131266
|
131267
|
131268
|
131269
|
131270
|
131271
|
131272
|
131273
|
131274
|
131275
|
131276
|
131277
|
131278
|
131279
|
131280
|
131281
|
131282
|
131330
|
131629
|
131630
|
131631
|
131664
|
131665
|
131666
|
131701
|
132332