Bugzilla – Attachment 82343 Details for
Bug 21835
Request ID is displayed as NaN
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21835: Fix display of request ID
Bug-21835-Fix-display-of-request-ID.patch (text/plain), 1.91 KB, created by
Owen Leonard
on 2018-11-14 17:06:43 UTC
(
hide
)
Description:
Bug 21835: Fix display of request ID
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2018-11-14 17:06:43 UTC
Size:
1.91 KB
patch
obsolete
>From 40464f59fd64d10f3135e1e8ffef0cf10f1ebe82 Mon Sep 17 00:00:00 2001 >From: Andrew Isherwood <andrew.isherwood@ptfs-europe.com> >Date: Wed, 14 Nov 2018 16:08:32 +0000 >Subject: [PATCH] Bug 21835: Fix display of request ID > >We now populate the id_prefix property in the API response. It turns out >that explicitly casting to a string wasn't necessary as JS does "the >right thing" when concatenating a string and an integer > >Test plan: > >- Before applying the patch view the ILL requests table >- TEST: Observe that the Request number column displays as NaN >- Apply the patch >- Refresh the page >- TEST: Observe that the request number now displays correctly >- Add the following block to your koha-conf.xml: > ><branch> > <code>**The code of a branch that has an ILL request attached to > it**</code> > <prefix>YAY</prefix> ></branch> > >- Refresh the page >- TEST: Observe the request made on the branch that you specified in the >config are now prefixed with "YAY-" > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > Koha/Illrequest.pm | 1 - > Koha/REST/V1/Illrequests.pm | 1 + > 2 files changed, 1 insertion(+), 1 deletion(-) > >diff --git a/Koha/Illrequest.pm b/Koha/Illrequest.pm >index 0b4d71c..0fa4e49 100644 >--- a/Koha/Illrequest.pm >+++ b/Koha/Illrequest.pm >@@ -1018,7 +1018,6 @@ sub TO_JSON { > my ( $self, $embed ) = @_; > > my $object = $self->SUPER::TO_JSON(); >- $object->{id_prefix} = $self->id_prefix; > > return $object; > } >diff --git a/Koha/REST/V1/Illrequests.pm b/Koha/REST/V1/Illrequests.pm >index 0b4c8f0..a3a0d61 100644 >--- a/Koha/REST/V1/Illrequests.pm >+++ b/Koha/REST/V1/Illrequests.pm >@@ -107,6 +107,7 @@ sub list { > my @output = (); > foreach my $req(@requests) { > my $to_push = $req->unblessed; >+ $to_push->{id_prefix} = $req->id_prefix; > foreach my $p(@{$patron_arr}) { > if ($p->{borrowernumber} == $req->borrowernumber) { > $to_push->{patron} = { >-- >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 21835
:
82342
|
82343
|
82381
|
82405