Bug 38819 - ILL - 'Switch provider' should use AutoILLBackendPriority
Summary: ILL - 'Switch provider' should use AutoILLBackendPriority
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: ILL (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Pedro Amorim
QA Contact: Testopia
URL:
Keywords:
Depends on: 38669 38751
Blocks:
  Show dependency treegraph
 
Reported: 2025-01-03 15:55 UTC by Pedro Amorim
Modified: 2025-01-15 14:10 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 38819: Auto migrate controller logic (6.54 KB, patch)
2025-01-03 15:58 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 38819: Auto switch: Breadcrumbs+header titles (1.66 KB, patch)
2025-01-03 15:58 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 38819: 'Return to form' vs 'return to request' (1.93 KB, patch)
2025-01-03 15:58 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 38819: Auto migrate controller logic (6.58 KB, patch)
2025-01-03 17:43 UTC, David Nind
Details | Diff | Splinter Review
Bug 38819: Auto switch: Breadcrumbs+header titles (1.71 KB, patch)
2025-01-03 17:43 UTC, David Nind
Details | Diff | Splinter Review
Bug 38819: 'Return to form' vs 'return to request' (1.97 KB, patch)
2025-01-03 17:43 UTC, David Nind
Details | Diff | Splinter Review
Bug 38819: Auto migrate controller logic (6.59 KB, patch)
2025-01-14 17:03 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 38819: Auto switch: Breadcrumbs+header titles (1.73 KB, patch)
2025-01-14 17:03 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 38819: 'Return to form' vs 'return to request' (1.97 KB, patch)
2025-01-14 17:03 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 38819: (QA follow-up): Fix find-missing-filters.t (2.05 KB, patch)
2025-01-15 14:10 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 2025-01-03 15:55:53 UTC
Currently, the 'Switch provider' option lists all other installed backends and forces the user to pick one.
If AutoILLBackendPriority is enabled, this action should make use of it, i.e. present the automatic backend screen, query all installed backends for availability and suggest the most appropriate one.
Comment 1 Pedro Amorim 2025-01-03 15:58:23 UTC
Created attachment 176121 [details] [review]
Bug 38819: Auto migrate controller logic

Test plan, k-t-d:
0) Install the 'PluginBackend' plugin:
https://github.com/PTFS-Europe/koha-ill-backend-plugin/releases/tag/v2.0.6
1) Enable ILLModule syspref and check the "PluginBackend" backend in AutoILLBackendPriority:
http://localhost:8081/cgi-bin/koha/admin/preferences.pl?tab=interlibrary_loans
2) Create a new 'auto' ILL request:
http://localhost:8081/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=Standard
3) Select type 'journal article', add '123' as DOI, '42' as cardnumber and any library
4) You should be on the automatic backend screen. The PluginBackend has a 50% chance to return available, so this step may suggest PluginBackend or Standard. Pick whatever was suggested. Click 'confirm'.
5) You are now on the request detail page. Click "Switch provider". You should be back on the automatic backend screen.
Repeat this step as many times needed to switch from Standard <-> PluginBackend multiple times. Ensure it always succeeds.
Comment 2 Pedro Amorim 2025-01-03 15:58:26 UTC
Created attachment 176122 [details] [review]
Bug 38819: Auto switch: Breadcrumbs+header titles
Comment 3 Pedro Amorim 2025-01-03 15:58:29 UTC
Created attachment 176123 [details] [review]
Bug 38819: 'Return to form' vs 'return to request'
Comment 4 David Nind 2025-01-03 17:43:01 UTC
Created attachment 176139 [details] [review]
Bug 38819: Auto migrate controller logic

Test plan, k-t-d:
0) Install the 'PluginBackend' plugin:
https://github.com/PTFS-Europe/koha-ill-backend-plugin/releases/tag/v2.0.6
1) Enable ILLModule syspref and check the "PluginBackend" backend in AutoILLBackendPriority:
http://localhost:8081/cgi-bin/koha/admin/preferences.pl?tab=interlibrary_loans
2) Create a new 'auto' ILL request:
http://localhost:8081/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=Standard
3) Select type 'journal article', add '123' as DOI, '42' as cardnumber and any library
4) You should be on the automatic backend screen. The PluginBackend has a 50% chance to return available, so this step may suggest PluginBackend or Standard. Pick whatever was suggested. Click 'confirm'.
5) You are now on the request detail page. Click "Switch provider". You should be back on the automatic backend screen.
Repeat this step as many times needed to switch from Standard <-> PluginBackend multiple times. Ensure it always succeeds.

