Bugzilla – Attachment 128562 Details for
Bug 29695
Centralize columns' descriptions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29695: (follow-up) Remove C4::Reports::Guided::_get_column_defs
Bug-29695-follow-up-Remove-C4ReportsGuidedgetcolum.patch (text/plain), 2.04 KB, created by
Jonathan Druart
on 2021-12-15 12:42:27 UTC
(
hide
)
Description:
Bug 29695: (follow-up) Remove C4::Reports::Guided::_get_column_defs
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-12-15 12:42:27 UTC
Size:
2.04 KB
patch
obsolete
>From f460e788d5f73984b988892453300d23d1c7e2e5 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 14 Dec 2021 15:57:13 +0100 >Subject: [PATCH] Bug 29695: (follow-up) Remove > C4::Reports::Guided::_get_column_defs > >Same as the previous patch but for the inventory. > >Test plan: >Same as before but test the inventory tool >--- > tools/inventory.pl | 13 ++++--------- > 1 file changed, 4 insertions(+), 9 deletions(-) > >diff --git a/tools/inventory.pl b/tools/inventory.pl >index 52b05997032..871cc983e01 100755 >--- a/tools/inventory.pl >+++ b/tools/inventory.pl >@@ -37,6 +37,7 @@ use C4::Charset qw( NormalizeString ); > > use Koha::Biblios; > use Koha::DateUtils qw( dt_from_string output_pref ); >+use Koha::Database::Columns; > use Koha::AuthorisedValues; > use Koha::BiblioFrameworks; > use Koha::ClassSources; >@@ -383,14 +384,7 @@ if (defined $input->param('CSVexport') && $input->param('CSVexport') eq 'on'){ > -attachment => 'inventory.csv', > ); > >- my $columns_def_hashref = C4::Reports::Guided::_get_column_defs($input); >- foreach my $key ( keys %$columns_def_hashref ) { >- my $initkey = $key; >- $key =~ s/[^\.]*\.//; >- $columns_def_hashref->{$initkey}=NormalizeString($columns_def_hashref->{$initkey} // ''); >- $columns_def_hashref->{$key} = $columns_def_hashref->{$initkey}; >- } >- >+ my $columns = Koha::Database::Columns->columns; > my @translated_keys; > for my $key (qw / biblioitems.title biblio.author > items.barcode items.itemnumber >@@ -399,7 +393,8 @@ if (defined $input->param('CSVexport') && $input->param('CSVexport') eq 'on'){ > items.itemlost items.damaged > items.withdrawn items.stocknumber > / ) { >- push @translated_keys, $columns_def_hashref->{$key}; >+ my ( $table, $column ) = split '\.', $key; >+ push @translated_keys, NormalizeString($columns->{$table}->{$column} // ''); > } > push @translated_keys, 'problem' if $uploadbarcodes; > >-- >2.25.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 29695
:
128522
|
128523
|
128524
|
128525
|
128526
|
128527
|
128528
|
128529
|
128559
|
128560
|
128561
|
128562
|
128563
|
128564
|
128565
|
130065
|
130066
|
130067
|
130068
|
130069
|
130070
|
130071
|
130107
|
130108
|
130109
|
130110
|
130111
|
130112
|
130113
|
131918
|
131919
|
131920
|
131921
|
131922
|
131923
|
131924
|
131925