Bugzilla – Attachment 82548 Details for
Bug 21854
Patron category is not showing during batch modification
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21854: Use template plugin to display category description
Bug-21854-Use-template-plugin-to-display-category-.patch (text/plain), 3.50 KB, created by
Marcel de Rooy
on 2018-11-20 14:46:35 UTC
(
hide
)
Description:
Bug 21854: Use template plugin to display category description
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2018-11-20 14:46:35 UTC
Size:
3.50 KB
patch
obsolete
>From 048ed88f0b32bc12875efad36a418b5716b7c8dc Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 16 Nov 2018 17:23:14 +0000 >Subject: [PATCH] Bug 21854: Use template plugin to display category > description >Content-Type: text/plain; charset=utf-8 > >Rather than getting the description in the script and passing, we should >just use the tmeplate plugin to get the description from the category >code. > >To test: >1 - Find a patron, note their category >2 - Visit Tools - Batch patron modification >3 - Enter barcode of patron above >4 - Note category does not show in the display of patrons to be modified >5 - Apply patch >6 - Reload the page, note the patron category displays >7 - Modify the patron (anything but category) >8 - Check that category still diplays correctly in results > >Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com> >Signed-off-by: Andreas Roussos <arouss1980@gmail.com> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt | 3 ++- > tools/modborrowers.pl | 3 --- > 2 files changed, 2 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt >index a1a4aee..3f0581a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt >@@ -3,6 +3,7 @@ > [% USE Koha %] > [% USE KohaDates %] > [% USE Branches %] >+[% USE Categories %] > [% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Tools › Batch patron modification</title> >@@ -164,7 +165,7 @@ > <td>[% borrower.surname | html %]</td> > <td>[% borrower.firstname | html %]</td> > <td>[% Branches.GetName( borrower.branchcode ) | html %]</td> >- <td>[% borrower.category_description | html %]</td> >+ <td>[% Categories.GetName(borrower.categorycode) | html %]</td> > <td>[% borrower.city | html %]</td> > <td>[% borrower.state | html %]</td> > <td>[% borrower.zipcode | html %]</td> >diff --git a/tools/modborrowers.pl b/tools/modborrowers.pl >index 7b8587a..fb672a6 100755 >--- a/tools/modborrowers.pl >+++ b/tools/modborrowers.pl >@@ -336,9 +336,7 @@ if ( $op eq 'do' ) { > for my $borrowernumber ( @borrowernumbers ) { > my $patron = Koha::Patrons->find( $borrowernumber ); > if ( $patron ) { >- my $category_description = $patron->category->description; > $patron = $patron->unblessed; >- $patron->{category_description} = $category_description; > $patron->{patron_attributes} = C4::Members::Attributes::GetBorrowerAttributes( $patron->{borrowernumber} ); > $max_nb_attr = scalar( @{ $patron->{patron_attributes} } ) > if scalar( @{ $patron->{patron_attributes} } ) > $max_nb_attr; >@@ -360,7 +358,6 @@ if ( $op eq 'do' ) { > $template->param( borrowers => \@borrowers ); > $template->param( attributes_header => \@attributes_header ); > >- $template->param( borrowers => \@borrowers ); > $template->param( errors => \@errors ); > } else { > >-- >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 21854
:
82415
|
82417
|
82421
| 82548