Bugzilla – Attachment 80609 Details for
Bug 20883
Display patron user id
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20883: Add patron userid to display
Bug-20883-Add-patron-userid-to-display.patch (text/plain), 5.21 KB, created by
Mark Tompsett
on 2018-10-15 15:32:50 UTC
(
hide
)
Description:
Bug 20883: Add patron userid to display
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2018-10-15 15:32:50 UTC
Size:
5.21 KB
patch
obsolete
>From 6138f42dee233831b5aadd9e1186dff7c8688065 Mon Sep 17 00:00:00 2001 >From: Andrew Isherwood <andrew.isherwood@ptfs-europe.com> >Date: Tue, 5 Jun 2018 14:59:44 +0100 >Subject: [PATCH] Bug 20883: Add patron userid to display > >This patch adds the display of patron userid to both the "illlist" and >"illview" pages. > >Test plan (see bug 7317 for ILL deployment details): >1) Ensure you have at least one ILL request >2) Go to the main "List requests" page by clicking "ILL requests" from >the main staff interface > TEST => Observe that you see a "Patron username" column the the > table, containing the patron's correct userid >3) Click "Manage request" on a request > TEST => Observe that, in the "Patron" row, you see the patron's > correct userid in brackets (along with their name and barcode) >--- > Koha/Illrequest.pm | 3 ++- > .../prog/en/modules/ill/ill-requests.tt | 26 +++++++++++++++++----- > 2 files changed, 22 insertions(+), 7 deletions(-) > >diff --git a/Koha/Illrequest.pm b/Koha/Illrequest.pm >index cc61a870e5..71d9a99b67 100644 >--- a/Koha/Illrequest.pm >+++ b/Koha/Illrequest.pm >@@ -1007,7 +1007,8 @@ sub TO_JSON { > $object->{patron} = { > firstname => $patron->firstname, > surname => $patron->surname, >- cardnumber => $patron->cardnumber >+ cardnumber => $patron->cardnumber, >+ userid => $patron->userid > }; > } > # Augment the request response with metadata details if appropriate >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt >index 584616263d..0a48e1bc47 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt >@@ -46,6 +46,7 @@ > 'metadata_Author', > 'metadata_Title', > 'borrowername', >+ 'borroweruserid', > 'biblio_id', > 'library', > 'status', >@@ -107,8 +108,8 @@ > return value; > }; > >- // Our 'render' function for borrowerlink >- var createPatronLink = function(data, type, row) { >+ // Our 'render' function for patron name >+ var createPatronName = function(data, type, row) { > return '<a title="' + _("View borrower details") + '" ' + > 'href="/cgi-bin/koha/members/moremember.pl?' + > 'borrowernumber='+row.borrowernumber+'">' + >@@ -116,6 +117,14 @@ > '</a>'; > }; > >+ // Our 'render' function for patron userid >+ var createPatronUserID = function(data, type, row) { >+ return '<a title="' + _("View borrower details") + '" ' + >+ 'href="/cgi-bin/koha/members/moremember.pl?' + >+ 'borrowernumber='+row.borrowernumber+'">' + >+ row.patron_userid + >+ '</a>'; >+ > // Our 'render' function for biblio_id > var createBiblioLink = function(data, type, row) { > return (row.biblio_id) ? >@@ -184,8 +193,12 @@ > func: createActionLink > }, > borrowername: { >- name: _("Patron"), >- func: createPatronLink >+ name: _("Patron name"), >+ func: createPatronName >+ }, >+ borroweruserid: { >+ name: _("Patron username"), >+ func: createPatronUserID > }, > illrequest_id: { > name: _("Request number"), >@@ -276,7 +289,7 @@ > 'bSearchable': false > }, > ], >- 'aaSorting': [[ 6, 'desc' ]], // Default sort, updated descending >+ 'aaSorting': [[ 8, 'desc' ]], // Default sort, updated descending > 'processing': true, // Display a message when manipulating > 'iDisplayLength': 10, // 10 results per page > 'sPaginationType': "full_numbers", // Pagination display >@@ -519,7 +532,7 @@ > <span class="label borrowernumber">Patron:</span> > [% borrowerlink = "/cgi-bin/koha/members/moremember.pl" _ "?borrowernumber=" _ request.patron.borrowernumber %] > <a href="[% borrowerlink | html %]" title="View borrower details"> >- [% request.patron.firstname _ " " _ request.patron.surname _ " [" _ request.patron.cardnumber _ "]" | html %] >+ [% request.patron.firstname _ " " _ request.patron.surname _ " [" _ request.patron.cardnumber _ "] [" _ request.patron.userid _ "]" | html %] > </a> > </div> > >@@ -616,6 +629,7 @@ > <th>Author</th> > <th>Title</th> > <th>Patron</th> >+ <th>Patron username</th> > <th>Bibliographic record ID</th> > <th>Library</th> > <th>Status</th> >-- >2.11.0
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 20883
:
75817
|
75821
|
80609
|
80610
|
80611
|
80614