Bug 35604 - ILL - Allow for automatic backend selection
Summary: ILL - Allow for automatic backend selection
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: ILL (show other bugs)
Version: Main
Hardware: All All
: P5 - low new feature
Assignee: Pedro Amorim
QA Contact: Tomás Cohen Arazi (tcohen)
URL: https://github.com/PTFS-Europe/koha/t...
Keywords: roadmap_24_05, roadmap_24_11
Depends on: 36221 36521 36662
Blocks: 36197 38669 38685 38761
  Show dependency treegraph
 
Reported: 2023-12-19 16:23 UTC by Pedro Amorim
Modified: 2025-05-16 15:52 UTC (History)
10 users (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: Medium patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
With this new feature enabled, users no longer need to select a backend when submitting an ILL request. Instead, the Standard form is always displayed, and Koha automatically determines the best backend to use based on availability and priority settings. For staff, a "Confirm request" screen is displayed to verify the suggested backend. Compatible backends must implement the provides_backend_availability_check capability and implement the availability_check_info method.
Version(s) released in:
25.05.00
Circulation function:


Attachments
ILL 2.0 flow (232.24 KB, image/jpeg)
2023-12-19 16:23 UTC, Pedro Amorim
Details
Bug 35604: New Backends.pm class. installed_backends method (2.02 KB, patch)
2024-04-15 14:11 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: New 'ill-backends' syspref type (6.45 KB, patch)
2024-04-15 14:11 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: New AutoILLBackendPriority sys prefs (3.40 KB, patch)
2024-04-15 14:11 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: ILL request creation with AutoILLBackendPriority enabled (4.56 KB, patch)
2024-04-15 14:11 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: ConfirmAuto workflow stage (28.81 KB, patch)
2024-04-15 14:11 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: Add tests (5.76 KB, patch)
2024-04-15 14:12 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: Update 'Make an ILL request' link in OPAC search results page (1.59 KB, patch)
2024-04-18 15:14 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: Add tests (9.13 KB, patch)
2024-04-19 10:44 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: Add tests (9.12 KB, patch)
2024-04-19 10:45 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: New Backends.pm class. installed_backends method (2.02 KB, patch)
2024-04-22 13:58 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: New 'ill-backends' syspref type (6.45 KB, patch)
2024-04-22 13:58 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: New AutoILLBackendPriority sys prefs (3.18 KB, patch)
2024-04-22 13:58 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: ILL request creation with AutoILLBackendPriority enabled (4.56 KB, patch)
2024-04-22 13:58 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: ConfirmAuto workflow stage (28.84 KB, patch)
2024-04-22 13:58 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: Add tests (9.23 KB, patch)
2024-04-22 13:58 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: Update 'Make an ILL request' link in OPAC search results page (1.59 KB, patch)
2024-04-22 13:58 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: New Backends.pm class. installed_backends method (2.02 KB, patch)
2024-05-17 12:55 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: New 'ill-backends' syspref type (6.45 KB, patch)
2024-05-17 12:55 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: New AutoILLBackendPriority sys prefs (3.17 KB, patch)
2024-05-17 12:55 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: ILL request creation with AutoILLBackendPriority enabled (4.56 KB, patch)
2024-05-17 12:55 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: ConfirmAuto workflow stage (28.83 KB, patch)
2024-05-17 12:55 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: Add tests (9.25 KB, patch)
2024-05-17 12:55 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: Update 'Make an ILL request' link in OPAC search results page (1.59 KB, patch)
2024-05-17 12:55 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: New Backends.pm class. installed_backends method (2.07 KB, patch)
2024-05-21 22:51 UTC, David Nind
Details | Diff | Splinter Review
Bug 35604: New 'ill-backends' syspref type (6.50 KB, patch)
2024-05-21 22:51 UTC, David Nind
Details | Diff | Splinter Review
Bug 35604: New AutoILLBackendPriority sys prefs (3.22 KB, patch)
2024-05-21 22:51 UTC, David Nind
Details | Diff | Splinter Review
Bug 35604: ILL request creation with AutoILLBackendPriority enabled (4.60 KB, patch)
2024-05-21 22:51 UTC, David Nind
Details | Diff | Splinter Review
Bug 35604: ConfirmAuto workflow stage (28.87 KB, patch)
2024-05-21 22:51 UTC, David Nind
Details | Diff | Splinter Review
Bug 35604: Add tests (9.29 KB, patch)
2024-05-21 22:51 UTC, David Nind
Details | Diff | Splinter Review
Bug 35604: Update 'Make an ILL request' link in OPAC search results page (1.64 KB, patch)
2024-05-21 22:51 UTC, David Nind
Details | Diff | Splinter Review
Bug 35604: New Backends.pm class. installed_backends method (2.07 KB, patch)
2024-09-11 13:52 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: New 'ill-backends' syspref type (6.50 KB, patch)
2024-09-11 13:52 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: New AutoILLBackendPriority sys prefs (3.22 KB, patch)
2024-09-11 13:52 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: ILL request creation with AutoILLBackendPriority enabled (4.59 KB, patch)
2024-09-11 13:52 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: ConfirmAuto workflow stage (28.88 KB, patch)
2024-09-11 13:52 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: Add tests (9.29 KB, patch)
2024-09-11 13:52 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: Update 'Make an ILL request' link in OPAC search results page (1.64 KB, patch)
2024-09-11 13:52 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: New Backends.pm class. installed_backends method (2.07 KB, patch)
2024-11-14 12:52 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: New 'ill-backends' syspref type (6.50 KB, patch)
2024-11-14 12:52 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: New AutoILLBackendPriority sys prefs (2.32 KB, patch)
2024-11-14 12:52 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: atomicupdate (1.23 KB, patch)
2024-11-14 12:52 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: ILL request creation with AutoILLBackendPriority enabled (4.59 KB, patch)
2024-11-14 12:53 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: ConfirmAuto workflow stage (28.87 KB, patch)
2024-11-14 12:53 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: Update 'Make an ILL request' link in OPAC search results page (1.64 KB, patch)
2024-11-14 12:53 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: Add tests (9.29 KB, patch)
2024-11-14 12:53 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: Add tests (9.36 KB, patch)
2024-11-14 13:01 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: Follow-up (2.61 KB, patch)
2024-11-19 15:07 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: New Backends.pm class. installed_backends method (2.07 KB, patch)
2024-12-20 12:11 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: New 'ill-backends' syspref type (6.51 KB, patch)
2024-12-20 12:11 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: New AutoILLBackendPriority sys prefs (2.33 KB, patch)
2024-12-20 12:11 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: atomicupdate (1.24 KB, patch)
2024-12-20 12:11 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: ILL request creation with AutoILLBackendPriority enabled (4.60 KB, patch)
2024-12-20 12:11 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: ConfirmAuto workflow stage (28.99 KB, patch)
2024-12-20 12:11 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: Update 'Make an ILL request' link in OPAC search results page (1.64 KB, patch)
2024-12-20 12:11 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: Add tests (9.36 KB, patch)
2024-12-20 12:11 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: Follow-up (2.61 KB, patch)
2024-12-20 12:11 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: (QA follow-up): Cosmetic improvements (6.12 KB, patch)
2024-12-31 15:26 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: New Backends.pm class. installed_backends method (2.21 KB, patch)
2025-01-08 17:06 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 35604: New 'ill-backends' syspref type (6.64 KB, patch)
2025-01-08 17:06 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 35604: New AutoILLBackendPriority sys prefs (2.52 KB, patch)
2025-01-08 17:06 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 35604: atomicupdate (1.42 KB, patch)
2025-01-08 17:06 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 35604: ILL request creation with AutoILLBackendPriority enabled (4.74 KB, patch)
2025-01-08 17:06 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 35604: ConfirmAuto workflow stage (33.68 KB, patch)
2025-01-08 17:06 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 35604: Update 'Make an ILL request' link in OPAC search results page (1.78 KB, patch)
2025-01-08 17:07 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 35604: Add tests (9.52 KB, patch)
2025-01-08 17:07 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 35604: Follow-up (2.80 KB, patch)
2025-01-08 17:07 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 35604: (QA follow-up): Cosmetic improvements (6.31 KB, patch)
2025-01-08 17:07 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 35604: (QA follow-up): Fix find-missing-op-in-forms.t (2.66 KB, patch)
2025-01-15 13:41 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: (QA follow-up): Prevent more than one 'op' in form (1.45 KB, patch)
2025-01-16 13:54 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: New Backends.pm class. installed_backends method (2.19 KB, patch)
2025-01-16 15:57 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: New 'ill-backends' syspref type (6.62 KB, patch)
2025-01-16 15:57 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: New AutoILLBackendPriority sys prefs (2.50 KB, patch)
2025-01-16 15:57 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: atomicupdate (1.40 KB, patch)
2025-01-16 15:58 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: ILL request creation with AutoILLBackendPriority enabled (4.71 KB, patch)
2025-01-16 15:58 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: ConfirmAuto workflow stage (33.66 KB, patch)
2025-01-16 15:58 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: Update 'Make an ILL request' link in OPAC search results page (1.76 KB, patch)
2025-01-16 15:58 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: Add tests (9.50 KB, patch)
2025-01-16 15:58 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: Follow-up (2.78 KB, patch)
2025-01-16 15:58 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: (QA follow-up): Cosmetic improvements (6.29 KB, patch)
2025-01-16 15:58 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: (QA follow-up): Fix find-missing-op-in-forms.t (2.69 KB, patch)
2025-01-16 15:58 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: (QA follow-up): Prevent more than one 'op' in form (1.46 KB, patch)
2025-01-16 15:58 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: New Backends.pm class. installed_backends method (2.19 KB, patch)
2025-02-19 09:25 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: New 'ill-backends' syspref type (6.81 KB, patch)
2025-02-19 09:25 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: New AutoILLBackendPriority sys prefs (3.06 KB, patch)
2025-02-19 09:25 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: atomicupdate (1.40 KB, patch)
2025-02-19 09:25 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: ILL request creation with AutoILLBackendPriority enabled (4.96 KB, patch)
2025-02-19 09:25 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: ConfirmAuto workflow stage (29.35 KB, patch)
2025-02-19 09:25 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: Update 'Make an ILL request' link in OPAC search results page (1.76 KB, patch)
2025-02-19 09:25 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: Add tests (9.50 KB, patch)
2025-02-19 09:25 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: Follow-up (2.72 KB, patch)
2025-02-19 09:25 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: (QA follow-up): Cosmetic improvements (6.51 KB, patch)
2025-02-19 09:25 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: (QA follow-up): Fix find-missing-op-in-forms.t (2.69 KB, patch)
2025-02-19 09:25 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: (QA follow-up): Prevent more than one 'op' in form (1.43 KB, patch)
2025-02-19 09:26 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: New Backends.pm class. installed_backends method (2.19 KB, patch)
2025-02-26 09:57 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: New 'ill-backends' syspref type (6.62 KB, patch)
2025-02-26 09:57 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: New AutoILLBackendPriority sys prefs (3.06 KB, patch)
2025-02-26 09:57 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: atomicupdate (1.40 KB, patch)
2025-02-26 09:57 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: ILL request creation with AutoILLBackendPriority enabled (4.96 KB, patch)
2025-02-26 09:57 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: ConfirmAuto workflow stage (29.35 KB, patch)
2025-02-26 09:57 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: Update 'Make an ILL request' link in OPAC search results page (1.76 KB, patch)
2025-02-26 09:57 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: Add tests (9.50 KB, patch)
2025-02-26 09:57 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: Follow-up (2.72 KB, patch)
2025-02-26 09:57 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: (QA follow-up): Cosmetic improvements (6.51 KB, patch)
2025-02-26 09:57 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: (QA follow-up): Fix find-missing-op-in-forms.t (2.69 KB, patch)
2025-02-26 09:57 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: (QA follow-up): Prevent more than one 'op' in form (1.43 KB, patch)
2025-02-26 09:57 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: Multiple QA followups (7.63 KB, patch)
2025-03-25 17:12 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: Multiple QA followups (7.63 KB, patch)
2025-03-25 17:12 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: (QA follow-up): Remove occurrences of 'auto' and 'automatic' (4.47 KB, patch)
2025-03-26 10:16 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: Multiple QA followups (11.80 KB, patch)
2025-03-26 10:22 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: (QA follow-up): Remove remaining 'automatic' occurrences (2.69 KB, patch)
2025-04-02 13:03 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35604: New Backends.pm class. installed_backends method (2.24 KB, patch)
2025-04-03 09:08 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 35604: New 'ill-backends' syspref type (6.68 KB, patch)
2025-04-03 09:08 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 35604: New AutoILLBackendPriority sys prefs (3.11 KB, patch)
2025-04-03 09:08 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 35604: atomicupdate (1.46 KB, patch)
2025-04-03 09:08 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 35604: ILL request creation with AutoILLBackendPriority enabled (5.01 KB, patch)
2025-04-03 09:08 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 35604: ConfirmAuto workflow stage (29.40 KB, patch)
2025-04-03 09:08 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 35604: Update 'Make an ILL request' link in OPAC search results page (1.81 KB, patch)
2025-04-03 09:08 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 35604: Add tests (9.55 KB, patch)
2025-04-03 09:08 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 35604: Display success message (2.79 KB, patch)
2025-04-03 09:08 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 35604: (QA follow-up): Cosmetic improvements (6.56 KB, patch)
2025-04-03 09:08 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 35604: (QA follow-up): Fix find-missing-op-in-forms.t (2.75 KB, patch)
2025-04-03 09:08 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 35604: (QA follow-up): Prevent more than one 'op' in form (1.48 KB, patch)
2025-04-03 09:08 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 35604: Multiple QA followups (11.85 KB, patch)
2025-04-03 09:08 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 35604: (QA follow-up): Remove remaining 'automatic' occurrences (2.75 KB, patch)
2025-04-03 09:09 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 35604: Move available_backends() to Koha::ILL::Request::Config (9.79 KB, patch)
2025-04-03 09:09 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 35604: (QA follow-up): Update UI message if feature cannot be utilized (1.23 KB, patch)
2025-04-15 10:02 UTC, Pedro Amorim
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Pedro Amorim 2023-12-19 16:23:23 UTC
Created attachment 160035 [details]
ILL 2.0 flow

Currently WIP but open to feedback from those interested/available:
https://github.com/PTFS-Europe/koha/commits/ill_2.0/

This work depends on bug 35570 (native Standard ILL backend) and is currently being tested with an ILL backend plugin:
https://github.com/PTFS-Europe/koha-ill-reprintsdesk/tree/pluginify

Even if no one is able to test this at this point, the provided diagram should represent roughly the final intended result, feedback from that alone would be greatly appreciated!
Comment 1 Pedro Amorim 2024-04-15 14:11:49 UTC Comment hidden (obsolete)
Comment 2 Pedro Amorim 2024-04-15 14:11:51 UTC Comment hidden (obsolete)
Comment 3 Pedro Amorim 2024-04-15 14:11:54 UTC Comment hidden (obsolete)
Comment 4 Pedro Amorim 2024-04-15 14:11:57 UTC Comment hidden (obsolete)
Comment 5 Pedro Amorim 2024-04-15 14:11:59 UTC Comment hidden (obsolete)
Comment 6 Pedro Amorim 2024-04-15 14:12:02 UTC Comment hidden (obsolete)
Comment 7 Pedro Amorim 2024-04-18 15:14:57 UTC Comment hidden (obsolete)
Comment 8 Pedro Amorim 2024-04-19 10:44:51 UTC Comment hidden (obsolete)
Comment 9 Pedro Amorim 2024-04-19 10:45:23 UTC Comment hidden (obsolete)
Comment 10 Pedro Amorim 2024-04-19 10:46:24 UTC Comment hidden (obsolete)
Comment 11 Pedro Amorim 2024-04-22 13:58:15 UTC Comment hidden (obsolete)
Comment 12 Pedro Amorim 2024-04-22 13:58:18 UTC Comment hidden (obsolete)
Comment 13 Pedro Amorim 2024-04-22 13:58:21 UTC Comment hidden (obsolete)
Comment 14 Pedro Amorim 2024-04-22 13:58:25 UTC Comment hidden (obsolete)
Comment 15 Pedro Amorim 2024-04-22 13:58:29 UTC Comment hidden (obsolete)
Comment 16 Pedro Amorim 2024-04-22 13:58:36 UTC Comment hidden (obsolete)
Comment 17 Pedro Amorim 2024-04-22 13:58:39 UTC Comment hidden (obsolete)
Comment 18 Pedro Amorim 2024-04-22 13:59:06 UTC
Rebase needed after bug 35151 and bug 35568 pushed to main
Comment 19 Pedro Amorim 2024-05-17 12:55:13 UTC
Created attachment 166897 [details] [review]
Bug 35604: New Backends.pm class. installed_backends method
Comment 20 Pedro Amorim 2024-05-17 12:55:16 UTC
Created attachment 166898 [details] [review]
Bug 35604: New 'ill-backends' syspref type

UI rendering of sortable ILL backends
Comment 21 Pedro Amorim 2024-05-17 12:55:19 UTC
Created attachment 166899 [details] [review]
Bug 35604: New AutoILLBackendPriority sys prefs
Comment 22 Pedro Amorim 2024-05-17 12:55:22 UTC
Created attachment 166900 [details] [review]
Bug 35604: ILL request creation with AutoILLBackendPriority enabled
Comment 23 Pedro Amorim 2024-05-17 12:55:25 UTC
Created attachment 166901 [details] [review]
Bug 35604: ConfirmAuto workflow stage
Comment 24 Pedro Amorim 2024-05-17 12:55:28 UTC
Created attachment 166902 [details] [review]
Bug 35604: Add tests

Test plan:
Apply patches

Staff:
1) Visit the ILL sysprefs page:
/cgi-bin/koha/admin/preferences.pl?tab=interlibrary_loans
2) Enable ILLModule
3) Check the new AutoILLBackendPriority syspref. Notice it shows "No available backends"
4) Install 2 backend plugins from here:
https://github.com/PTFS-Europe/koha-ill-backend-plugin/releases/tag/v2.0.5
https://github.com/PTFS-Europe/koha-ill-reprintsdesk/releases/tag/rc-v3.0.0
5) Repeat 1. Notice the backends now show.
6) Enable both for AutoILLBackendPriority by ticking each respective checkbox. Save.
7) Visit ILL requests:
http://localhost:8081/cgi-bin/koha/ill/ill-requests.pl
8) Press "New auto ILL request"
9) You are presented the "Standard" create form. Pick type "journal" and put '123' on DOI. Enter '42' on cardnumber and pick a library. Click Create.
10) Notice you are now shown the "Confirm auto backend" stage screen.
11) PluginBackend has a 50% chance of being available or not for testing purposes. If it is, it'll suggest PluginBackend, if not, it'll default to Standard. ReprintsDesk will always error because it's missing credentials.
12) Pick any of the backends or accept the suggested one, click 'Create'. The request has been placed in that specific backend.

