[Bug 21835] New: Request ID is displayed as NaN
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21835 Bug ID: 21835 Summary: Request ID is displayed as NaN Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: ILL Assignee: koha-bugs@lists.koha-community.org Reporter: andrew.isherwood@ptfs-europe.com In the main ILL requests table, the request ID is displayed as NaN. There are two problems here. Firstly, we're not populating id_prefix in the API response, it got missing in the deprecation of TO_JSON in bug 20996. As such, by the time we get to the JS that populates the ILL table, there is no id_prefix property in the row object, so concatenating undefined with an integer returns NaN. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21835 Andrew Isherwood <andrew.isherwood@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|koha-bugs@lists.koha-commun |andrew.isherwood@ptfs-europ |ity.org |e.com -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21835 Andrew Isherwood <andrew.isherwood@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |normal -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21835 Andrew Isherwood <andrew.isherwood@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |magnus@libriotech.no -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21835 Andrew Isherwood <andrew.isherwood@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21835 --- Comment #1 from Andrew Isherwood <andrew.isherwood@ptfs-europe.com> --- Created attachment 82342 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82342&action=edit 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-" -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21835 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21835 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #82342|0 |1 is obsolete| | --- Comment #2 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 82343 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82343&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21835 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21835 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #82343|0 |1 is obsolete| | --- Comment #3 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 82381 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82381&action=edit 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> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21835 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact| |m.de.rooy@rijksmuseum.nl CC| |m.de.rooy@rijksmuseum.nl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21835 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com Status|Passed QA |Pushed to Master --- Comment #4 from Nick Clemens <nick@bywatersolutions.com> --- Awesome work all! Pushed to master for 18.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21835 --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 82405 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82405&action=edit Bug 21835: (QA follow-up) Fix failing test The illrequest api response should always be augmented with an id_prefix field which is not part of the core illrequest object -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21835 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |20996 CC| |martin.renvoize@ptfs-europe | |.com Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20996 [Bug 20996] Fix API response time on ILL request endpoint -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21835 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |20640 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20640 [Bug 20640] Allow migrating a request between backends -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21835 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Resolution|--- |FIXED --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Not required for 18.05.x series. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org