Bugzilla – Attachment 110928 Details for
Bug 25261
Multiple parts handling - confirmation alert
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25261: (QA follow-up) Capitalize return of needsconfirm
Bug-25261-QA-follow-up-Capitalize-return-of-needsc.patch (text/plain), 7.73 KB, created by
Martin Renvoize (ashimema)
on 2020-09-29 14:51:40 UTC
(
hide
)
Description:
Bug 25261: (QA follow-up) Capitalize return of needsconfirm
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2020-09-29 14:51:40 UTC
Size:
7.73 KB
patch
obsolete
>From d983e93146fb656faaf7adc149f37ced56ece9e7 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Wed, 2 Sep 2020 12:00:07 +0100 >Subject: [PATCH] Bug 25261: (QA follow-up) Capitalize return of needsconfirm > >This patch capitalizes the 'ADDITIONAL_MATERIALS' key in the >needsconfirm hash return value for CanBookBeIssued to restore >consistency with previous code and ensure SIP Checkout works as >expected. > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > C4/Circulation.pm | 2 +- > C4/SIP/ILS/Transaction/Checkout.pm | 2 +- > circ/circulation.pl | 2 +- > .../intranet-tmpl/prog/en/modules/circ/circulation.tt | 10 +++++----- > .../opac-tmpl/bootstrap/en/modules/sco/sco-main.tt | 2 +- > opac/sco/sco-main.pl | 2 +- > t/db_dependent/Circulation.t | 2 +- > 7 files changed, 11 insertions(+), 11 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 23415ead8e..5c05326123 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -901,7 +901,7 @@ sub CanBookBeIssued { > if ( C4::Context->preference("CircConfirmItemParts") > && $item_object->materials ) > { >- $needsconfirmation{additional_materials} = $item_object->materials; >+ $needsconfirmation{ADDITIONAL_MATERIALS} = $item_object->materials; > } > > # >diff --git a/C4/SIP/ILS/Transaction/Checkout.pm b/C4/SIP/ILS/Transaction/Checkout.pm >index 12e5813b23..84fa15f4be 100644 >--- a/C4/SIP/ILS/Transaction/Checkout.pm >+++ b/C4/SIP/ILS/Transaction/Checkout.pm >@@ -96,7 +96,7 @@ sub do_checkout { > } elsif ($confirmation eq 'PREVISSUE') { > $self->screen_msg("This item was previously checked out by you"); > last; >- } elsif ( $confirmation eq 'additional_materials' ) { >+ } elsif ( $confirmation eq 'ADDITIONAL_MATERIALS' ) { > $self->screen_msg('Item must be issued at a circulation desk'); > $noerror = 0; > last; >diff --git a/circ/circulation.pl b/circ/circulation.pl >index c20f7c6d95..dcb206119c 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -395,7 +395,7 @@ if (@$barcodes) { > my $materials = $item->materials; > my $descriptions = Koha::AuthorisedValues->get_description_by_koha_field({ frameworkcode => $biblio->frameworkcode, kohafield => 'items.materials', authorised_value => $materials }); > $materials = $descriptions->{lib} // $materials; >- $template_params->{additional_materials} = $materials; >+ $template_params->{ADDITIONAL_MATERIALS} = $materials; > $template_params->{itemhomebranch} = $item->homebranch; > > # pass needsconfirmation to template if issuing is possible and user hasn't yet confirmed. >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >index 851b3706bd..42f20a72d8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -54,9 +54,9 @@ > <div id="autoswitched" class="dialog message">Patron was automatically switched by reading the patron card during checking out. Ensure you are working with the right patron.</div> > [% END %] > >- [% IF additional_materials %] >+ [% IF ADDITIONAL_MATERIALS %] > <div id="materials" class="dialog message">Note about the accompanying materials: <br /> >- [% additional_materials | html %] >+ [% ADDITIONAL_MATERIALS | html %] > </div> > [% END %] > >@@ -82,7 +82,7 @@ > > [% IF ( NEEDSCONFIRMATION ) %] > <div id="circ_needsconfirmation" class="dialog alert audio-alert-action"> >- [% IF CAN_user_circulate_force_checkout or additional_materials %] >+ [% IF CAN_user_circulate_force_checkout or ADDITIONAL_MATERIALS %] > <h3>Please confirm checkout</h3> > [% ELSE %] > <h3>Cannot check out</h3> >@@ -198,9 +198,9 @@ > </li> > [% END %] > >- [% IF additional_materials %] >+ [% IF ADDITIONAL_MATERIALS %] > <li> >- Please confirm that the accompanying materials are present: [% additional_materials | html %] >+ Please confirm that the accompanying materials are present: [% ADDITIONAL_MATERIALS | html %] > </li> > [% END %] > </ul> >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 4c3bc937b5..bb038d8db3 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 >@@ -83,7 +83,7 @@ > Your contact information seems to be incomplete. > [% ELSIF ( circ_error_INVALID_DATE ) %] > Due date is not valid. >- [% ELSIF ( circ_error_additional_materials ) %] >+ [% ELSIF ( circ_error_ADDITIONAL_MATERIALS ) %] > Item must be issued at a circulation desk. > [% END %] > Please see a member of the library staff. >diff --git a/opac/sco/sco-main.pl b/opac/sco/sco-main.pl >index dedb1b68ad..28791d3c4f 100755 >--- a/opac/sco/sco-main.pl >+++ b/opac/sco/sco-main.pl >@@ -150,7 +150,7 @@ elsif ( $patron && ( $op eq 'checkout' ) ) { > ); > my $issue_error; > if ( $confirm_required = scalar keys %$needconfirm ) { >- for my $error ( qw( UNKNOWN_BARCODE max_loans_allowed ISSUED_TO_ANOTHER NO_MORE_RENEWALS NOT_FOR_LOAN DEBT WTHDRAWN RESTRICTED RESERVED ITEMNOTSAMEBRANCH EXPIRED DEBARRED CARD_LOST GNA INVALID_DATE UNKNOWN_BARCODE TOO_MANY DEBT_GUARANTEES USERBLOCKEDOVERDUE PATRON_CANT PREVISSUE NOT_FOR_LOAN_FORCING ITEM_LOST additional_materials) ) { >+ for my $error ( qw( UNKNOWN_BARCODE max_loans_allowed ISSUED_TO_ANOTHER NO_MORE_RENEWALS NOT_FOR_LOAN DEBT WTHDRAWN RESTRICTED RESERVED ITEMNOTSAMEBRANCH EXPIRED DEBARRED CARD_LOST GNA INVALID_DATE UNKNOWN_BARCODE TOO_MANY DEBT_GUARANTEES USERBLOCKEDOVERDUE PATRON_CANT PREVISSUE NOT_FOR_LOAN_FORCING ITEM_LOST ADDITIONAL_MATERIALS) ) { > if ( $needconfirm->{$error} ) { > $issue_error = $error; > $confirmed = 0; >diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t >index 60320aac32..d078ef1550 100755 >--- a/t/db_dependent/Circulation.t >+++ b/t/db_dependent/Circulation.t >@@ -3565,7 +3565,7 @@ subtest 'CanBookBeIssued & CircConfirmItemParts' => sub { > my $dt_due = dt_from_string->add( days => 3 ); > > my ( $issuingimpossible, $needsconfirmation ) = CanBookBeIssued( $patron, $item->barcode, $dt_due, undef, undef, undef ); >- is_deeply( $needsconfirmation, { additional_materials => 'includes DVD' }, 'Item needs confirmation of additional parts' ); >+ is_deeply( $needsconfirmation, { ADDITIONAL_MATERIALS => 'includes DVD' }, 'Item needs confirmation of additional parts' ); > }; > > subtest 'Do not return on renewal (LOST charge)' => sub { >-- >2.20.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 25261
:
103856
|
103857
|
104011
|
104012
|
104013
|
104404
|
104405
|
104406
|
104407
|
104408
|
104409
|
104410
|
104411
|
104412
|
104413
|
104414
|
107217
|
107218
|
107219
|
107220
|
107221
|
107222
|
107228
|
107229
|
107230
|
107231
|
107232
|
107233
|
107234
|
107285
|
107331
|
107822
|
107823
|
108196
|
108197
|
108198
|
108199
|
108200
|
108201
|
108202
|
108203
|
108204
|
108205
|
108206
|
108207
|
108208
|
108230
|
108231
|
108232
|
108233
|
108234
|
108235
|
108236
|
108237
|
108238
|
108239
|
108240
|
108241
|
108242
|
109478
|
109479
|
109480
|
109481
|
109482
|
109483
|
109484
|
109485
|
109486
|
109487
|
109488
|
109489
|
109490
|
109491
|
109492
|
109493
|
109494
|
109495
|
109496
|
109497
|
109498
|
109499
|
109500
|
109501
|
109502
|
109503
|
109504
|
109508
|
110038
|
110039
|
110040
|
110041
|
110042
|
110043
|
110044
|
110045
|
110046
|
110047
|
110048
|
110049
|
110050
|
110051
|
110052
|
110133
|
110184
|
110258
|
110259
|
110268
|
110322
|
110323
|
110324
|
110325
|
110326
|
110327
|
110328
|
110329
|
110330
|
110331
|
110332
|
110333
|
110334
|
110335
|
110336
|
110337
|
110338
|
110339
|
110340
|
110341
|
110356
|
110357
|
110358
|
110359
|
110360
|
110361
|
110362
|
110363
|
110364
|
110365
|
110366
|
110367
|
110368
|
110369
|
110370
|
110371
|
110372
|
110373
|
110374
|
110375
|
110915
|
110916
|
110917
|
110918
|
110919
|
110920
|
110921
|
110922
|
110923
|
110924
|
110925
|
110926
|
110927
| 110928 |
110929
|
110930
|
110931
|
110932
|
110933
|
110934
|
111027