OPAC:
1) Following from the previous test plan, visit OPAC ill requests:
http://localhost:8080/cgi-bin/koha/opac-illrequests.pl
2) Click "Create a new auto request" and repeat the same inputs as before. Click 'Create'.
3) Notice you're directed to "Confirming your request" screen. It's doing the same as it does in the Staff UI, except it does not allow the patron to pick a different backend, it'll always selected the first available backend in the priority.
4) Create more requests, you'll notice some of them will land on PluginBackend, others will land on 'Standard' because PluginBackend will sometimes be available and others not.

Do more testing:
- Reorder the backends in the AutoILLBackendPriority syspref and save, notice they're shown and suggested accordingly after creating a request.
- Disable all backends from AutoILLBackendPriority. Notice the original behaviour of requiring the user to select a backend before creating the request is restored on both opac and staff.

Run unit tests:
prove t/db_dependent/Illrequest/ConfirmAuto.t
prove t/db_dependent/Koha/ILL/Backends.t
Comment 25 Pedro Amorim 2024-05-17 12:55:31 UTC
Created attachment 166903 [details] [review]
Bug 35604: Update 'Make an ILL request' link in OPAC search results page
Comment 26 Pedro Amorim 2024-05-17 12:56:32 UTC
Rebase needed after bug 34655 and bug 36503
Comment 27 David Nind 2024-05-20 04:57:09 UTC
Everything in the test plan works, except for one test. I don't know what this means.... (note: the two plugins from the test plan are still installed).

