Bug 27170 - ILL availability should be able to display arbitrary links to related resources
Summary: ILL availability should be able to display arbitrary links to related resources
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: ILL (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Andrew Isherwood
QA Contact:
URL:
Keywords: release-notes-needed
Depends on:
Blocks:
 
Reported: 2020-12-08 12:21 UTC by Andrew Isherwood
Modified: 2021-11-22 22:35 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Text to go in the release notes:
Version(s) released in:
21.11.00


Attachments
Bug 27170: Add support for new 'links' property (3.78 KB, patch)
2020-12-08 12:23 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 27170: Add support for new 'links' property (3.78 KB, patch)
2021-06-18 10:00 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 27170: Fix bug with undefined 'links' (1.55 KB, patch)
2021-06-18 10:00 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 27170: Add support for new 'links' property (3.78 KB, patch)
2021-06-18 10:10 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 27170: Fix bug with undefined 'links' (1.55 KB, patch)
2021-06-18 10:10 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 27170: Fix bug fix (1.53 KB, patch)
2021-06-18 10:10 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 27170: Add support for new 'links' property (3.83 KB, patch)
2021-06-18 16:22 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 27170: Fix bug with undefined 'links' (1.60 KB, patch)
2021-06-18 16:22 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 27170: Fix bug fix (1.57 KB, patch)
2021-06-18 16:22 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 27170: Add support for new 'links' property (3.87 KB, patch)
2021-07-07 08:32 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 27170: Fix bug with undefined 'links' (1.64 KB, patch)
2021-07-07 08:32 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 27170: Fix bug fix (1.62 KB, patch)
2021-07-07 08:32 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 27170: Add support for new 'links' property (3.87 KB, patch)
2021-07-30 18:18 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 27170: Fix bug with undefined 'links' (1.70 KB, patch)
2021-07-30 18:18 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 27170: Fix bug fix (1.67 KB, patch)
2021-07-30 18:18 UTC, Nick Clemens
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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 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 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 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 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 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 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 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 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!