Signed-off-by: David Nind <david@davidnind.com>
Comment 5 David Nind 2025-01-03 17:43:10 UTC
Created attachment 176140 [details] [review]
Bug 38819: Auto switch: Breadcrumbs+header titles

Signed-off-by: David Nind <david@davidnind.com>
Comment 6 David Nind 2025-01-03 17:43:20 UTC
Created attachment 176141 [details] [review]
Bug 38819: 'Return to form' vs 'return to request'

Signed-off-by: David Nind <david@davidnind.com>
Comment 7 David Nind 2025-01-03 17:46:20 UTC
I've signed off, but just a question.

The "Switch provider" option disappeared for the ILL request once it switched to PluginBackend. Is that what should be expected?

Testing notes (using KTD):
1. Apply the patches (and all the dependencies).
2. Update the database: updatedatabase
3. Restart everything: restart_all
Comment 8 Pedro Amorim 2025-01-06 09:32:10 UTC
(In reply to David Nind from comment #7)
> I've signed off, but just a question.
> 
> The "Switch provider" option disappeared for the ILL request once it
> switched to PluginBackend. Is that what should be expected?
> 
> Testing notes (using KTD):
> 1. Apply the patches (and all the dependencies).
> 2. Update the database: updatedatabase
> 3. Restart everything: restart_all

Thank you for testing and sign-off, David! =D
I can't reproduce that, the 'switch provider' option always shows for me following the test plan again. The installed plugin must be release v2.0.6, are you able to double-check if that is the release you're using? Thanks!
Comment 9 David Nind 2025-01-08 10:44:35 UTC
(In reply to Pedro Amorim from comment #8)
> (In reply to David Nind from comment #7)
> > I've signed off, but just a question.
> > 
> > The "Switch provider" option disappeared for the ILL request once it
> > switched to PluginBackend. Is that what should be expected?
> > 
> > Testing notes (using KTD):
> > 1. Apply the patches (and all the dependencies).
> > 2. Update the database: updatedatabase
> > 3. Restart everything: restart_all
> 
> Thank you for testing and sign-off, David! =D
> I can't reproduce that, the 'switch provider' option always shows for me
> following the test plan again. The installed plugin must be release v2.0.6,
> are you able to double-check if that is the release you're using? Thanks!

You are right! Looks like I used the wrong version of the plugin.

I retested, and everything works as expected + the "Switch provider" is available irrespective of the provider.
Comment 10 Pedro Amorim 2025-01-14 17:03:26 UTC
Created attachment 176519 [details] [review]
Bug 38819: Auto migrate controller logic

Test plan, k-t-d:
0) Install the 'PluginBackend' plugin:
https://github.com/PTFS-Europe/koha-ill-backend-plugin/releases/tag/v2.0.6
1) Enable ILLModule syspref and check the "PluginBackend" backend in AutoILLBackendPriority:
http://localhost:8081/cgi-bin/koha/admin/preferences.pl?tab=interlibrary_loans
2) Create a new 'auto' ILL request:
http://localhost:8081/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=Standard
3) Select type 'journal article', add '123' as DOI, '42' as cardnumber and any library
4) You should be on the automatic backend screen. The PluginBackend has a 50% chance to return available, so this step may suggest PluginBackend or Standard. Pick whatever was suggested. Click 'confirm'.
5) You are now on the request detail page. Click "Switch provider". You should be back on the automatic backend screen.
Repeat this step as many times needed to switch from Standard <-> PluginBackend multiple times. Ensure it always succeeds.

Signed-off-by: David Nind <david@davidnind.com>
Comment 11 Pedro Amorim 2025-01-14 17:03:29 UTC
Created attachment 176520 [details] [review]
Bug 38819: Auto switch: Breadcrumbs+header titles

Signed-off-by: David Nind <david@davidnind.com>
Comment 12 Pedro Amorim 2025-01-14 17:03:31 UTC
Created attachment 176521 [details] [review]
Bug 38819: 'Return to form' vs 'return to request'

Signed-off-by: David Nind <david@davidnind.com>
Comment 13 Pedro Amorim 2025-01-15 14:10:20 UTC
Created attachment 176575 [details] [review]
Bug 38819: (QA follow-up): Fix find-missing-filters.t

prove xt/find-missing-filters.t