prove t/db_dependent/Koha/ILL/Backends.t
t/db_dependent/Koha/ILL/Backends.t .. 1/4 
    #   Failed test 'Only one backend installed, happens to be a plugin'
    #   at t/db_dependent/Koha/ILL/Backends.t line 59.
    #     Structures begin differing at:
    #          $got->[0] = 'PluginBackend'
    #     $expected->[0] = 'Test Plugin'

    #   Failed test 'Two backends are installed, one plugin and one directory backend'
    #   at t/db_dependent/Koha/ILL/Backends.t line 75.
    #     Structures begin differing at:
    #          $got->[1] = 'PluginBackend'
    #     $expected->[1] = 'Test Plugin'
    # Looks like you failed 2 tests of 2.

#   Failed test 'installed_backends() tests'
#   at t/db_dependent/Koha/ILL/Backends.t line 84.
# Looks like you failed 1 test of 4.
t/db_dependent/Koha/ILL/Backends.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/4 subtests 

Test Summary Report
-------------------
t/db_dependent/Koha/ILL/Backends.t (Wstat: 256 (exited 1) Tests: 4 Failed: 1)
  Failed test:  4
  Non-zero exit status: 1
Files=1, Tests=4,  1 wallclock secs ( 0.01 usr  0.01 sys +  1.12 cusr  0.19 csys =  1.33 CPU)
Result: FAIL
Comment 28 Pedro Amorim 2024-05-21 08:44:01 UTC
Thanks David.
I believe plugin tests should be run without having any plugin (at all) installed.
The unit test is expecting a particular result but because you have other plugins installed is returning something different.
Would you please test it again without any plugin installed?
Apologies, should've made this clear in the test plan!
Very much appreciated for your testing!!
Comment 29 David Nind 2024-05-21 22:51:27 UTC
Created attachment 166995 [details] [review]
Bug 35604: New Backends.pm class. installed_backends method

Signed-off-by: David Nind <david@davidnind.com>
Comment 30 David Nind 2024-05-21 22:51:30 UTC
Created attachment 166996 [details] [review]
Bug 35604: New 'ill-backends' syspref type

UI rendering of sortable ILL backends

Signed-off-by: David Nind <david@davidnind.com>
Comment 31 David Nind 2024-05-21 22:51:33 UTC
Created attachment 166997 [details] [review]
Bug 35604: New AutoILLBackendPriority sys prefs

Signed-off-by: David Nind <david@davidnind.com>
Comment 32 David Nind 2024-05-21 22:51:36 UTC
Created attachment 166998 [details] [review]
Bug 35604: ILL request creation with AutoILLBackendPriority enabled

Signed-off-by: David Nind <david@davidnind.com>
Comment 33 David Nind 2024-05-21 22:51:39 UTC
Created attachment 166999 [details] [review]
Bug 35604: ConfirmAuto workflow stage

Signed-off-by: David Nind <david@davidnind.com>
Comment 34 David Nind 2024-05-21 22:51:42 UTC
Created attachment 167000 [details] [review]
Bug 35604: Add tests

Test plan:
Apply patches

Staff:
1) Visit the ILL sysprefs page:
/cgi-bin/koha/admin/preferences.pl?tab=interlibrary_loans
2) Enable ILLModule
3) Check the new AutoILLBackendPriority syspref. Notice it shows "No available backends"
4) Install 2 backend plugins from here:
https://github.com/PTFS-Europe/koha-ill-backend-plugin/releases/tag/v2.0.5
https://github.com/PTFS-Europe/koha-ill-reprintsdesk/releases/tag/rc-v3.0.0
5) Repeat 1. Notice the backends now show.
6) Enable both for AutoILLBackendPriority by ticking each respective checkbox. Save.
7) Visit ILL requests:
http://localhost:8081/cgi-bin/koha/ill/ill-requests.pl
8) Press "New auto ILL request"
9) You are presented the "Standard" create form. Pick type "journal" and put '123' on DOI. Enter '42' on cardnumber and pick a library. Click Create.
10) Notice you are now shown the "Confirm auto backend" stage screen.
11) PluginBackend has a 50% chance of being available or not for testing purposes. If it is, it'll suggest PluginBackend, if not, it'll default to Standard. ReprintsDesk will always error because it's missing credentials.
12) Pick any of the backends or accept the suggested one, click 'Create'. The request has been placed in that specific backend.

OPAC:
1) Following from the previous test plan, visit OPAC ill requests:
http://localhost:8080/cgi-bin/koha/opac-illrequests.pl
2) Click "Create a new auto request" and repeat the same inputs as before. Click 'Create'.
3) Notice you're directed to "Confirming your request" screen. It's doing the same as it does in the Staff UI, except it does not allow the patron to pick a different backend, it'll always selected the first available backend in the priority.
4) Create more requests, you'll notice some of them will land on PluginBackend, others will land on 'Standard' because PluginBackend will sometimes be available and others not.

Do more testing:
- Reorder the backends in the AutoILLBackendPriority syspref and save, notice they're shown and suggested accordingly after creating a request.
- Disable all backends from AutoILLBackendPriority. Notice the original behaviour of requiring the user to select a backend before creating the request is restored on both opac and staff.

Run unit tests:
prove t/db_dependent/Illrequest/ConfirmAuto.t
prove t/db_dependent/Koha/ILL/Backends.t

Signed-off-by: David Nind <david@davidnind.com>
Comment 35 David Nind 2024-05-21 22:51:45 UTC
Created attachment 167001 [details] [review]
Bug 35604: Update 'Make an ILL request' link in OPAC search results page

