Bugzilla – Attachment 24214 Details for
Bug 11477
Add names for librarian and borrowers in the logs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 11477 - Add names for librarian and borrowers in the logs
PASSED-QA-Bug-11477---Add-names-for-librarian-and-.patch (text/plain), 4.79 KB, created by
Katrin Fischer
on 2014-01-12 21:24:46 UTC
(
hide
)
Description:
[PASSED QA] Bug 11477 - Add names for librarian and borrowers in the logs
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2014-01-12 21:24:46 UTC
Size:
4.79 KB
patch
obsolete
>From b4ed26f413622714939db7a6c1705b903f6fc024 Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Mon, 6 Jan 2014 15:19:21 +1100 >Subject: [PATCH] [PASSED QA] Bug 11477 - Add names for librarian and borrowers > in the logs > >This patch adds the first name and surname of the librarian and the >user involved in a transaction log, if available. > >If neither the firstname or the surname is available, then the 'object' >number will be prefaced with the 'Member' qualifier. > >_TEST PLAN_ > >0) This patch depends on Bug 11473, so you must apply it first > >Before applying this patch (11477): >1) View the logs. >2) Note that the Librarian column just has a number >3) Note that the Object column will just say Member X (where X is a >number), in the circulation, fines, and patron/member modules. > >Apply the patch. > >4) Reload the logs (you don't need to make new ones) >5) Note that the Librarian and Object columns mentioned above now >have firstname and surname appearing (where available) > >Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >Works as described, passes all tests and QA script. >--- > .../intranet-tmpl/prog/en/modules/tools/viewlog.tt | 4 ++-- > tools/viewlog.pl | 22 ++++++++++++++++++++++ > 2 files changed, 24 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt >index 9809383..38b2fcf 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt >@@ -127,13 +127,13 @@ > <tr> > <td>[% loopro.timestamp %]</td> > <td> >- <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopro.user %]" title="display detail for this librarian."> [% loopro.user %] </a> >+ <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopro.user %]" title="display detail for this librarian."> [% IF ( loopro.userfirstname ) || ( loopro.usersurname ) %][% loopro.userfirstname %] [% loopro.usersurname %] [% END %][% loopro.user %] </a> > </td> > <td>[% loopro.module %]</td> > <td>[% loopro.action %]</td> > <td> > [% IF ( loopro.module == 'MEMBERS' ) || ( loopro.module == 'CIRCULATION' ) || ( loopro.module == 'FINES' ) %] >- <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopro.object %]" title="Display member details."> [% IF ( loopro.object ) %]Member [% loopro.object %][% END %] </a> >+ <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopro.object %]" title="Display member details."> [% IF ( loopro.object ) %][% IF ( loopro.borrowerfirstname ) || ( loopro.borrowersurname ) %][% loopro.borrowerfirstname %] [% loopro.borrowersurname %] [% ELSE %]Member [% END %][% loopro.object %][% END %] </a> > [% ELSE %] > [% IF ( loopro.module == 'CATALOGUING' ) %] > [% IF ( loopro.info.substr(0, 4) == 'item' ) %] >diff --git a/tools/viewlog.pl b/tools/viewlog.pl >index 67ce7dd..cab7a0d 100755 >--- a/tools/viewlog.pl >+++ b/tools/viewlog.pl >@@ -124,6 +124,28 @@ if ($do_it) { > $result->{'biblioitemnumber'}=$item->{'biblionumber'}; > $result->{'barcode'}=$item->{'barcode'}; > } >+ #always add firstname and surname for librarian/user >+ if ($result->{'user'}){ >+ my $userdetails = C4::Members::GetMemberDetails($result->{'user'}); >+ if ($userdetails->{'firstname'}){ >+ $result->{'userfirstname'} = $userdetails->{'firstname'}; >+ } >+ if ($userdetails->{'surname'}){ >+ $result->{'usersurname'} = $userdetails->{'surname'}; >+ } >+ } >+ #add firstname and surname for borrower, when using the CIRCULATION, MEMBERS, FINES >+ if ($result->{module} eq "CIRCULATION" || $result->{module} eq "MEMBERS" || $result->{module} eq "FINES"){ >+ if($result->{'object'}){ >+ my $borrowerdetails = C4::Members::GetMemberDetails($result->{'object'}); >+ if ($borrowerdetails->{'firstname'}){ >+ $result->{'borrowerfirstname'} = $borrowerdetails->{'firstname'}; >+ } >+ if ($borrowerdetails->{'surname'}){ >+ $result->{'borrowersurname'} = $borrowerdetails->{'surname'}; >+ } >+ } >+ } > } > > if ( $output eq "screen" ) { >-- >1.8.3.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 11477
:
23919
|
23926
| 24214