Currently, ILL availability uses the API response from the plugin to form a link if an item response contains a 'url' property. This is quite limiting. The EDS API, for example, can return multiple potential links to a resource. I am updating the EDS availability plugin to allow it to return an arbitrary number of links to a resource in a new 'links' property. This bug will add support for that property and will form links as appropriate.
Created attachment 114256 [details] [review] Bug 27170: Add support for new 'links' property This commit adds support for the new 'links' property that will allow an availability plugin to return an array of links for a result. These links are parsed and appended to the title field of a results record.
Test plan: - Apply the bug - Enable ILL in Koha and install the FreeForm backend - Enable plugins - Install and configure the ILL EDS availability plugin version 1.0.7 (https://github.com/PTFS-Europe/koha-plugin-ill-avail-eds/tags/1.0.7) - Create an ILL request - TEST: On the availability screen, note that no links are displayed with the record title other than the link - Install and configure at least version 1.1.0 of the ILL EDS availability plugin (https://github.com/PTFS-Europe/koha-plugin-ill-avail-eds/releases/latest) - Create an ILL request - TEST: On the availability screen, note that links are now displayed with the record title other than the link
Test plan: - Apply the bug - Enable ILL in Koha and install the FreeForm backend - Enable plugins - Install and configure the ILL EDS availability plugin version 1.0.7 (https://github.com/PTFS-Europe/koha-plugin-ill-avail-eds/releases/tag/1.0.7) - Create an ILL request - TEST: On the availability screen, note that no links are displayed with the record title other than the link - Install and configure at least version 1.1.0 of the ILL EDS availability plugin (https://github.com/PTFS-Europe/koha-plugin-ill-avail-eds/releases/latest) - Create an ILL request - TEST: On the availability screen, note that links are now displayed with the record title other than the link
Fixed bug component selection, I had mis-selected "I18n/L10N"
Created attachment 122112 [details] [review] Bug 27170: Add support for new 'links' property This commit adds support for the new 'links' property that will allow an availability plugin to return an array of links for a result. These links are parsed and appended to the title field of a results record.
Created attachment 122113 [details] [review] Bug 27170: Fix bug with undefined 'links' If a row object doesn't have a 'links' property, calling 'length' on it will fail. This commit fixes this.
Created attachment 122114 [details] [review] Bug 27170: Add support for new 'links' property This commit adds support for the new 'links' property that will allow an availability plugin to return an array of links for a result. These links are parsed and appended to the title field of a results record.
Created attachment 122115 [details] [review] Bug 27170: Fix bug with undefined 'links' If a row object doesn't have a 'links' property, calling 'length' on it will fail. This commit fixes this.
Created attachment 122117 [details] [review] Bug 27170: Fix bug fix <sigh> This commit fixes the incorrect bug fix from the previous commit
Created attachment 122167 [details] [review] Bug 27170: Add support for new 'links' property This commit adds support for the new 'links' property that will allow an availability plugin to return an array of links for a result. These links are parsed and appended to the title field of a results record. Signed-off-by: Holly Cooper <hc@interleaf.ie>
Created attachment 122168 [details] [review] Bug 27170: Fix bug with undefined 'links' If a row object doesn't have a 'links' property, calling 'length' on it will fail. This commit fixes this. Signed-off-by: Holly Cooper <hc@interleaf.ie>
Created attachment 122169 [details] [review] Bug 27170: Fix bug fix <sigh> This commit fixes the incorrect bug fix from the previous commit Signed-off-by: Holly Cooper <hc@interleaf.ie>
Created attachment 122632 [details] [review] Bug 27170: Add support for new 'links' property This commit adds support for the new 'links' property that will allow an availability plugin to return an array of links for a result. These links are parsed and appended to the title field of a results record. Signed-off-by: Holly Cooper <hc@interleaf.ie> Signed-off-by: Barry Cannon <bc@interleaf.ie>
Created attachment 122633 [details] [review] Bug 27170: Fix bug with undefined 'links' If a row object doesn't have a 'links' property, calling 'length' on it will fail. This commit fixes this. Signed-off-by: Holly Cooper <hc@interleaf.ie> Signed-off-by: Barry Cannon <bc@interleaf.ie>
Created attachment 122634 [details] [review] Bug 27170: Fix bug fix <sigh> This commit fixes the incorrect bug fix from the previous commit Signed-off-by: Holly Cooper <hc@interleaf.ie> Signed-off-by: Barry Cannon <bc@interleaf.ie>
Additionally tested after an upgrade by Barry Cannon and a group of their customers.
Created attachment 123339 [details] [review] Bug 27170: Add support for new 'links' property This commit adds support for the new 'links' property that will allow an availability plugin to return an array of links for a result. These links are parsed and appended to the title field of a results record. Signed-off-by: Holly Cooper <hc@interleaf.ie> Signed-off-by: Barry Cannon <bc@interleaf.ie>
Created attachment 123340 [details] [review] Bug 27170: Fix bug with undefined 'links' If a row object doesn't have a 'links' property, calling 'length' on it will fail. This commit fixes this. Signed-off-by: Holly Cooper <hc@interleaf.ie> Signed-off-by: Barry Cannon <bc@interleaf.ie> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 123341 [details] [review] Bug 27170: Fix bug fix <sigh> This commit fixes the incorrect bug fix from the previous commit Signed-off-by: Holly Cooper <hc@interleaf.ie> Signed-off-by: Barry Cannon <bc@interleaf.ie> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Works well, returns EDS links when using the availability plugin Note: Enable ILLCheckAvailability to make this work :-)
Pushed to master for 21.11, thanks to everybody involved!