Signed-off-by: David Nind <david@davidnind.com>
Comment 36 David Nind 2024-05-21 22:54:08 UTC
(In reply to Pedro Amorim from comment #28)
> Thanks David.
> I believe plugin tests should be run without having any plugin (at all)
> installed.
> The unit test is expecting a particular result but because you have other
> plugins installed is returning something different.
> Would you please test it again without any plugin installed?
> Apologies, should've made this clear in the test plan!
> Very much appreciated for your testing!!

Retested without plugins, and test pass.

Now signed off.

Thanks!

David
Comment 37 Pedro Amorim 2024-09-11 13:52:18 UTC Comment hidden (obsolete)
Comment 38 Pedro Amorim 2024-09-11 13:52:21 UTC Comment hidden (obsolete)
Comment 39 Pedro Amorim 2024-09-11 13:52:24 UTC Comment hidden (obsolete)
Comment 40 Pedro Amorim 2024-09-11 13:52:27 UTC Comment hidden (obsolete)
Comment 41 Pedro Amorim 2024-09-11 13:52:30 UTC Comment hidden (obsolete)
Comment 42 Pedro Amorim 2024-09-11 13:52:33 UTC Comment hidden (obsolete)
Comment 43 Pedro Amorim 2024-09-11 13:52:36 UTC Comment hidden (obsolete)
Comment 44 Pedro Amorim 2024-11-14 12:52:46 UTC Comment hidden (obsolete)
Comment 45 Pedro Amorim 2024-11-14 12:52:49 UTC Comment hidden (obsolete)
Comment 46 Pedro Amorim 2024-11-14 12:52:53 UTC Comment hidden (obsolete)
Comment 47 Pedro Amorim 2024-11-14 12:52:57 UTC Comment hidden (obsolete)
Comment 48 Pedro Amorim 2024-11-14 12:53:00 UTC Comment hidden (obsolete)
Comment 49 Pedro Amorim 2024-11-14 12:53:05 UTC Comment hidden (obsolete)
Comment 50 Pedro Amorim 2024-11-14 12:53:08 UTC Comment hidden (obsolete)
Comment 51 Pedro Amorim 2024-11-14 12:53:12 UTC Comment hidden (obsolete)
Comment 52 Pedro Amorim 2024-11-14 13:01:07 UTC Comment hidden (obsolete)
Comment 53 Pedro Amorim 2024-11-19 15:07:34 UTC Comment hidden (obsolete)
Comment 54 David Nind 2024-12-14 17:41:52 UTC
Testing notes (using KTD):

1. Note that the ConfirmAuto tests are now in a different location: prove t/db_dependent/Koha/ILL/Request/Workflow/ConfirmAuto.t
Comment 55 Pedro Amorim 2024-12-20 12:11:10 UTC
Created attachment 175828 [details] [review]
Bug 35604: New Backends.pm class. installed_backends method

Signed-off-by: David Nind <david@davidnind.com>
Comment 56 Pedro Amorim 2024-12-20 12:11:14 UTC
Created attachment 175829 [details] [review]
Bug 35604: New 'ill-backends' syspref type

UI rendering of sortable ILL backends

Signed-off-by: David Nind <david@davidnind.com>
Comment 57 Pedro Amorim 2024-12-20 12:11:18 UTC
Created attachment 175830 [details] [review]
Bug 35604: New AutoILLBackendPriority sys prefs

Signed-off-by: David Nind <david@davidnind.com>
Comment 58 Pedro Amorim 2024-12-20 12:11:21 UTC
Created attachment 175831 [details] [review]
Bug 35604: atomicupdate
Comment 59 Pedro Amorim 2024-12-20 12:11:24 UTC
Created attachment 175832 [details] [review]
Bug 35604: ILL request creation with AutoILLBackendPriority enabled

Signed-off-by: David Nind <david@davidnind.com>
Comment 60 Pedro Amorim 2024-12-20 12:11:28 UTC
Created attachment 175833 [details] [review]
Bug 35604: ConfirmAuto workflow stage

Signed-off-by: David Nind <david@davidnind.com>
Comment 61 Pedro Amorim 2024-12-20 12:11:31 UTC
Created attachment 175834 [details] [review]
Bug 35604: Update 'Make an ILL request' link in OPAC search results page

Signed-off-by: David Nind <david@davidnind.com>
Comment 62 Pedro Amorim 2024-12-20 12:11:36 UTC
Created attachment 175835 [details] [review]
Bug 35604: Add tests

Test plan:
Apply patches

Staff:
1) Visit the ILL sysprefs page:
/cgi-bin/koha/admin/preferences.pl?tab=interlibrary_loans
2) Enable ILLModule
3) Check the new AutoILLBackendPriority syspref. Notice it shows "No available backends"
4) Install 2 backend plugins from here:
https://github.com/PTFS-Europe/koha-ill-backend-plugin/releases/tag/v2.0.5
https://github.com/PTFS-Europe/koha-ill-reprintsdesk/releases/tag/rc-v3.0.0
5) Repeat 1. Notice the backends now show.
6) Enable both for AutoILLBackendPriority by ticking each respective checkbox. Save.
7) Visit ILL requests:
http://localhost:8081/cgi-bin/koha/ill/ill-requests.pl
8) Press "New auto ILL request"
9) You are presented the "Standard" create form. Pick type "journal" and put '123' on DOI. Enter '42' on cardnumber and pick a library. Click Create.
10) Notice you are now shown the "Confirm auto backend" stage screen.
11) PluginBackend has a 50% chance of being available or not for testing purposes. If it is, it'll suggest PluginBackend, if not, it'll default to Standard. ReprintsDesk will always error because it's missing credentials.
12) Pick any of the backends or accept the suggested one, click 'Create'. The request has been placed in that specific backend.

OPAC:
1) Following from the previous test plan, visit OPAC ill requests:
http://localhost:8080/cgi-bin/koha/opac-illrequests.pl
2) Click "Create a new auto request" and repeat the same inputs as before. Click 'Create'.
3) Notice you're directed to "Confirming your request" screen. It's doing the same as it does in the Staff UI, except it does not allow the patron to pick a different backend, it'll always selected the first available backend in the priority.
4) Create more requests, you'll notice some of them will land on PluginBackend, others will land on 'Standard' because PluginBackend will sometimes be available and others not.

Do more testing:
- Reorder the backends in the AutoILLBackendPriority syspref and save, notice they're shown and suggested accordingly after creating a request.
- Disable all backends from AutoILLBackendPriority. Notice the original behaviour of requiring the user to select a backend before creating the request is restored on both opac and staff.

Run unit tests:
prove t/db_dependent/Illrequest/ConfirmAuto.t
prove t/db_dependent/Koha/ILL/Backends.t

Signed-off-by: David Nind <david@davidnind.com>
Comment 63 Pedro Amorim 2024-12-20 12:11:39 UTC
Created attachment 175836 [details] [review]
Bug 35604: Follow-up

Consider success message from backend and present it.
Add btn-primary class to auto ILL screen
Comment 64 Pedro Amorim 2024-12-31 15:26:40 UTC
Created attachment 176036 [details] [review]
Bug 35604: (QA follow-up): Cosmetic improvements

These are improvements to the confirm auto backend stage screen on the Staff UI.
Result of a chat with Tomas about this development.
Comment 65 Martin Renvoize (ashimema) 2025-01-08 17:06:41 UTC
Created attachment 176261 [details] [review]
Bug 35604: New Backends.pm class. installed_backends method

Sponsored-by: UKHSA - UK Health Security Agency
Sponsored-by: PTFS Europe Ltd
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 66 Martin Renvoize (ashimema) 2025-01-08 17:06:44 UTC
Created attachment 176262 [details] [review]
Bug 35604: New 'ill-backends' syspref type

UI rendering of sortable ILL backends

Sponsored-by: UKHSA - UK Health Security Agency
Sponsored-by: PTFS Europe Ltd
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 67 Martin Renvoize (ashimema) 2025-01-08 17:06:47 UTC
Created attachment 176263 [details] [review]
Bug 35604: New AutoILLBackendPriority sys prefs

Sponsored-by: UKHSA - UK Health Security Agency
Sponsored-by: PTFS Europe Ltd
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 68 Martin Renvoize (ashimema) 2025-01-08 17:06:50 UTC
Created attachment 176264 [details] [review]
Bug 35604: atomicupdate

Sponsored-by: UKHSA - UK Health Security Agency
Sponsored-by: PTFS Europe Ltd
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 69 Martin Renvoize (ashimema) 2025-01-08 17:06:54 UTC
Created attachment 176265 [details] [review]
Bug 35604: ILL request creation with AutoILLBackendPriority enabled

Sponsored-by: UKHSA - UK Health Security Agency
Sponsored-by: PTFS Europe Ltd
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 70 Martin Renvoize (ashimema) 2025-01-08 17:06:58 UTC
Created attachment 176266 [details] [review]
Bug 35604: ConfirmAuto workflow stage

