Bug 38819 - ILL - 'Switch provider' should use AutoILLBackendPriority
Summary: ILL - 'Switch provider' should use AutoILLBackendPriority
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: ILL (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Pedro Amorim
QA Contact: Tomás Cohen Arazi (tcohen)
URL:
Keywords:
Depends on: 38669 38751
Blocks:
  Show dependency treegraph
 
Reported: 2025-01-03 15:55 UTC by Pedro Amorim
Modified: 2025-05-26 15:23 UTC (History)
6 users (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
This enhancement changes the 'Switch provider' button on ILL requests to use the `AutoILLBackendPriority` feature when configured. The button will now present the automatic backend screen, query all installed backends for availability and suggest the most appropriate one.
Version(s) released in:
25.05.00
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
Bug 38819: Auto migrate controller logic (6.52 KB, patch)
2025-03-26 16:53 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 38819: Auto switch: Breadcrumbs+header titles (1.73 KB, patch)
2025-03-26 16:53 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 38819: 'Return to form' vs 'return to request' (1.85 KB, patch)
2025-03-26 16:54 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 38819: (QA follow-up): Fix find-missing-filters.t (1.97 KB, patch)
2025-03-26 16:54 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 38819: Auto migrate controller logic (6.68 KB, patch)
2025-03-27 09:37 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 38819: Auto switch: Breadcrumbs+header titles (1.79 KB, patch)
2025-03-27 09:37 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 38819: 'Return to form' vs 'return to request' (1.66 KB, patch)
2025-03-27 09:37 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 38819: (QA follow-up): Fix find-missing-filters.t (2.15 KB, patch)
2025-03-27 09:37 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 38819: Auto migrate controller logic (8.97 KB, patch)
2025-03-27 10:19 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 38819: Auto switch: Breadcrumbs+header titles (1.79 KB, patch)
2025-03-27 10:20 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 38819: 'Return to form' vs 'return to request' (1.66 KB, patch)
2025-03-27 10:20 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 38819: (QA follow-up): Fix find-missing-filters.t (2.15 KB, patch)
2025-03-27 10:20 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 38819: Auto migrate controller logic (8.97 KB, patch)
2025-04-02 13:11 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 38819: Auto migrate controller logic (8.97 KB, patch)
2025-04-02 13:12 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 38819: Auto migrate controller logic (8.97 KB, patch)
2025-04-02 13:14 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 38819: Auto migrate controller logic (8.97 KB, patch)
2025-04-02 13:16 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 38819: Auto migrate controller logic (8.97 KB, patch)
2025-04-02 13:22 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 38819: Auto migrate controller logic (8.97 KB, patch)
2025-04-02 13:27 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 38819: Auto migrate controller logic (8.97 KB, patch)
2025-04-02 13:33 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 38819: Auto migrate controller logic (8.97 KB, patch)
2025-04-02 13:40 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 38819: Auto migrate controller logic (8.97 KB, patch)
2025-04-02 14:10 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 38819: Auto switch: Breadcrumbs+header titles (1.89 KB, patch)
2025-04-02 14:10 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 38819: 'Return to form' vs 'return to request' (1.66 KB, patch)
2025-04-02 14:10 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 38819: (QA follow-up): Fix find-missing-filters.t (2.15 KB, patch)
2025-04-02 14:10 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 38819: Auto migrate controller logic (8.97 KB, patch)
2025-04-03 13:00 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 38819: Auto switch: Breadcrumbs+header titles (1.76 KB, patch)
2025-04-03 13:00 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 38819: 'Return to form' vs 'return to request' (1.66 KB, patch)
2025-04-03 13:01 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 38819: (QA follow-up): Fix find-missing-filters.t (2.15 KB, patch)
2025-04-03 13:01 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 38819: Auto migrate controller logic (9.02 KB, patch)
2025-04-03 13:10 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 38819: Auto switch: Breadcrumbs+header titles (1.81 KB, patch)
2025-04-03 13:10 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 38819: 'Return to form' vs 'return to request' (1.71 KB, patch)
2025-04-03 13:10 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 38819: (QA follow-up): Fix find-missing-filters.t (2.21 KB, patch)
2025-04-03 13:10 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 38819: Auto migrate controller logic (9.02 KB, patch)
2025-04-23 08:39 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 38819: Auto switch: Breadcrumbs+header titles (1.78 KB, patch)
2025-04-23 08:39 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 38819: 'Return to form' vs 'return to request' (1.71 KB, patch)
2025-04-23 08:40 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 38819: (QA follow-up): Fix find-missing-filters.t (2.21 KB, patch)
2025-04-23 08:40 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
Comment 14 Marcel de Rooy 2025-03-07 08:39:34 UTC
Somewhere in the process with all dependencies in PQA, this does not apply
Comment 15 Pedro Amorim 2025-03-26 16:53:54 UTC Comment hidden (obsolete)
Comment 16 Pedro Amorim 2025-03-26 16:53:57 UTC Comment hidden (obsolete)
Comment 17 Pedro Amorim 2025-03-26 16:54:00 UTC Comment hidden (obsolete)
Comment 18 Pedro Amorim 2025-03-26 16:54:03 UTC Comment hidden (obsolete)
Comment 19 Pedro Amorim 2025-03-26 16:54:58 UTC
Rebased for main (on top of tidied bug 38669)
Comment 20 Pedro Amorim 2025-03-27 09:37:30 UTC Comment hidden (obsolete)
Comment 21 Pedro Amorim 2025-03-27 09:37:33 UTC Comment hidden (obsolete)
Comment 22 Pedro Amorim 2025-03-27 09:37:36 UTC Comment hidden (obsolete)
Comment 23 Pedro Amorim 2025-03-27 09:37:39 UTC Comment hidden (obsolete)
Comment 24 Pedro Amorim 2025-03-27 10:19:59 UTC
Created attachment 179759 [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 25 Pedro Amorim 2025-03-27 10:20:02 UTC
Created attachment 179760 [details] [review]
Bug 38819: Auto switch: Breadcrumbs+header titles

Signed-off-by: David Nind <david@davidnind.com>
Comment 26 Pedro Amorim 2025-03-27 10:20:05 UTC
Created attachment 179761 [details] [review]
Bug 38819: 'Return to form' vs 'return to request'

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

prove xt/find-missing-filters.t
Comment 28 Pedro Amorim 2025-04-02 13:11:37 UTC Comment hidden (obsolete)
Comment 29 Pedro Amorim 2025-04-02 13:12:55 UTC Comment hidden (obsolete)
Comment 30 Pedro Amorim 2025-04-02 13:14:55 UTC Comment hidden (obsolete)
Comment 31 Pedro Amorim 2025-04-02 13:16:14 UTC Comment hidden (obsolete)
Comment 32 Pedro Amorim 2025-04-02 13:22:21 UTC Comment hidden (obsolete)
Comment 33 Pedro Amorim 2025-04-02 13:27:11 UTC Comment hidden (obsolete)
Comment 34 Pedro Amorim 2025-04-02 13:33:27 UTC
Created attachment 180353 [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 35 Pedro Amorim 2025-04-02 13:40:30 UTC
Created attachment 180367 [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 36 Pedro Amorim 2025-04-02 14:10:10 UTC
Created attachment 180390 [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 37 Pedro Amorim 2025-04-02 14:10:13 UTC
Created attachment 180391 [details] [review]
Bug 38819: Auto switch: Breadcrumbs+header titles

Signed-off-by: David Nind <david@davidnind.com>
Comment 38 Pedro Amorim 2025-04-02 14:10:16 UTC
Created attachment 180392 [details] [review]
Bug 38819: 'Return to form' vs 'return to request'

Signed-off-by: David Nind <david@davidnind.com>
Comment 39 Pedro Amorim 2025-04-02 14:10:19 UTC
Created attachment 180393 [details] [review]
Bug 38819: (QA follow-up): Fix find-missing-filters.t

prove xt/find-missing-filters.t
Comment 40 Tomás Cohen Arazi (tcohen) 2025-04-03 12:12:14 UTC
`ill-requests.tt` has some stray merge markers. Please fix.
Comment 41 Pedro Amorim 2025-04-03 13:00:54 UTC
Created attachment 180509 [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 42 Pedro Amorim 2025-04-03 13:00:57 UTC
Created attachment 180510 [details] [review]
Bug 38819: Auto switch: Breadcrumbs+header titles

Signed-off-by: David Nind <david@davidnind.com>
Comment 43 Pedro Amorim 2025-04-03 13:01:00 UTC
Created attachment 180511 [details] [review]
Bug 38819: 'Return to form' vs 'return to request'

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

prove xt/find-missing-filters.t
Comment 45 Pedro Amorim 2025-04-03 13:01:35 UTC
(In reply to Tomás Cohen Arazi (tcohen) from comment #40)
> `ill-requests.tt` has some stray merge markers. Please fix.

Thanks for spotting that! Fixed and reran qa script, all happy. Changed to PQA as discussed. Thank you!
Comment 46 Tomás Cohen Arazi (tcohen) 2025-04-03 13:10:50 UTC
Created attachment 180514 [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>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 47 Tomás Cohen Arazi (tcohen) 2025-04-03 13:10:52 UTC
Created attachment 180515 [details] [review]
Bug 38819: Auto switch: Breadcrumbs+header titles

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 48 Tomás Cohen Arazi (tcohen) 2025-04-03 13:10:55 UTC
Created attachment 180516 [details] [review]
Bug 38819: 'Return to form' vs 'return to request'

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 49 Tomás Cohen Arazi (tcohen) 2025-04-03 13:10:58 UTC
Created attachment 180517 [details] [review]
Bug 38819: (QA follow-up): Fix find-missing-filters.t

prove xt/find-missing-filters.t

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 50 Katrin Fischer 2025-04-23 06:03:04 UTC
Hi Pedro, can you please rebase on latest main? Hope I didn't miss a dependency?

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 38819: Auto migrate controller logic
Applying: Bug 38819: Auto switch: Breadcrumbs+header titles
error: sha1 information is lacking or useless (koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt).
error: could not build fake ancestor
Patch failed at 0001 Bug 38819: Auto switch: Breadcrumbs+header titles
hint: Use 'git am --show-current-patch=diff' to see the failed patch
When you have resolved this problem run "git bz apply --continue".
If you would prefer to skip this patch, instead run "git bz apply --skip".
To restore the original branch and stop patching run "git bz apply --abort".
Patch left in /tmp/Bug-38819-Auto-switch-Breadcrumbsheader-titles-qzi0v8nr.patch
Comment 51 Pedro Amorim 2025-04-23 08:39:55 UTC
Created attachment 181348 [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>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 52 Pedro Amorim 2025-04-23 08:39:58 UTC
Created attachment 181349 [details] [review]
Bug 38819: Auto switch: Breadcrumbs+header titles

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 53 Pedro Amorim 2025-04-23 08:40:02 UTC
Created attachment 181350 [details] [review]
Bug 38819: 'Return to form' vs 'return to request'

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 54 Pedro Amorim 2025-04-23 08:40:06 UTC
Created attachment 181351 [details] [review]
Bug 38819: (QA follow-up): Fix find-missing-filters.t

prove xt/find-missing-filters.t

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 55 Pedro Amorim 2025-04-23 08:41:14 UTC
Looks like a slight rebase on top of bug 38685 was required.
I must've forgotten to set this dependency. Apologies.
Comment 56 Katrin Fischer 2025-04-25 06:38:59 UTC
 +                    <span>Confirm switch provider</span>

Just wondering if we might want to switch to "Confirm switching provider" or "Confirm provider switch" (I am not a native speaker, so happy to be told I am talking nonsense :) )
Comment 57 Katrin Fischer 2025-04-25 06:48:57 UTC
Pushed for 25.05!

Well done everyone, thank you!
Comment 58 Pedro Amorim 2025-04-28 12:22:44 UTC
(In reply to Katrin Fischer from comment #56)
>  +                    <span>Confirm switch provider</span>
> 
> Just wondering if we might want to switch to "Confirm switching provider" or
> "Confirm provider switch" (I am not a native speaker, so happy to be told I
> am talking nonsense :) )

Fair, I agree. Though the button clicked to visit the page is labeled "Switch provider", for that reason I think it makes sense to use those 2 words exactly. "Switch provider confirmation"? Or just simply "Switch provider" as this is the page header+breadcrumbs and the "confirm/confirmation" part may be redundant.
Comment 59 Katrin Fischer 2025-04-28 15:54:38 UTC
(In reply to Pedro Amorim from comment #58)
> (In reply to Katrin Fischer from comment #56)
> >  +                    <span>Confirm switch provider</span>
> > 
> > Just wondering if we might want to switch to "Confirm switching provider" or
> > "Confirm provider switch" (I am not a native speaker, so happy to be told I
> > am talking nonsense :) )
> 
> Fair, I agree. Though the button clicked to visit the page is labeled
> "Switch provider", for that reason I think it makes sense to use those 2
> words exactly. "Switch provider confirmation"? Or just simply "Switch
> provider" as this is the page header+breadcrumbs and the
> "confirm/confirmation" part may be redundant.

We can still do that later - I think we have some existing patterns in the administration module for deleting things.
Comment 60 Katrin Fischer 2025-05-16 15:26:31 UTC
Dropping the question about string change - as noted earlier, we can deal with that later/separately if needed.