Bug 27170

Summary: ILL availability should be able to display arbitrary links to related resources
Product: Koha Reporter: Andrew Isherwood <bugzilla>
Component: ILLAssignee: Bugs List <koha-bugs>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P5 - low CC: f.demians, janet.mcgowan, kyle, martin.renvoize, Niamh.WalkerHeadon, nick
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.11.00
Circulation function:
Attachments: Bug 27170: Add support for new 'links' property
Bug 27170: Add support for new 'links' property
Bug 27170: Fix bug with undefined 'links'
Bug 27170: Add support for new 'links' property
Bug 27170: Fix bug with undefined 'links'
Bug 27170: Fix bug fix
Bug 27170: Add support for new 'links' property
Bug 27170: Fix bug with undefined 'links'
Bug 27170: Fix bug fix
Bug 27170: Add support for new 'links' property
Bug 27170: Fix bug with undefined 'links'
Bug 27170: Fix bug fix
Bug 27170: Add support for new 'links' property
Bug 27170: Fix bug with undefined 'links'
Bug 27170: Fix bug fix

Description Andrew Isherwood 2020-12-08 12:21:13 UTC
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.
Comment 1 Andrew Isherwood 2020-12-08 12:23:28 UTC
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.
Comment 2 Andrew Isherwood 2020-12-08 12:54:47 UTC
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
Comment 3 Andrew Isherwood 2020-12-08 12:56:04 UTC
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
Comment 4 Andrew Isherwood 2020-12-08 15:00:37 UTC
Fixed bug component selection, I had mis-selected "I18n/L10N"
Comment 5 Andrew Isherwood 2021-06-18 10:00:14 UTC
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.
Comment 6 Andrew Isherwood 2021-06-18 10:00:17 UTC
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.
Comment 7 Andrew Isherwood 2021-06-18 10:10:44 UTC
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.
Comment 8 Andrew Isherwood 2021-06-18 10:10:49 UTC
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.
Comment 9 Andrew Isherwood 2021-06-18 10:10:53 UTC
Created attachment 122117 [details] [review]
Bug 27170: Fix bug fix

<sigh> This commit fixes the incorrect bug fix from the previous commit
Comment 10 Andrew Isherwood 2021-06-18 16:22:27 UTC
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>
Comment 11 Andrew Isherwood 2021-06-18 16:22:30 UTC
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>
Comment 12 Andrew Isherwood 2021-06-18 16:22:35 UTC
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>
Comment 13 Martin Renvoize (ashimema) 2021-07-07 08:32:51 UTC
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>
Comment 14 Martin Renvoize (ashimema) 2021-07-07 08:32:55 UTC
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>
Comment 15 Martin Renvoize (ashimema) 2021-07-07 08:32:59 UTC
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>
Comment 16 Martin Renvoize (ashimema) 2021-07-07 08:33:35 UTC
Additionally tested after an upgrade by Barry Cannon and a group of their customers.
Comment 17 Nick Clemens (kidclamp) 2021-07-30 18:18:50 UTC
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>
Comment 18 Nick Clemens (kidclamp) 2021-07-30 18:18:53 UTC
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>
Comment 19 Nick Clemens (kidclamp) 2021-07-30 18:18:57 UTC
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>
Comment 20 Nick Clemens (kidclamp) 2021-07-30 18:20:06 UTC
Works well, returns EDS links when using the availability plugin

Note: Enable  ILLCheckAvailability to make this work :-)
Comment 21 Jonathan Druart 2021-09-21 18:18:40 UTC
Pushed to master for 21.11, thanks to everybody involved!