Sponsored-by: UKHSA - UK Health Security Agency
Sponsored-by: PTFS Europe Ltd
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 71 Martin Renvoize (ashimema) 2025-01-08 17:07:02 UTC
Created attachment 176267 [details] [review]
Bug 35604: Update 'Make an ILL request' link in OPAC search results page

Sponsored-by: UKHSA - UK Health Security Agency
Sponsored-by: PTFS Europe Ltd
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 72 Martin Renvoize (ashimema) 2025-01-08 17:07:05 UTC
Created attachment 176268 [details] [review]
Bug 35604: Add tests

Test plan:
Apply patches

Staff:
1) Visit the ILL sysprefs page:
/cgi-bin/koha/admin/preferences.pl?tab=interlibrary_loans
2) Enable ILLModule
3) Check the new AutoILLBackendPriority syspref. Notice it shows "No available backends"
4) Install 2 backend plugins from here:
https://github.com/PTFS-Europe/koha-ill-backend-plugin/releases/tag/v2.0.5
https://github.com/PTFS-Europe/koha-ill-reprintsdesk/releases/tag/rc-v3.0.0
5) Repeat 1. Notice the backends now show.
6) Enable both for AutoILLBackendPriority by ticking each respective checkbox. Save.
7) Visit ILL requests:
http://localhost:8081/cgi-bin/koha/ill/ill-requests.pl
8) Press "New auto ILL request"
9) You are presented the "Standard" create form. Pick type "journal" and put '123' on DOI. Enter '42' on cardnumber and pick a library. Click Create.
10) Notice you are now shown the "Confirm auto backend" stage screen.
11) PluginBackend has a 50% chance of being available or not for testing purposes. If it is, it'll suggest PluginBackend, if not, it'll default to Standard. ReprintsDesk will always error because it's missing credentials.
12) Pick any of the backends or accept the suggested one, click 'Create'. The request has been placed in that specific backend.

OPAC:
1) Following from the previous test plan, visit OPAC ill requests:
http://localhost:8080/cgi-bin/koha/opac-illrequests.pl
2) Click "Create a new auto request" and repeat the same inputs as before. Click 'Create'.
3) Notice you're directed to "Confirming your request" screen. It's doing the same as it does in the Staff UI, except it does not allow the patron to pick a different backend, it'll always selected the first available backend in the priority.
4) Create more requests, you'll notice some of them will land on PluginBackend, others will land on 'Standard' because PluginBackend will sometimes be available and others not.

Do more testing:
- Reorder the backends in the AutoILLBackendPriority syspref and save, notice they're shown and suggested accordingly after creating a request.
- Disable all backends from AutoILLBackendPriority. Notice the original behaviour of requiring the user to select a backend before creating the request is restored on both opac and staff.

Run unit tests:
prove t/db_dependent/Illrequest/ConfirmAuto.t
prove t/db_dependent/Koha/ILL/Backends.t

Sponsored-by: UKHSA - UK Health Security Agency
Sponsored-by: PTFS Europe Ltd
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 73 Martin Renvoize (ashimema) 2025-01-08 17:07:08 UTC
Created attachment 176269 [details] [review]
Bug 35604: Follow-up

Consider success message from backend and present it.
Add btn-primary class to auto ILL screen

Sponsored-by: UKHSA - UK Health Security Agency
Sponsored-by: PTFS Europe Ltd
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 74 Martin Renvoize (ashimema) 2025-01-08 17:07:11 UTC
Created attachment 176270 [details] [review]
Bug 35604: (QA follow-up): Cosmetic improvements

These are improvements to the confirm auto backend stage screen on the Staff UI.
Result of a chat with Tomas about this development.

Sponsored-by: UKHSA - UK Health Security Agency
Sponsored-by: PTFS Europe Ltd
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 75 Pedro Amorim 2025-01-15 13:41:10 UTC
Created attachment 176572 [details] [review]
Bug 35604: (QA follow-up): Fix find-missing-op-in-forms.t

prove xt/find-missing-op-in-forms.t
Comment 76 Pedro Amorim 2025-01-16 13:54:48 UTC
Created attachment 176662 [details] [review]
Bug 35604: (QA follow-up): Prevent more than one 'op' in form

This may happen if for example getting to the automatic backend screen from the ILL availability screen.
'op' is already being added, skip it if already exists in ported metadata
Comment 77 Pedro Amorim 2025-01-16 15:57:52 UTC
Created attachment 176681 [details] [review]
Bug 35604: New Backends.pm class. installed_backends method

Sponsored-by: NHS England
Sponsored-by: PTFS Europe Ltd
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 78 Pedro Amorim 2025-01-16 15:57:56 UTC
Created attachment 176682 [details] [review]
Bug 35604: New 'ill-backends' syspref type

UI rendering of sortable ILL backends

Sponsored-by: NHS England
Sponsored-by: PTFS Europe Ltd
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 79 Pedro Amorim 2025-01-16 15:57:59 UTC
Created attachment 176683 [details] [review]
Bug 35604: New AutoILLBackendPriority sys prefs

Sponsored-by: NHS England
Sponsored-by: PTFS Europe Ltd
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 80 Pedro Amorim 2025-01-16 15:58:02 UTC
Created attachment 176684 [details] [review]
Bug 35604: atomicupdate

Sponsored-by: NHS England
Sponsored-by: PTFS Europe Ltd
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 81 Pedro Amorim 2025-01-16 15:58:05 UTC
Created attachment 176685 [details] [review]
Bug 35604: ILL request creation with AutoILLBackendPriority enabled

Sponsored-by: NHS England
Sponsored-by: PTFS Europe Ltd
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 82 Pedro Amorim 2025-01-16 15:58:09 UTC
Created attachment 176686 [details] [review]
Bug 35604: ConfirmAuto workflow stage

Sponsored-by: NHS England
Sponsored-by: PTFS Europe Ltd
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 83 Pedro Amorim 2025-01-16 15:58:12 UTC
Created attachment 176687 [details] [review]
Bug 35604: Update 'Make an ILL request' link in OPAC search results page

Sponsored-by: NHS England
Sponsored-by: PTFS Europe Ltd
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 84 Pedro Amorim 2025-01-16 15:58:16 UTC
Created attachment 176688 [details] [review]
Bug 35604: Add tests

Test plan:
Apply patches

Staff:
1) Visit the ILL sysprefs page:
/cgi-bin/koha/admin/preferences.pl?tab=interlibrary_loans
2) Enable ILLModule
3) Check the new AutoILLBackendPriority syspref. Notice it shows "No available backends"
4) Install 2 backend plugins from here:
https://github.com/PTFS-Europe/koha-ill-backend-plugin/releases/tag/v2.0.5
https://github.com/PTFS-Europe/koha-ill-reprintsdesk/releases/tag/rc-v3.0.0
5) Repeat 1. Notice the backends now show.
6) Enable both for AutoILLBackendPriority by ticking each respective checkbox. Save.
7) Visit ILL requests:
http://localhost:8081/cgi-bin/koha/ill/ill-requests.pl
8) Press "New auto ILL request"
9) You are presented the "Standard" create form. Pick type "journal" and put '123' on DOI. Enter '42' on cardnumber and pick a library. Click Create.
10) Notice you are now shown the "Confirm auto backend" stage screen.
11) PluginBackend has a 50% chance of being available or not for testing purposes. If it is, it'll suggest PluginBackend, if not, it'll default to Standard. ReprintsDesk will always error because it's missing credentials.
12) Pick any of the backends or accept the suggested one, click 'Create'. The request has been placed in that specific backend.

OPAC:
1) Following from the previous test plan, visit OPAC ill requests:
http://localhost:8080/cgi-bin/koha/opac-illrequests.pl
2) Click "Create a new auto request" and repeat the same inputs as before. Click 'Create'.
3) Notice you're directed to "Confirming your request" screen. It's doing the same as it does in the Staff UI, except it does not allow the patron to pick a different backend, it'll always selected the first available backend in the priority.
4) Create more requests, you'll notice some of them will land on PluginBackend, others will land on 'Standard' because PluginBackend will sometimes be available and others not.

Do more testing:
- Reorder the backends in the AutoILLBackendPriority syspref and save, notice they're shown and suggested accordingly after creating a request.
- Disable all backends from AutoILLBackendPriority. Notice the original behaviour of requiring the user to select a backend before creating the request is restored on both opac and staff.

Run unit tests:
prove t/db_dependent/Illrequest/ConfirmAuto.t
prove t/db_dependent/Koha/ILL/Backends.t

Sponsored-by: NHS England
Sponsored-by: PTFS Europe Ltd
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 85 Pedro Amorim 2025-01-16 15:58:20 UTC
Created attachment 176689 [details] [review]
Bug 35604: Follow-up

