@@ -, +, @@ TEST => Observe that you see a "Patron username" column the the table, containing the patron's correct userid 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 | 27 +++++++++++++++++----- 2 files changed, 23 insertions(+), 7 deletions(-) --- a/Koha/Illrequest.pm +++ a/Koha/Illrequest.pm @@ -1006,7 +1006,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 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt @@ -45,6 +45,7 @@ 'metadata_Author', 'metadata_Title', 'borrowername', + 'borroweruserid', 'biblio_id', 'library', 'status', @@ -106,8 +107,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 '' + @@ -115,6 +116,15 @@ ''; }; + // Our 'render' function for patron userid + var createPatronUserID = function(data, type, row) { + return '' + + row.patron_userid + + ''; + }; + // Our 'render' function for the library name var createLibrary = function(data, type, row) { return row.library.branchname; @@ -173,8 +183,12 @@ func: createActionLink }, borrowername: { - name: _("Patron"), - func: createPatronLink + name: _("Patron name"), + func: createPatronName + }, + borroweruserid: { + name: _("Patron username"), + func: createPatronUserID }, illrequest_id: { name: _("Request number"), @@ -512,7 +526,7 @@ Patron: [% borrowerlink = "/cgi-bin/koha/members/moremember.pl" _ "?borrowernumber=" _ request.patron.borrowernumber %] - [% request.patron.firstname _ " " _ request.patron.surname _ " [" _ request.patron.cardnumber _ "]" %] + [% request.patron.firstname _ " " _ request.patron.surname _ " [" _ request.patron.cardnumber _ "] [" _ request.patron.userid _ "]" %] @@ -588,7 +602,8 @@ Author Title - Patron + Patron name + Patron username Biblio ID Library Status --