It should always show the Standard form when AutoILLBackendPriority is in use.
Created attachment 190622 [details] [review] Bug 41478: Render Standard form on OPAC if failed_captcha and AutoILLBackendPriority
Created attachment 190623 [details] [review] Bug 41478: Refactor: Readability + Never nester 1) Install the following dummy backend plugin: https://github.com/openfifth/koha-ill-backend-plugin/releases/tag/v2.0.8 2) Sys prefs preparation: Enable ILLModule, ILLOpacUnauthenticatedRequest and check PluginBackend on AutoILLBackendPriority 3) Logout, create a new Unauthenticated ILL request on the OPAC, visit: <opac_url>/cgi-bin/koha/opac-illrequests.pl?op=create&backend=Standard 4) Fill in the mandatory top fields (first name, last name, email address and library) 5) Pick 'Book' for type and enter 'green' in title. This will cause the dummy plugin to be available in the AutoILL logic. 6) At the bottom of the form, on the "Verification" captcha, purposely input a wrong captcha e.g. '123' 7) Click 'Create'. Notice an odd looking form is presented, this is the dummy backend form, but it should present the 'Standard' form when using AutoILLBackendPriority as that was also the form we were presented with originally. This happens because currently it's the backend that delegates back to Koha what template to render. When using AutoILLBackendPriority, however, Koha should handle this template delegation instead and present the Standard form. 8) Apply patches. Repeat test plan. Notice that now on step 7 you get the correct form, and error message (coming from Standard, as expected when using AutoILLBackendPriority). 9) Input the correct captcha this time 10) Confirm the created request landed in the PluginBackend backend.
Created attachment 190890 [details] [review] Bug 41478: Render Standard form on OPAC if failed_captcha and AutoILLBackendPriority
Created attachment 190891 [details] [review] Bug 41478: Refactor: Readability + Never nester 1) Install the following dummy backend plugin: https://github.com/openfifth/koha-ill-backend-plugin/releases/tag/v2.0.9 2) Sys prefs preparation: Enable ILLModule, ILLOpacUnauthenticatedRequest and check PluginBackend on AutoILLBackendPriority 3) Logout, create a new Unauthenticated ILL request on the OPAC, visit: <opac_url>/cgi-bin/koha/opac-illrequests.pl?op=create&backend=Standard 4) Fill in the mandatory top fields (first name, last name, email address and library) 5) Pick 'Book' for type and enter 'green' in title. This will cause the dummy plugin to be available in the AutoILL logic. 6) At the bottom of the form, on the "Verification" captcha, purposely input a wrong captcha e.g. '123' 7) Click 'Create'. Notice an odd looking form is presented, this is the dummy backend form, but it should present the 'Standard' form when using AutoILLBackendPriority as that was also the form we were presented with originally. This happens because currently it's the backend that delegates back to Koha what template to render. When using AutoILLBackendPriority, however, Koha should handle this template delegation instead and present the Standard form. 8) Apply patches. Repeat test plan. Notice that now on step 7 you get the correct form, and error message (coming from Standard, as expected when using AutoILLBackendPriority). 9) Input the correct captcha this time 10) Confirm the created request landed in the PluginBackend backend.
Created attachment 190947 [details] [review] Bug 41478: Render Standard form on OPAC if failed_captcha and AutoILLBackendPriority Signed-off-by: David Nind <david@davidnind.com>
Created attachment 190948 [details] [review] Bug 41478: Refactor: Readability + Never nester 1) Install the following dummy backend plugin: https://github.com/openfifth/koha-ill-backend-plugin/releases/tag/v2.0.9 2) Sys prefs preparation: Enable ILLModule, ILLOpacUnauthenticatedRequest and check PluginBackend on AutoILLBackendPriority 3) Logout, create a new Unauthenticated ILL request on the OPAC, visit: <opac_url>/cgi-bin/koha/opac-illrequests.pl?op=create&backend=Standard 4) Fill in the mandatory top fields (first name, last name, email address and library) 5) Pick 'Book' for type and enter 'green' in title. This will cause the dummy plugin to be available in the AutoILL logic. 6) At the bottom of the form, on the "Verification" captcha, purposely input a wrong captcha e.g. '123' 7) Click 'Create'. Notice an odd looking form is presented, this is the dummy backend form, but it should present the 'Standard' form when using AutoILLBackendPriority as that was also the form we were presented with originally. This happens because currently it's the backend that delegates back to Koha what template to render. When using AutoILLBackendPriority, however, Koha should handle this template delegation instead and present the Standard form. 8) Apply patches. Repeat test plan. Notice that now on step 7 you get the correct form, and error message (coming from Standard, as expected when using AutoILLBackendPriority). 9) Input the correct captcha this time 10) Confirm the created request landed in the PluginBackend backend. Signed-off-by: David Nind <david@davidnind.com>
Worked as expected and all tests passed. The plugin sets all to type journal article, but it appears to be part of the plugin, just testing notes.
Created attachment 192152 [details] [review] Bug 41478: Render Standard form on OPAC if failed_captcha and AutoILLBackendPriority Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Created attachment 192153 [details] [review] Bug 41478: Refactor: Readability + Never nester 1) Install the following dummy backend plugin: https://github.com/openfifth/koha-ill-backend-plugin/releases/tag/v2.0.9 2) Sys prefs preparation: Enable ILLModule, ILLOpacUnauthenticatedRequest and check PluginBackend on AutoILLBackendPriority 3) Logout, create a new Unauthenticated ILL request on the OPAC, visit: <opac_url>/cgi-bin/koha/opac-illrequests.pl?op=create&backend=Standard 4) Fill in the mandatory top fields (first name, last name, email address and library) 5) Pick 'Book' for type and enter 'green' in title. This will cause the dummy plugin to be available in the AutoILL logic. 6) At the bottom of the form, on the "Verification" captcha, purposely input a wrong captcha e.g. '123' 7) Click 'Create'. Notice an odd looking form is presented, this is the dummy backend form, but it should present the 'Standard' form when using AutoILLBackendPriority as that was also the form we were presented with originally. This happens because currently it's the backend that delegates back to Koha what template to render. When using AutoILLBackendPriority, however, Koha should handle this template delegation instead and present the Standard form. 8) Apply patches. Repeat test plan. Notice that now on step 7 you get the correct form, and error message (coming from Standard, as expected when using AutoILLBackendPriority). 9) Input the correct captcha this time 10) Confirm the created request landed in the PluginBackend backend. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Nice work everyone! Pushed to main for 26.05