Consider success message from backend and present it.
Add btn-primary class to auto ILL screen

Sponsored-by: NHS England
Sponsored-by: PTFS Europe Ltd
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 86 Pedro Amorim 2025-01-16 15:58:23 UTC
Created attachment 176690 [details] [review]
Bug 35604: (QA follow-up): Cosmetic improvements

These are improvements to the confirm auto backend stage screen on the Staff UI.
Result of a chat with Tomas about this development.

Sponsored-by: NHS England
Sponsored-by: PTFS Europe Ltd
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 87 Pedro Amorim 2025-01-16 15:58:26 UTC
Created attachment 176691 [details] [review]
Bug 35604: (QA follow-up): Fix find-missing-op-in-forms.t

prove xt/find-missing-op-in-forms.t
Comment 88 Pedro Amorim 2025-01-16 15:58:29 UTC
Created attachment 176692 [details] [review]
Bug 35604: (QA follow-up): Prevent more than one 'op' in form

This may happen if for example getting to the automatic backend screen from the ILL availability screen.
'op' is already being added, skip it if already exists in ported metadata
Comment 89 Tomás Cohen Arazi (tcohen) 2025-02-11 20:03:45 UTC
I didn't manage to rebase it using the `auto_rebaser.pl` tool.
Comment 90 Pedro Amorim 2025-02-19 09:25:23 UTC
Created attachment 178305 [details] [review]
Bug 35604: New Backends.pm class. installed_backends method

Sponsored-by: NHS England
Sponsored-by: PTFS Europe Ltd
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 91 Pedro Amorim 2025-02-19 09:25:26 UTC
Created attachment 178306 [details] [review]
Bug 35604: New 'ill-backends' syspref type

UI rendering of sortable ILL backends

Sponsored-by: NHS England
Sponsored-by: PTFS Europe Ltd
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 92 Pedro Amorim 2025-02-19 09:25:29 UTC
Created attachment 178307 [details] [review]
Bug 35604: New AutoILLBackendPriority sys prefs

Sponsored-by: NHS England
Sponsored-by: PTFS Europe Ltd
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 93 Pedro Amorim 2025-02-19 09:25:32 UTC
Created attachment 178308 [details] [review]
Bug 35604: atomicupdate

Sponsored-by: NHS England
Sponsored-by: PTFS Europe Ltd
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 94 Pedro Amorim 2025-02-19 09:25:36 UTC
Created attachment 178309 [details] [review]
Bug 35604: ILL request creation with AutoILLBackendPriority enabled

Sponsored-by: NHS England
Sponsored-by: PTFS Europe Ltd
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 95 Pedro Amorim 2025-02-19 09:25:39 UTC
Created attachment 178310 [details] [review]
Bug 35604: ConfirmAuto workflow stage

Sponsored-by: NHS England
Sponsored-by: PTFS Europe Ltd
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 96 Pedro Amorim 2025-02-19 09:25:43 UTC
Created attachment 178311 [details] [review]
Bug 35604: Update 'Make an ILL request' link in OPAC search results page

Sponsored-by: NHS England
Sponsored-by: PTFS Europe Ltd
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 97 Pedro Amorim 2025-02-19 09:25:47 UTC
Created attachment 178312 [details] [review]
Bug 35604: Add tests

Test plan:
Apply patches

Staff:
1) Visit the ILL sysprefs page:
/cgi-bin/koha/admin/preferences.pl?tab=interlibrary_loans
2) Enable ILLModule
3) Check the new AutoILLBackendPriority syspref. Notice it shows "No available backends"
4) Install 2 backend plugins from here:
https://github.com/PTFS-Europe/koha-ill-backend-plugin/releases/tag/v2.0.5
https://github.com/PTFS-Europe/koha-ill-reprintsdesk/releases/tag/rc-v3.0.0
5) Repeat 1. Notice the backends now show.
6) Enable both for AutoILLBackendPriority by ticking each respective checkbox. Save.
7) Visit ILL requests:
http://localhost:8081/cgi-bin/koha/ill/ill-requests.pl
8) Press "New auto ILL request"
9) You are presented the "Standard" create form. Pick type "journal" and put '123' on DOI. Enter '42' on cardnumber and pick a library. Click Create.
10) Notice you are now shown the "Confirm auto backend" stage screen.
11) PluginBackend has a 50% chance of being available or not for testing purposes. If it is, it'll suggest PluginBackend, if not, it'll default to Standard. ReprintsDesk will always error because it's missing credentials.
12) Pick any of the backends or accept the suggested one, click 'Create'. The request has been placed in that specific backend.

OPAC:
1) Following from the previous test plan, visit OPAC ill requests:
http://localhost:8080/cgi-bin/koha/opac-illrequests.pl
2) Click "Create a new auto request" and repeat the same inputs as before. Click 'Create'.
3) Notice you're directed to "Confirming your request" screen. It's doing the same as it does in the Staff UI, except it does not allow the patron to pick a different backend, it'll always selected the first available backend in the priority.
4) Create more requests, you'll notice some of them will land on PluginBackend, others will land on 'Standard' because PluginBackend will sometimes be available and others not.

Do more testing:
- Reorder the backends in the AutoILLBackendPriority syspref and save, notice they're shown and suggested accordingly after creating a request.
- Disable all backends from AutoILLBackendPriority. Notice the original behaviour of requiring the user to select a backend before creating the request is restored on both opac and staff.

Run unit tests:
prove t/db_dependent/Illrequest/ConfirmAuto.t
prove t/db_dependent/Koha/ILL/Backends.t

Sponsored-by: NHS England
Sponsored-by: PTFS Europe Ltd
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 98 Pedro Amorim 2025-02-19 09:25:50 UTC
Created attachment 178313 [details] [review]
Bug 35604: Follow-up

Consider success message from backend and present it.
Add btn-primary class to auto ILL screen

Sponsored-by: NHS England
Sponsored-by: PTFS Europe Ltd
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 99 Pedro Amorim 2025-02-19 09:25:54 UTC
Created attachment 178314 [details] [review]
Bug 35604: (QA follow-up): Cosmetic improvements

These are improvements to the confirm auto backend stage screen on the Staff UI.
Result of a chat with Tomas about this development.

Sponsored-by: NHS England
Sponsored-by: PTFS Europe Ltd
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 100 Pedro Amorim 2025-02-19 09:25:57 UTC
Created attachment 178315 [details] [review]
Bug 35604: (QA follow-up): Fix find-missing-op-in-forms.t

prove xt/find-missing-op-in-forms.t
Comment 101 Pedro Amorim 2025-02-19 09:26:01 UTC
Created attachment 178316 [details] [review]
Bug 35604: (QA follow-up): Prevent more than one 'op' in form

This may happen if for example getting to the automatic backend screen from the ILL availability screen.
'op' is already being added, skip it if already exists in ported metadata
Comment 102 Pedro Amorim 2025-02-19 09:26:18 UTC
Patches rebased.
Comment 103 Lucas Gass (lukeg) 2025-02-25 14:54:34 UTC
A very simple rebase is needed here now.
Comment 104 Pedro Amorim 2025-02-26 09:57:05 UTC
Created attachment 178707 [details] [review]
Bug 35604: New Backends.pm class. installed_backends method

Sponsored-by: NHS England
Sponsored-by: PTFS Europe Ltd
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 105 Pedro Amorim 2025-02-26 09:57:09 UTC
Created attachment 178708 [details] [review]
Bug 35604: New 'ill-backends' syspref type

UI rendering of sortable ILL backends

Sponsored-by: NHS England
Sponsored-by: PTFS Europe Ltd
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 106 Pedro Amorim 2025-02-26 09:57:13 UTC
Created attachment 178709 [details] [review]
Bug 35604: New AutoILLBackendPriority sys prefs

Sponsored-by: NHS England
Sponsored-by: PTFS Europe Ltd
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 107 Pedro Amorim 2025-02-26 09:57:17 UTC
Created attachment 178710 [details] [review]
Bug 35604: atomicupdate

Sponsored-by: NHS England
Sponsored-by: PTFS Europe Ltd
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 108 Pedro Amorim 2025-02-26 09:57:21 UTC
Created attachment 178711 [details] [review]
Bug 35604: ILL request creation with AutoILLBackendPriority enabled

Sponsored-by: NHS England
Sponsored-by: PTFS Europe Ltd
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 109 Pedro Amorim 2025-02-26 09:57:25 UTC
Created attachment 178712 [details] [review]
Bug 35604: ConfirmAuto workflow stage

Sponsored-by: NHS England
Sponsored-by: PTFS Europe Ltd
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 110 Pedro Amorim 2025-02-26 09:57:28 UTC
Created attachment 178713 [details] [review]
Bug 35604: Update 'Make an ILL request' link in OPAC search results page

