Bugzilla – Attachment 158694 Details for
Bug 31391
Staff-side recalls
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31391: Interface and wording fixes
Bug-31391-Interface-and-wording-fixes.patch (text/plain), 14.76 KB, created by
Aleisha Amohia
on 2023-11-09 02:47:10 UTC
(
hide
)
Description:
Bug 31391: Interface and wording fixes
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2023-11-09 02:47:10 UTC
Size:
14.76 KB
patch
obsolete
>From 58ead5f5c468ff5f07e2055a25ef4bd2228662d0 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Thu, 2 Mar 2023 00:42:28 +0000 >Subject: [PATCH] Bug 31391: Interface and wording fixes > >This patch includes the following fixes: >- Making the atomic updates executable >- Preventing warns when running tests >- Updating db updates >- Fixing terminology >- Make 'cancel selected recalls' button yellow >- Fix HTML makeup of recalls request page >- Show a warning when placing a recall if there is already a >record-level hold by this patron >- Show a link to mark a hold for conversion which selects the recall >option on holds page >- Include changes to patron search dropdown >- add 'mark hold for conversion to recall' column to columns settings > >Signed-off-by: David Nind <david@davidnind.com> >--- > admin/columns_settings.yml | 2 ++ > ..._CANCELLATION-RECALLED_authorised_value.pl | 4 +++- > ...ug_31391_-_add_RecallsInterface_syspref.pl | 4 +++- > .../prog/en/includes/holds_table.inc | 6 ++++++ > .../admin/preferences/circulation.pref | 18 ++++++++-------- > .../prog/en/modules/recalls/request.tt | 21 +++++++++++++++---- > .../prog/en/modules/reserve/request.tt | 6 +++++- > recalls/request.pl | 2 ++ > t/db_dependent/Holds.t | 12 +++++++++++ > 9 files changed, 59 insertions(+), 16 deletions(-) > mode change 100644 => 100755 installer/data/mysql/atomicupdate/bug_31391_-_add_HOLD_CANCELLATION-RECALLED_authorised_value.pl > mode change 100644 => 100755 installer/data/mysql/atomicupdate/bug_31391_-_add_RecallsInterface_syspref.pl > >diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml >index 5a36f9b1d4a..6c8ab2ccc72 100644 >--- a/admin/columns_settings.yml >+++ b/admin/columns_settings.yml >@@ -1710,6 +1710,8 @@ modules: > columnname: suspend > - > columnname: print_slip >+ - >+ columnname: convert_to_recall > > holdsratios: > holds-ratios: >diff --git a/installer/data/mysql/atomicupdate/bug_31391_-_add_HOLD_CANCELLATION-RECALLED_authorised_value.pl b/installer/data/mysql/atomicupdate/bug_31391_-_add_HOLD_CANCELLATION-RECALLED_authorised_value.pl >old mode 100644 >new mode 100755 >index dc2b8249052..57967eedb80 >--- a/installer/data/mysql/atomicupdate/bug_31391_-_add_HOLD_CANCELLATION-RECALLED_authorised_value.pl >+++ b/installer/data/mysql/atomicupdate/bug_31391_-_add_HOLD_CANCELLATION-RECALLED_authorised_value.pl >@@ -2,11 +2,13 @@ use Modern::Perl; > > return { > bug_number => "31391", >- description => "Add new RECALLED value to HOLD_CANCELLATION authorised value category", >+ description => "Staff-side recalls", > up => sub { > my ($args) = @_; > my ($dbh, $out) = @$args{qw(dbh out)}; > > $dbh->do(q{ INSERT IGNORE INTO authorised_values (category, authorised_value, lib) VALUES ('HOLD_CANCELLATION','RECALLED','Hold was converted to a recall') }); >+ >+ say $out "Added RECALLED value to HOLD_CANCELLATION authorised value category"; > }, > }; >diff --git a/installer/data/mysql/atomicupdate/bug_31391_-_add_RecallsInterface_syspref.pl b/installer/data/mysql/atomicupdate/bug_31391_-_add_RecallsInterface_syspref.pl >old mode 100644 >new mode 100755 >index 48ca6d92bc3..15c301fa823 >--- a/installer/data/mysql/atomicupdate/bug_31391_-_add_RecallsInterface_syspref.pl >+++ b/installer/data/mysql/atomicupdate/bug_31391_-_add_RecallsInterface_syspref.pl >@@ -2,11 +2,13 @@ use Modern::Perl; > > return { > bug_number => "31391", >- description => "Add new system preference RecallsInterface", >+ description => "Staff-side recalls", > up => sub { > my ($args) = @_; > my ($dbh, $out) = @$args{qw(dbh out)}; > > $dbh->do(q{INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('RecallsInterface','opac','opac|staff|both','The interface that recalls can be placed through','Choice') }); >+ >+ say $out "Added system preference 'RecallsInterface'"; > }, > }; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc >index 03cd935a6b1..520dedb05d3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc >@@ -21,6 +21,7 @@ > <th id="delete" data-colname="delete">Delete</th> > <th id="suspend" data-colname="suspend">Suspend</th> > <th id="print_slip" data-colname="print_slip">Print hold/transfer slip</th> >+ <th id="convert_to_recall" data-colname="convert_to_recall">Convert hold to recall</th> > </tr> > </thead> > [%- SET first_priority = 0 -%] >@@ -251,6 +252,11 @@ > [% ELSE %] > <td></td> > [% END %] >+ <td> >+ [% IF Koha.Preference('UseRecalls') AND Koha.Preference('RecallsInterface') != 'opac' %] >+ <a class="convert-to-recall btn" title="Convert hold to recall" data-id="[% hold.reserve_id | html %]">Mark for conversion to recall</a> >+ [% END %] >+ </td> > </tr> > [% END %] > </tbody> >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 9a5c2c422b6..f7a3189a12f 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 >@@ -1375,6 +1375,15 @@ Circulation: > 1: Use > 0: "Don't use" > - recalls. Make sure you configure <a href="/cgi-bin/koha/admin/smart-rules.pl">circulation and fine rules</a> for recalls once enabled. >+ - >+ - Recalls can be placed through >+ - pref: RecallsInterface >+ default: opac >+ choices: >+ opac: the OPAC only >+ staff: the staff interface only >+ both: both the OPAC and the staff interface >+ - . (Requires <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=UseRecalls">UseRecalls</a>.) > > SIP2: > - >@@ -1418,12 +1427,3 @@ Circulation: > 1: Enable > 0: Disable > - "the curbside pickup module." >- - >- - Recalls can be placed through >- - pref: RecallsInterface >- default: opac >- choices: >- opac: the OPAC only >- staff: the staff interface only >- both: both the OPAC and the staff interface >- - . (Requires <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=UseRecalls">UseRecalls</a>.) >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/recalls/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/recalls/request.tt >index c0d7c3d246b..73163064252 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/recalls/request.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/recalls/request.tt >@@ -57,6 +57,12 @@ > </div> > [% END %] > >+ [% IF patron_holds_count %] >+ <div class="dialog message"> >+ Patron has placed one or more record-level holds. <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblio.biblionumber | html %]">Convert a hold to a recall</a>. >+ </div> >+ [% END %] >+ > <fieldset class="rows"> > <legend>Recall details</legend> > <form id="recallform" action="/cgi-bin/koha/recalls/request.pl" method="post"> >@@ -109,7 +115,7 @@ > <th>Barcode</th> > [% UNLESS ( single_branch_mode ) %] > <th>Home library</th> >- <th>Last location</th> >+ <th>Holding library</th> > [% END %] > <th>Collection</th> > <th>Call number</th> >@@ -146,7 +152,7 @@ > <span class="intransit">In transit from [% Branches.GetName( item.get_transfer.frombranch ) | html %] to [% Branches.GetName( item.get_transfer.tobranch ) | html %] since [% item.get_transfer.datesent | $KohaDates %]</span> > [% END %] > [% IF ( item.itemlost || item.withdrawn ) %] >- <span class="lost">Unavailable (lost or missing)</span> >+ <span class="lost">Unavailable (lost or withdrawn)</span> > [% END %] > [% IF ( item.notforloan ) %] > <span class="notforloan">Not for loan ([% item.notforloan | html %])</span> >@@ -166,7 +172,7 @@ > </span> > [% ELSIF ( hold.borrowernumber == logged_in_user.borrowernumber ) %] > <span class="waiting"> >- Patron has already placed a <a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% patron.borrowernumber | uri %]#reserves">reserve</a> on this item. >+ Patron has already placed a <a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% patron.borrowernumber | uri %]#reserves">hold</a> on this item. > </span> > [% END # / IF ( item.recall or hold ) %] > </td> >@@ -213,6 +219,8 @@ > > [% END %] > >+ <div class="page-section"> >+ > <h2>Existing recalls</h2> > > [% IF Koha.Preference('UseRecalls') %] >@@ -224,7 +232,7 @@ > <input type="checkbox" id="select_all"> <span id="select_all_text">Select all</span> > [% INCLUDE 'recalls.inc' %] > <fieldset class="action"> >- <button type="submit" id="cancel_selected" class="btn btn-default btn-sm">Cancel selected recalls</button> >+ <button type="submit" id="cancel_selected" class="btn btn-primary btn-sm">Cancel selected recalls</button> > </fieldset> > </form> > </div> <!-- /.page-section --> >@@ -235,6 +243,8 @@ > <div class="dialog message">Recalls have not been enabled. Enable the <a href="/cgi-bin/koha/admin/preferences.pl?tab=circulation">UseRecalls</a> system preference to use recalls.</div> > [% END %] > >+ </div> <!-- page-section Existing recalls --> >+ > [% END %] > > </main> >@@ -254,10 +264,13 @@ > [% INCLUDE 'datatables.inc' %] > [% INCLUDE 'columns_settings.inc' %] > [% INCLUDE 'calendar.inc' %] >+ [% INCLUDE 'select2.inc' %] > [% SET url_biblio_params = "biblionumber=" _ biblio.biblionumber %] > [% PROCESS patron_search_js table_id => 'table_borrowers', categories => categories, libraries => libraries, extended_attribute_types => attribute_type_codes, columns => columns, open_on_row_click => 1, on_click_url => '/cgi-bin/koha/recalls/request.pl?' _ url_biblio_params, redirect_if_one_result => 1, redirect_url => '/cgi-bin/koha/recalls/request.pl?' _ url_biblio_params, redirect_if_attribute_equal => 'cardnumber' %] > <script> > table_settings = [% TablesSettings.GetColumns( 'circ', 'circulation', 'table_borrowers', 'json' ) | $raw %]; >+ $.fn.select2.defaults.set("width", "100%" ); >+ $.fn.select2.defaults.set("dropdownAutoWidth", true ); > $(document).ready(function(){ > $("#recalls_patronsearch").on("submit", filter); > [% UNLESS patron %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >index 8cbca1f4951..217aa7f700d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >@@ -212,7 +212,7 @@ > [% IF ( recallerror ) %] > <div class="dialog alert"> > <h3>Hold cannot be converted to a recall</h3> >- <p>A recall cannot be placed on one or more holds. Check your <a href="/cgi-bin/koha/admin/smart-rules.pl">circulation and fine rules</a>.</p> >+ <p>A recall cannot be placed for one or more holds. Check your <a href="/cgi-bin/koha/admin/smart-rules.pl">circulation and fine rules</a>.</p> > </div> > [% END %] > >@@ -1759,6 +1759,10 @@ > window.open("/cgi-bin/koha/circ/hold-transfer-slip.pl?reserve_id=" + reserve_id); > return false; > }) >+ $(".convert-to-recall").click(function(){ >+ var reserve_id = $(this).attr('data-id'); >+ $("select[class='rank-request'][data-hold-id='"+reserve_id+"']").val('recall'); >+ }); > </script> > [% END %] > >diff --git a/recalls/request.pl b/recalls/request.pl >index 2ec38ccd78b..5839ad76c1d 100755 >--- a/recalls/request.pl >+++ b/recalls/request.pl >@@ -122,9 +122,11 @@ if ( $borrowernumber ) { > if ( !$biblio->can_be_recalled({ patron => $patron }) ) { > $error = 1; > } >+ my $patron_holds_count = Koha::Holds->search({ borrowernumber => $borrowernumber, biblionumber => $biblio->biblionumber, item_level_hold => 0 })->count; > > $template->param( > patron => $patron, >+ patron_holds_count => $patron_holds_count, > ); > } > } >diff --git a/t/db_dependent/Holds.t b/t/db_dependent/Holds.t >index c43958ecf6b..d33b3a41d0c 100755 >--- a/t/db_dependent/Holds.t >+++ b/t/db_dependent/Holds.t >@@ -1905,6 +1905,7 @@ subtest 'ModReserve to convert a hold to a recall' => sub { > surname => 'whatever surname', > categorycode => $category->{categorycode}, > branchcode => $branch, >+ email => 'name@email.com', > } > )->store; > my $borrowernumber = $patron->borrowernumber; >@@ -1915,6 +1916,7 @@ subtest 'ModReserve to convert a hold to a recall' => sub { > surname => 'whatever surname', > categorycode => $category->{categorycode}, > branchcode => $branch, >+ email => 'name2@email.com', > } > )->store; > >@@ -1934,6 +1936,16 @@ subtest 'ModReserve to convert a hold to a recall' => sub { > }, > }); > >+ my $notice = Koha::Notice::Template->new({ >+ name => 'Hold cancellation', >+ module => 'reserves', >+ code => 'HOLD_CANCELLATION', >+ title => 'Hold cancelled', >+ content => 'Your hold was cancelled.', >+ message_transport_type => 'email', >+ branchcode => q{}, >+ })->store(); >+ > my $reserve_id = AddReserve( > { > branchcode => $branch, >-- >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 31391
:
139442
|
139443
|
139444
|
139446
|
139642
|
139643
|
139644
|
139645
|
141474
|
142594
|
143155
|
144104
|
144105
|
144131
|
144132
|
144133
|
144134
|
144135
|
144136
|
147581
|
147582
|
150485
|
150486
|
150487
|
150488
|
150489
|
150490
|
150491
|
156995
|
156996
|
156997
|
156998
|
156999
|
157000
|
157001
|
158691
|
158692
|
158693
|
158694
|
158695
|
158825
|
158826
|
158827
|
158828
|
158829
|
158830
|
158831
|
158832
|
172166
|
172167
|
172168
|
172169
|
172170
|
172171
|
172172
|
172173
|
172174
|
172175
|
173839
|
173840
|
173841
|
173842
|
173843
|
173844
|
173845
|
173846
|
173847
|
174396
|
174822
|
174823
|
174824
|
174825
|
174826
|
174827
|
174828
|
174829
|
174830
|
174831