[Koha-bugs] [Bug 24043] ILL module can't show requests from more than one backend
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Thu Nov 14 13:47:24 CET 2019
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24043
--- Comment #2 from Magnus Enger <magnus at libriotech.no> ---
Played around a bit with the JS debugger, and it looks like my hunch was right.
"meta" is a variable with this (very simplified) structure:
meta
col
row
settings
oInit
originalData
0
capabilities
NEW
REQ
status
1
capabilities
NEW
REQ
status
So when we do this:
var status_name = meta.settings.oInit.originalData[0].capabilities[
row.status
].name;
we are trying to use the "capabilities" (a hash with status codes as keys and
status names as values) of the first request returned ([0]) to translate the
status codes of *all* requests into their status names. But requests from
different backends can have completely different statuses, so this fails when
there are requests from more than one backend.
It looks like the solution is to use meta.settings.oInit.originalData[
meta.row ].capabilities to look up the correct capabilities for the current
request being handled. Patch coming in a sec or two!
--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
More information about the Koha-bugs
mailing list