Sponsored-by: NHS England
Sponsored-by: PTFS Europe Ltd
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 111 Pedro Amorim 2025-02-26 09:57:32 UTC
Created attachment 178714 [details] [review]
Bug 35604: Add tests

Test plan:
Apply patches

Staff:
1) Visit the ILL sysprefs page:
/cgi-bin/koha/admin/preferences.pl?tab=interlibrary_loans
2) Enable ILLModule
3) Check the new AutoILLBackendPriority syspref. Notice it shows "No available backends"
4) Install 2 backend plugins from here:
https://github.com/PTFS-Europe/koha-ill-backend-plugin/releases/tag/v2.0.5
https://github.com/PTFS-Europe/koha-ill-reprintsdesk/releases/tag/rc-v3.0.0
5) Repeat 1. Notice the backends now show.
6) Enable both for AutoILLBackendPriority by ticking each respective checkbox. Save.
7) Visit ILL requests:
http://localhost:8081/cgi-bin/koha/ill/ill-requests.pl
8) Press "New auto ILL request"
9) You are presented the "Standard" create form. Pick type "journal" and put '123' on DOI. Enter '42' on cardnumber and pick a library. Click Create.
10) Notice you are now shown the "Confirm auto backend" stage screen.
11) PluginBackend has a 50% chance of being available or not for testing purposes. If it is, it'll suggest PluginBackend, if not, it'll default to Standard. ReprintsDesk will always error because it's missing credentials.
12) Pick any of the backends or accept the suggested one, click 'Create'. The request has been placed in that specific backend.

OPAC:
1) Following from the previous test plan, visit OPAC ill requests:
http://localhost:8080/cgi-bin/koha/opac-illrequests.pl
2) Click "Create a new auto request" and repeat the same inputs as before. Click 'Create'.
3) Notice you're directed to "Confirming your request" screen. It's doing the same as it does in the Staff UI, except it does not allow the patron to pick a different backend, it'll always selected the first available backend in the priority.
4) Create more requests, you'll notice some of them will land on PluginBackend, others will land on 'Standard' because PluginBackend will sometimes be available and others not.

Do more testing:
- Reorder the backends in the AutoILLBackendPriority syspref and save, notice they're shown and suggested accordingly after creating a request.
- Disable all backends from AutoILLBackendPriority. Notice the original behaviour of requiring the user to select a backend before creating the request is restored on both opac and staff.

Run unit tests:
prove t/db_dependent/Illrequest/ConfirmAuto.t
prove t/db_dependent/Koha/ILL/Backends.t

Sponsored-by: NHS England
Sponsored-by: PTFS Europe Ltd
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 112 Pedro Amorim 2025-02-26 09:57:36 UTC
Created attachment 178715 [details] [review]
Bug 35604: Follow-up

Consider success message from backend and present it.
Add btn-primary class to auto ILL screen

Sponsored-by: NHS England
Sponsored-by: PTFS Europe Ltd
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 113 Pedro Amorim 2025-02-26 09:57:40 UTC
Created attachment 178716 [details] [review]
Bug 35604: (QA follow-up): Cosmetic improvements

These are improvements to the confirm auto backend stage screen on the Staff UI.
Result of a chat with Tomas about this development.

Sponsored-by: NHS England
Sponsored-by: PTFS Europe Ltd
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 114 Pedro Amorim 2025-02-26 09:57:43 UTC
Created attachment 178717 [details] [review]
Bug 35604: (QA follow-up): Fix find-missing-op-in-forms.t

prove xt/find-missing-op-in-forms.t
Comment 115 Pedro Amorim 2025-02-26 09:57:47 UTC
Created attachment 178718 [details] [review]
Bug 35604: (QA follow-up): Prevent more than one 'op' in form

This may happen if for example getting to the automatic backend screen from the ILL availability screen.
'op' is already being added, skip it if already exists in ported metadata
Comment 116 Katrin Fischer 2025-03-20 07:42:59 UTC
Starting with a first code review (always got to start somewhere :))

0) QA script

I am aware that some might be false positives, but I believe there are some that need fixing as well:

 FAIL	installer/data/mysql/atomicupdate/bug_35604.pl
   FAIL	  file permissions
		File must have the exec flag

 FAIL	installer/data/mysql/mandatory/sysprefs.sql
   FAIL	  semicolon
		simicolon found instead of comma at line 879

 FAIL	koha-tmpl/intranet-tmpl/prog/js/ill-autobackend.js
   FAIL	  forbidden patterns
		forbidden pattern: console.log (line 68)

 FAIL	koha-tmpl/opac-tmpl/bootstrap/js/ill-autobackend.js
   FAIL	  forbidden patterns
		forbidden pattern: console.log (line 68)

 FAIL	t/db_dependent/Koha/ILL/Backends.t
   FAIL	  file permissions
		File must have the exec flag

 FAIL	t/db_dependent/Koha/ILL/Request/Workflow/ConfirmAuto.t
   FAIL	  file permissions
		File must have the exec flag

1) Koha/ILL/Request/Workflow/ConfirmAuto.pm

From the code comments this looks like display components handled in a module? Maybe we can talk things through a bit, when I got a little deeper into the feature set.

2) Tiny typo

+    description => "Add new AutoILLBackendPriority system preferences",

We only add one :)

3) System preference 

- Availability checking is mentioned the first time in the pref description, but not in other places.
- type is given as ILLBackends in kohastructure.sql, but as ill-backends in the yaml.

If I understand correctly the preference won't work with only Standard. You need at least 2 backends installed and you need the availability check plugin/capability implemented in backend for these, is that correct? 

4) Capitalization

a)
+                                        <li>Make an automatic <a href="/cgi-bin/koha/opac-illrequests.pl?op=create&backend=Standard">Interlibrary loan request</a></li>

Also wrong in the old part of the code: 
                                         <li>Make an <a href="/cgi-bin/koha/opac-illrequests.pl?op=create">Interlibrary loan request</a></li>

5) Translatability

+                    let message = "Error";
Comment 117 Pedro Amorim 2025-03-25 17:12:05 UTC Comment hidden (obsolete)
Comment 118 Pedro Amorim 2025-03-25 17:12:22 UTC Comment hidden (obsolete)
Comment 119 Pedro Amorim 2025-03-25 17:19:36 UTC
(In reply to Katrin Fischer from comment #116)
> 3) System preference 
> 
> - Availability checking is mentioned the first time in the pref description,
> but not in other places.
> - type is given as ILLBackends in kohastructure.sql, but as ill-backends in
> the yaml.
> 
> If I understand correctly the preference won't work with only Standard. You
> need at least 2 backends installed and you need the availability check
> plugin/capability implemented in backend for these, is that correct? 

Thank you so much for looking Katrin. The pref will work with at least 1 installed backend, and the backend must provide the provides_backend_availability_check capability and implement the availability_check_info method, that's correct.

Examples can be found here:
https://github.com/PTFS-Europe/koha-ill-libkey-lending-tool/blob/main/Koha/Plugin/Com/PTFSEurope/IncDocs.pm#L142
https://github.com/PTFS-Europe/koha-ill-reprintsdesk/blob/pluginify%2B%2B/Koha/Plugin/Com/PTFSEurope/ReprintsDesk.pm#L225

If only one supporting backend is installed, and the syspref is enabled with that single backend, the automatic backend screen will first check that backend, recommend it if the document being queried is available in it, or default to Standard otherwise, effectivelly making the choice for the Staff member of which backend should be used a particular ILL request.
Comment 120 Pedro Amorim 2025-03-26 10:16:09 UTC Comment hidden (obsolete)
Comment 121 Pedro Amorim 2025-03-26 10:22:38 UTC
Created attachment 179721 [details] [review]
Bug 35604: Multiple QA followups

Multiple fixes:
- File permmissions
- Capitalization
- Translatability
- Use of console.log
- Atomic update description typo fix
- Remove occurrences of 'auto' and 'automatic':
  User testing reported that making a UI distinction between 'regular' and 'automatic' ILL requests is redundant.
Comment 122 Pedro Amorim 2025-04-02 13:03:21 UTC
Created attachment 180335 [details] [review]
Bug 35604: (QA follow-up): Remove remaining 'automatic' occurrences

From Hackfest QA session
Comment 123 Tomás Cohen Arazi (tcohen) 2025-04-03 09:08:19 UTC
Created attachment 180451 [details] [review]
Bug 35604: New Backends.pm class. installed_backends method

Sponsored-by: NHS England
Sponsored-by: PTFS Europe Ltd
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 124 Tomás Cohen Arazi (tcohen) 2025-04-03 09:08:22 UTC
Created attachment 180452 [details] [review]
Bug 35604: New 'ill-backends' syspref type

