Bugzilla – Attachment 156970 Details for
Bug 33547
Print slips from the preservation module
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33547: (QA follow-up) Tidy
Bug-33547-QA-follow-up-Tidy.patch (text/plain), 4.80 KB, created by
Nick Clemens (kidclamp)
on 2023-10-12 13:55:50 UTC
(
hide
)
Description:
Bug 33547: (QA follow-up) Tidy
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2023-10-12 13:55:50 UTC
Size:
4.80 KB
patch
obsolete
>From e0e8a1305df5cc58eb568ce64d61f358299ae45d Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 12 Oct 2023 13:32:08 +0000 >Subject: [PATCH] Bug 33547: (QA follow-up) Tidy > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > Koha/Preservation/Train/Item.pm | 3 ++- > preservation/home.pl | 14 +++++++------- > preservation/print_slip.pl | 22 +++++++++++----------- > t/db_dependent/Koha/Preservation/Trains.t | 6 ++++-- > 4 files changed, 24 insertions(+), 21 deletions(-) > >diff --git a/Koha/Preservation/Train/Item.pm b/Koha/Preservation/Train/Item.pm >index 6089ae5d3b..bc02c791e2 100644 >--- a/Koha/Preservation/Train/Item.pm >+++ b/Koha/Preservation/Train/Item.pm >@@ -62,6 +62,7 @@ sub catalogue_item { > return Koha::Item->_new_from_dbic($item_rs); > } > >+ > =head3 train > > Return the train object for this item >@@ -69,7 +70,7 @@ Return the train object for this item > =cut > > sub train { >- my ( $self ) = @_; >+ my ($self) = @_; > my $rs = $self->_result->train; > return Koha::Preservation::Train->_new_from_dbic($rs); > } >diff --git a/preservation/home.pl b/preservation/home.pl >index a13c48dedc..1ae4aced0b 100755 >--- a/preservation/home.pl >+++ b/preservation/home.pl >@@ -40,18 +40,18 @@ $template->param( > map { > my $table = $_; > map { ( $table . '.' . $_ => $columns->{$table}->{$_} ) } >- keys %{ $columns->{$table} } >+ keys %{ $columns->{$table} } > } qw( biblio biblioitems items ) > }, > api_mappings => { >- items => Koha::Item->to_api_mapping, >+ items => Koha::Item->to_api_mapping, > biblioitems => Koha::Biblioitem->to_api_mapping, >- biblio => Koha::Biblio->to_api_mapping, >+ biblio => Koha::Biblio->to_api_mapping, > }, >- notice_templates => >- [ map { { id => $_->id, code => $_->code, name => $_->name } } >- Koha::Notice::Templates->search( { module => 'preservation' } ) >- ->as_list ], >+ notice_templates => [ >+ map { { id => $_->id, code => $_->code, name => $_->name } } >+ Koha::Notice::Templates->search( { module => 'preservation' } )->as_list >+ ], > ); > > output_html_with_http_headers $query, $cookie, $template->output; >diff --git a/preservation/print_slip.pl b/preservation/print_slip.pl >index ec3687ba0f..f54d356825 100755 >--- a/preservation/print_slip.pl >+++ b/preservation/print_slip.pl >@@ -25,24 +25,24 @@ use C4::Letters; > use Koha::Patrons; > use Koha::Preservation::Train::Items; > >-my $input = CGI->new; >+my $input = CGI->new; > my $train_item_id = $input->param('train_item_id'); > > my ( $template, $loggedinuser, $cookie ) = get_template_and_user( > { >- template_name => "circ/printslip.tt", >- query => $input, >- type => "intranet", >- flagsrequired => { preservation => '*' }, >+ template_name => "circ/printslip.tt", >+ query => $input, >+ type => "intranet", >+ flagsrequired => { preservation => '*' }, > } > ); > > my $logged_in_user = Koha::Patrons->find($loggedinuser); >-my $branch = C4::Context->userenv->{'branch'}; >+my $branch = C4::Context->userenv->{'branch'}; > > my $train_item = Koha::Preservation::Train::Items->find($train_item_id); > >-unless ($train_item){ >+unless ($train_item) { > print $input->redirect("/cgi-bin/koha/errors/404.pl"); > exit; > } >@@ -64,12 +64,12 @@ my $slip = $letter->{content}; > my $is_html = $letter->{is_html}; > > $template->param( >- slip => $slip, >- plain => !$is_html, >- caller => 'preservation', >+ slip => $slip, >+ plain => !$is_html, >+ caller => 'preservation', > stylesheet => C4::Context->preference("SlipCSS"), > ); > >-$template->param( IntranetSlipPrinterJS => C4::Context->preference('IntranetSlipPrinterJS' ) ); >+$template->param( IntranetSlipPrinterJS => C4::Context->preference('IntranetSlipPrinterJS') ); > > output_html_with_http_headers $input, $cookie, $template->output; >diff --git a/t/db_dependent/Koha/Preservation/Trains.t b/t/db_dependent/Koha/Preservation/Trains.t >index d881c5d89f..a5866d42d2 100755 >--- a/t/db_dependent/Koha/Preservation/Trains.t >+++ b/t/db_dependent/Koha/Preservation/Trains.t >@@ -99,9 +99,11 @@ subtest 'add_items & items' => sub { > is( $item_2->get_from_storage->notforloan, 0 ); > is( $item_3->get_from_storage->notforloan, $not_for_loan_train_in ); > >- is( ref( $item_train_1->train ), >+ is( >+ ref( $item_train_1->train ), > 'Koha::Preservation::Train', >- 'Train::Item->train returns a Koha::Preservation::Train object' ); >+ 'Train::Item->train returns a Koha::Preservation::Train object' >+ ); > > warning_is { > $train->add_item( { item_id => $item_2->itemnumber }, { skip_waiting_list_check => 1 } ); >-- >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 33547
:
149774
|
149775
|
152048
|
152257
|
152258
|
152259
|
152260
|
152971
|
152972
|
152973
|
152974
|
154204
|
154205
|
154206
|
154207
|
156892
|
156893
|
156894
|
156895
|
156966
|
156967
|
156968
|
156969
|
156970
|
157586
|
157587
|
157588
|
157589
|
157590