Bugzilla – Attachment 104020 Details for
Bug 24043
ILL module can't show requests from more than one backend
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24043: Fix retrieval of of status name
Bug-24043-Fix-retrieval-of-of-status-name.patch (text/plain), 2.40 KB, created by
Josef Moravec
on 2020-04-30 11:33:54 UTC
(
hide
)
Description:
Bug 24043: Fix retrieval of of status name
Filename:
MIME Type:
Creator:
Josef Moravec
Created:
2020-04-30 11:33:54 UTC
Size:
2.40 KB
patch
obsolete
>From 7a9eab7f9a9f0ab46d57ca99656e3b59fee43a2e Mon Sep 17 00:00:00 2001 >From: Andrew Isherwood <andrew.isherwood@ptfs-europe.com> >Date: Mon, 13 Jan 2020 10:18:19 +0000 >Subject: [PATCH] Bug 24043: Fix retrieval of of status name > >This patch modifies the way in which a request's status name is >retrieved. I think the previous way it was done (which can never have >worked properly) must have come from a time when we weren't embedding >the request's backend capabilities in each request. So now we can just use >the current row. > >Test plan: > >1. *Before applying the patch*: >2. Ensure you have at least two requests, from two different backends. >One of the backends you are using must have a possible status that >doesn't exist in the other. For example, the BLDSS backend has a status >of STAT, that doesn't not exist in any other backends. >3. Ensure that the request who's backend has the unique status is *not* >the first request in the returned list. >4. Load the "View ILL requests" page >5. Observe that the page JS fails with a "Cannot read property 'name' of >undefined" error >6. Apply the patch >7. Reload the page (maybe doing a hard reload to ensure the JS is not >cached) >8. TEST: Observe that the error no longer occurs and the requests all >have their statuses displayed correctly. > >Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> >--- > koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js | 11 ++--------- > 1 file changed, 2 insertions(+), 9 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js b/koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js >index 877d5f1220..a6ec83c02b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js >@@ -220,15 +220,8 @@ $(document).ready(function() { > ? row.status_alias.lib > : row.status_alias.authorised_value; > } else { >- var origData = meta.settings.oInit.originalData; >- if (origData.length > 0) { >- var status_name = meta.settings.oInit.originalData[0].capabilities[ >- row.status >- ].name; >- return getStatusName(status_name, row); >- } else { >- return ''; >- } >+ var status_name = row.capabilities[row.status].name; >+ return getStatusName(status_name, row); > } > }; > >-- >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 24043
:
97297
|
104017
| 104020 |
104021
|
104022