UI rendering of sortable ILL backends

Sponsored-by: NHS England
Sponsored-by: PTFS Europe Ltd
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 125 Tomás Cohen Arazi (tcohen) 2025-04-03 09:08:26 UTC
Created attachment 180453 [details] [review]
Bug 35604: New AutoILLBackendPriority sys prefs

Sponsored-by: NHS England
Sponsored-by: PTFS Europe Ltd
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 126 Tomás Cohen Arazi (tcohen) 2025-04-03 09:08:30 UTC
Created attachment 180454 [details] [review]
Bug 35604: atomicupdate

Sponsored-by: NHS England
Sponsored-by: PTFS Europe Ltd
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 127 Tomás Cohen Arazi (tcohen) 2025-04-03 09:08:34 UTC
Created attachment 180455 [details] [review]
Bug 35604: ILL request creation with AutoILLBackendPriority enabled

Sponsored-by: NHS England
Sponsored-by: PTFS Europe Ltd
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 128 Tomás Cohen Arazi (tcohen) 2025-04-03 09:08:37 UTC
Created attachment 180456 [details] [review]
Bug 35604: ConfirmAuto workflow stage

Sponsored-by: NHS England
Sponsored-by: PTFS Europe Ltd
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 129 Tomás Cohen Arazi (tcohen) 2025-04-03 09:08:40 UTC
Created attachment 180457 [details] [review]
Bug 35604: Update 'Make an ILL request' link in OPAC search results page

Sponsored-by: NHS England
Sponsored-by: PTFS Europe Ltd
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 130 Tomás Cohen Arazi (tcohen) 2025-04-03 09:08:44 UTC
Created attachment 180458 [details] [review]
Bug 35604: Add tests

Test plan:
Apply patches

Staff:
1) Visit the ILL sysprefs page:
/cgi-bin/koha/admin/preferences.pl?tab=interlibrary_loans
2) Enable ILLModule
3) Check the new AutoILLBackendPriority syspref. Notice it shows "No available backends"
4) Install 2 backend plugins from here:
https://github.com/PTFS-Europe/koha-ill-backend-plugin/releases/tag/v2.0.5
https://github.com/PTFS-Europe/koha-ill-reprintsdesk/releases/tag/rc-v3.0.0
5) Repeat 1. Notice the backends now show.
6) Enable both for AutoILLBackendPriority by ticking each respective checkbox. Save.
7) Visit ILL requests:
http://localhost:8081/cgi-bin/koha/ill/ill-requests.pl
8) Press "New auto ILL request"
9) You are presented the "Standard" create form. Pick type "journal" and put '123' on DOI. Enter '42' on cardnumber and pick a library. Click Create.
10) Notice you are now shown the "Confirm auto backend" stage screen.
11) PluginBackend has a 50% chance of being available or not for testing purposes. If it is, it'll suggest PluginBackend, if not, it'll default to Standard. ReprintsDesk will always error because it's missing credentials.
12) Pick any of the backends or accept the suggested one, click 'Create'. The request has been placed in that specific backend.

OPAC:
1) Following from the previous test plan, visit OPAC ill requests:
http://localhost:8080/cgi-bin/koha/opac-illrequests.pl
2) Click "Create a new auto request" and repeat the same inputs as before. Click 'Create'.
3) Notice you're directed to "Confirming your request" screen. It's doing the same as it does in the Staff UI, except it does not allow the patron to pick a different backend, it'll always selected the first available backend in the priority.
4) Create more requests, you'll notice some of them will land on PluginBackend, others will land on 'Standard' because PluginBackend will sometimes be available and others not.

Do more testing:
- Reorder the backends in the AutoILLBackendPriority syspref and save, notice they're shown and suggested accordingly after creating a request.
- Disable all backends from AutoILLBackendPriority. Notice the original behaviour of requiring the user to select a backend before creating the request is restored on both opac and staff.

Run unit tests:
prove t/db_dependent/Illrequest/ConfirmAuto.t
prove t/db_dependent/Koha/ILL/Backends.t

Sponsored-by: NHS England
Sponsored-by: PTFS Europe Ltd
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 131 Tomás Cohen Arazi (tcohen) 2025-04-03 09:08:47 UTC
Created attachment 180459 [details] [review]
Bug 35604: Display success message

Consider success message from backend and present it.
Add btn-primary class to auto ILL screen

Sponsored-by: NHS England
Sponsored-by: PTFS Europe Ltd
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 132 Tomás Cohen Arazi (tcohen) 2025-04-03 09:08:50 UTC
Created attachment 180460 [details] [review]
Bug 35604: (QA follow-up): Cosmetic improvements

These are improvements to the confirm auto backend stage screen on the Staff UI.
Result of a chat with Tomas about this development.

Sponsored-by: NHS England
Sponsored-by: PTFS Europe Ltd
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 133 Tomás Cohen Arazi (tcohen) 2025-04-03 09:08:53 UTC
Created attachment 180461 [details] [review]
Bug 35604: (QA follow-up): Fix find-missing-op-in-forms.t

prove xt/find-missing-op-in-forms.t

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 134 Tomás Cohen Arazi (tcohen) 2025-04-03 09:08:56 UTC
Created attachment 180462 [details] [review]
Bug 35604: (QA follow-up): Prevent more than one 'op' in form

This may happen if for example getting to the automatic backend screen from the ILL availability screen.
'op' is already being added, skip it if already exists in ported metadata

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 135 Tomás Cohen Arazi (tcohen) 2025-04-03 09:08:59 UTC
Created attachment 180463 [details] [review]
Bug 35604: Multiple QA followups

Multiple fixes:
- File permmissions
- Capitalization
- Translatability
- Use of console.log
- Atomic update description typo fix
- Remove occurrences of 'auto' and 'automatic':
  User testing reported that making a UI distinction between 'regular' and 'automatic' ILL requests is redundant.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 136 Tomás Cohen Arazi (tcohen) 2025-04-03 09:09:02 UTC
Created attachment 180464 [details] [review]
Bug 35604: (QA follow-up): Remove remaining 'automatic' occurrences

From Hackfest QA session

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 137 Tomás Cohen Arazi (tcohen) 2025-04-03 09:09:05 UTC
Created attachment 180465 [details] [review]
Bug 35604: Move available_backends() to Koha::ILL::Request::Config

This patch removes the the Koha::ILL::Backends class as it is not
actually a Koha::Objects-based class as it claims, and also internally
instantiates the config class, which could just hold the only defined
method.

This method is only used in the preferences.pl page, and its occurence
is fixed by this patch.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 138 Tomás Cohen Arazi (tcohen) 2025-04-03 09:11:08 UTC
Great job, team. Thanks for promptly following up on things we talked about!
Hope you agree with the follow-up. Happy to discuss if required.
Comment 139 Pedro Amorim 2025-04-03 10:35:58 UTC
(In reply to Tomás Cohen Arazi (tcohen) from comment #138)
> Hope you agree with the follow-up. Happy to discuss if required.

Fully on board. Thank you very much!
Comment 140 Katrin Fischer 2025-04-14 06:45:48 UTC
1) I double checked the file, but this seems to be a false positive? Can you please check as well just in case?

 FAIL	installer/data/mysql/mandatory/sysprefs.sql
   FAIL	  semicolon
		simicolon found instead of comma at line 881

(also spelling error: simicolon)

2) The new system preference now shows: "No available backends". I have been wondering if it would be clearer to say: Only one backend available. (when only standard is there) (not blocker)
Comment 141 Katrin Fischer 2025-04-14 06:52:19 UTC
Pushed for 25.05!

Well done everyone, thank you!
Comment 142 Pedro Amorim 2025-04-14 08:52:16 UTC
(In reply to Katrin Fischer from comment #140)
> 2) The new system preference now shows: "No available backends". I have been
> wondering if it would be clearer to say: Only one backend available. (when
> only standard is there) (not blocker)


Only the Standard backend is available. Additional backends are required to use this feature.


Would you agree to the above?
Comment 143 Katrin Fischer 2025-04-15 09:53:54 UTC
(In reply to Pedro Amorim from comment #142)
> (In reply to Katrin Fischer from comment #140)
> > 2) The new system preference now shows: "No available backends". I have been
> > wondering if it would be clearer to say: Only one backend available. (when
> > only standard is there) (not blocker)
> 
> 
> Only the Standard backend is available. Additional backends are required to
> use this feature.
> 
> 
> Would you agree to the above?

I think that would be a very helpful message :)
Comment 144 Pedro Amorim 2025-04-15 10:02:44 UTC
Created attachment 180956 [details] [review]
Bug 35604: (QA follow-up): Update UI message if feature cannot be utilized
Comment 145 Katrin Fischer 2025-05-16 15:52:45 UTC
Another missed kitten, picked up for main now.