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!
Created attachment 164883 [details] [review] Bug 35604: New Backends.pm class. installed_backends method
Created attachment 164884 [details] [review] Bug 35604: New 'ill-backends' syspref type UI rendering of sortable ILL backends
Created attachment 164885 [details] [review] Bug 35604: New AutoILLBackendPriority sys prefs
Created attachment 164886 [details] [review] Bug 35604: ILL request creation with AutoILLBackendPriority enabled
Created attachment 164887 [details] [review] Bug 35604: ConfirmAuto workflow stage
Created attachment 164888 [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.
Created attachment 165135 [details] [review] Bug 35604: Update 'Make an ILL request' link in OPAC search results page
Created attachment 165164 [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 squash to tests
Created attachment 165165 [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
Squashed additional tests for Backends::installed_backends() in the "Add tests" patch. Added unit test files commands to commit message.
Created attachment 165294 [details] [review] Bug 35604: New Backends.pm class. installed_backends method
Created attachment 165295 [details] [review] Bug 35604: New 'ill-backends' syspref type UI rendering of sortable ILL backends
Created attachment 165296 [details] [review] Bug 35604: New AutoILLBackendPriority sys prefs
Created attachment 165297 [details] [review] Bug 35604: ILL request creation with AutoILLBackendPriority enabled
Created attachment 165298 [details] [review] Bug 35604: ConfirmAuto workflow stage
Created attachment 165299 [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
Created attachment 165300 [details] [review] Bug 35604: Update 'Make an ILL request' link in OPAC search results page
Rebase needed after bug 35151 and bug 35568 pushed to main
Created attachment 166897 [details] [review] Bug 35604: New Backends.pm class. installed_backends method
Created attachment 166898 [details] [review] Bug 35604: New 'ill-backends' syspref type UI rendering of sortable ILL backends
Created attachment 166899 [details] [review] Bug 35604: New AutoILLBackendPriority sys prefs
Created attachment 166900 [details] [review] Bug 35604: ILL request creation with AutoILLBackendPriority enabled
Created attachment 166901 [details] [review] Bug 35604: ConfirmAuto workflow stage
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
Created attachment 166903 [details] [review] Bug 35604: Update 'Make an ILL request' link in OPAC search results page
Rebase needed after bug 34655 and bug 36503
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
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!!
Created attachment 166995 [details] [review] Bug 35604: New Backends.pm class. installed_backends method Signed-off-by: David Nind <david@davidnind.com>
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>
Created attachment 166997 [details] [review] Bug 35604: New AutoILLBackendPriority sys prefs Signed-off-by: David Nind <david@davidnind.com>
Created attachment 166998 [details] [review] Bug 35604: ILL request creation with AutoILLBackendPriority enabled Signed-off-by: David Nind <david@davidnind.com>
Created attachment 166999 [details] [review] Bug 35604: ConfirmAuto workflow stage Signed-off-by: David Nind <david@davidnind.com>
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>
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>
(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
Created attachment 171326 [details] [review] Bug 35604: New Backends.pm class. installed_backends method Signed-off-by: David Nind <david@davidnind.com>
Created attachment 171327 [details] [review] Bug 35604: New 'ill-backends' syspref type UI rendering of sortable ILL backends Signed-off-by: David Nind <david@davidnind.com>
Created attachment 171328 [details] [review] Bug 35604: New AutoILLBackendPriority sys prefs Signed-off-by: David Nind <david@davidnind.com>
Created attachment 171329 [details] [review] Bug 35604: ILL request creation with AutoILLBackendPriority enabled Signed-off-by: David Nind <david@davidnind.com>
Created attachment 171330 [details] [review] Bug 35604: ConfirmAuto workflow stage Signed-off-by: David Nind <david@davidnind.com>
Created attachment 171331 [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>
Created attachment 171332 [details] [review] Bug 35604: Update 'Make an ILL request' link in OPAC search results page Signed-off-by: David Nind <david@davidnind.com>
Created attachment 174515 [details] [review] Bug 35604: New Backends.pm class. installed_backends method Signed-off-by: David Nind <david@davidnind.com>
Created attachment 174516 [details] [review] Bug 35604: New 'ill-backends' syspref type UI rendering of sortable ILL backends Signed-off-by: David Nind <david@davidnind.com>
Created attachment 174517 [details] [review] Bug 35604: New AutoILLBackendPriority sys prefs Signed-off-by: David Nind <david@davidnind.com>
Created attachment 174518 [details] [review] Bug 35604: atomicupdate
Created attachment 174519 [details] [review] Bug 35604: ILL request creation with AutoILLBackendPriority enabled Signed-off-by: David Nind <david@davidnind.com>
Created attachment 174520 [details] [review] Bug 35604: ConfirmAuto workflow stage Signed-off-by: David Nind <david@davidnind.com>
Created attachment 174521 [details] [review] Bug 35604: Update 'Make an ILL request' link in OPAC search results page Signed-off-by: David Nind <david@davidnind.com>
Created attachment 174522 [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>
Created attachment 174524 [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>
Created attachment 174792 [details] [review] Bug 35604: Follow-up Consider success message from backend and present it. Add btn-primary class to auto ILL screen
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
Created attachment 175828 [details] [review] Bug 35604: New Backends.pm class. installed_backends method Signed-off-by: David Nind <david@davidnind.com>
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>
Created attachment 175830 [details] [review] Bug 35604: New AutoILLBackendPriority sys prefs Signed-off-by: David Nind <david@davidnind.com>
Created attachment 175831 [details] [review] Bug 35604: atomicupdate
Created attachment 175832 [details] [review] Bug 35604: ILL request creation with AutoILLBackendPriority enabled Signed-off-by: David Nind <david@davidnind.com>
Created attachment 175833 [details] [review] Bug 35604: ConfirmAuto workflow stage Signed-off-by: David Nind <david@davidnind.com>
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>
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>
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
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.
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
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