Created attachment 151031 [details] [review] Bug 33716: New ILLModuleDisclaimerByType sys pref Created attachment 151032 [details] [review] Bug 33716: Preparation New Illrequest::Workflow superclass New Illrequest::Workflow::TypeDisclaimer Moved Illrequest::Availability to Illrequest::Workflow::Availability Removed check for backend capability "should_display_availability" Instead, the check is now done for "can_create_request" backend capability This serves the purpose of having the backend let core know if it can create the request or not. In other words, if the create form has been submitted or not. Created attachment 151033 [details] [review] Bug 33716: ILL Type Disclaimer - Staff Update the way Availability is handled Add the new type disclaimer workflow operation after Availability Created attachment 151034 [details] [review] Bug 33716: ILL Type Disclaimer - OPAC Update the way Availability is handled Add the new type disclaimer workflow operation after Availability Created attachment 151035 [details] [review] Bug 33716: Tests Apply patches, on ktd, preparation: - Run reset_all - Run sh start-ill-dev.sh (copy from https://github.com/ammopt/koha-ill-dev/blob/master/start-ill-dev.sh) Test plan: 1 Go to system preferences, check the new YAML preference ILLModuleDisclaimerByType 2 Copy the bold example YAML text into the system preference input box 3 Go to ILL Requests click "New ILL request" (Pick FreeForm if you have more than one backend installed) 4 Pick type "Journal article", enter "42" in cardnumber and a random library, create. Notice the request is created normally. 5 Go back to the system preferences, remove the "bypass: 1" line, save. 6 Repeat 3 and 4 7 Verify that a Type Disclaimer stage now exists. Verify that the text being presented is the one specified for "article" in the system preference. Submit it. 8 Verify that that the disclaimer value and disclaimer date have been saved as illrequestattributes for that ILL request. 9 Repeat 3 and 4 but with a different type 10 Verify that the text being presented is the one defined in "all" in the system preference Created attachment 151146 [details] [review] Bug 33716: New ILLModuleDisclaimerByType sys pref Created attachment 151147 [details] [review] Bug 33716: Preparation New Illrequest::Workflow superclass New Illrequest::Workflow::TypeDisclaimer Moved Illrequest::Availability to Illrequest::Workflow::Availability Removed check for backend capability "should_display_availability" Instead, the check is now done for "can_create_request" backend capability This serves the purpose of having the backend let core know if it can create the request or not. In other words, if the create form has been submitted or not. Created attachment 151148 [details] [review] Bug 33716: ILL Type Disclaimer - Staff Update the way Availability is handled Add the new type disclaimer workflow operation after Availability Created attachment 151149 [details] [review] Bug 33716: ILL Type Disclaimer - OPAC Update the way Availability is handled Add the new type disclaimer workflow operation after Availability Created attachment 151150 [details] [review] Bug 33716: Tests Testing... Created attachment 151388 [details] [review] Bug 33716: New ILLModuleDisclaimerByType sys pref Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 151389 [details] [review] Bug 33716: Preparation New Illrequest::Workflow superclass New Illrequest::Workflow::TypeDisclaimer Moved Illrequest::Availability to Illrequest::Workflow::Availability Removed check for backend capability "should_display_availability" Instead, the check is now done for "can_create_request" backend capability This serves the purpose of having the backend let core know if it can create the request or not. In other words, if the create form has been submitted or not. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 151390 [details] [review] Bug 33716: ILL Type Disclaimer - Staff Update the way Availability is handled Add the new type disclaimer workflow operation after Availability Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 151391 [details] [review] Bug 33716: ILL Type Disclaimer - OPAC Update the way Availability is handled Add the new type disclaimer workflow operation after Availability Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 151392 [details] [review] Bug 33716: Tests Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 151393 [details] [review] Bug 33716: (follow-up) Amend system preference descrpition and improve formatting This adds some documentation for the different options presented in the example YAML entry and improves formatting a little for better readability of the example. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 151394 [details] [review] Bug 33716: (follow-up) Add cancel links and update breadcrumbs For both staff interface and OPAC: * Update breadcrumbs to have a new entry for the page * Rename button From Next to submit * Add a cancel link to back out Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 151401 [details] [review] Bug 33716: (follow-up) Move sysprefs to new Workflow sub heading Move ILLModuleCopyrightClearance, ILLCheckAvailability, and ILLModuleDisclaimerByType sys prefs Created attachment 151402 [details] [review] Bug 33716: (follow-up) Move sysprefs to new Workflow sub heading Move ILLModuleCopyrightClearance, ILLCheckAvailability, and ILLModuleDisclaimerByType sys prefs State that ILLModuleCopyrightClearance is OPAC only in its description Correct 'bold' reference in ILLModuleDisclaimerByType description Created attachment 151403 [details] [review] Bug 33716: New ILLModuleDisclaimerByType sys pref Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 151404 [details] [review] Bug 33716: Preparation New Illrequest::Workflow superclass New Illrequest::Workflow::TypeDisclaimer Moved Illrequest::Availability to Illrequest::Workflow::Availability Removed check for backend capability "should_display_availability" Instead, the check is now done for "can_create_request" backend capability This serves the purpose of having the backend let core know if it can create the request or not. In other words, if the create form has been submitted or not. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 151405 [details] [review] Bug 33716: ILL Type Disclaimer - Staff Update the way Availability is handled Add the new type disclaimer workflow operation after Availability Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 151406 [details] [review] Bug 33716: ILL Type Disclaimer - OPAC Update the way Availability is handled Add the new type disclaimer workflow operation after Availability Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 151407 [details] [review] Bug 33716: Tests Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 151408 [details] [review] Bug 33716: (follow-up) Amend system preference descrpition and improve formatting This adds some documentation for the different options presented in the example YAML entry and improves formatting a little for better readability of the example. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 151409 [details] [review] Bug 33716: (follow-up) Add cancel links and update breadcrumbs For both staff interface and OPAC: * Update breadcrumbs to have a new entry for the page * Rename button From Next to submit * Add a cancel link to back out Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 151410 [details] [review] Bug 33716: (follow-up) Move sysprefs to new Workflow sub heading Move ILLModuleCopyrightClearance, ILLCheckAvailability, and ILLModuleDisclaimerByType sys prefs State that ILLModuleCopyrightClearance is OPAC only in its description Correct 'bold' reference in ILLModuleDisclaimerByType description Created attachment 151411 [details] [review] Bug 33716: (follow-up) Move sysprefs to new Workflow sub heading Move ILLModuleCopyrightClearance, ILLCheckAvailability, and ILLModuleDisclaimerByType sys prefs State that ILLModuleCopyrightClearance is OPAC only in its description Correct 'bold' reference in ILLModuleDisclaimerByType description Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Minor issues: - Missing DB update - we should add the pref with no value - Koha/Illrequest/Workflow.pm - some copy/paste issues (TypeDisclaimer) - Type_disclaimer_date and Type_disclaimer_value on 'Request details' display over the values, needs styling Created attachment 152809 [details] [review] Bug 33716: (QA follow-up) Add atomic update file Created attachment 152810 [details] [review] Bug 33716: (QA follow-up) Fix copy/paste issues in Workflow.pm Created attachment 152811 [details] [review] Bug 33716: (QA follow-up) Fix styling for Type_disclaimer_date and Type_disclaimer_value on 'Request details' Created attachment 152813 [details] [review] Bug 33716: New ILLModuleDisclaimerByType sys pref Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Created attachment 152814 [details] [review] Bug 33716: Preparation New Illrequest::Workflow superclass New Illrequest::Workflow::TypeDisclaimer Moved Illrequest::Availability to Illrequest::Workflow::Availability Removed check for backend capability "should_display_availability" Instead, the check is now done for "can_create_request" backend capability This serves the purpose of having the backend let core know if it can create the request or not. In other words, if the create form has been submitted or not. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Created attachment 152815 [details] [review] Bug 33716: ILL Type Disclaimer - Staff Update the way Availability is handled Add the new type disclaimer workflow operation after Availability Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Created attachment 152816 [details] [review] Bug 33716: ILL Type Disclaimer - OPAC Update the way Availability is handled Add the new type disclaimer workflow operation after Availability Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Created attachment 152817 [details] [review] Bug 33716: Tests Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Created attachment 152818 [details] [review] Bug 33716: (follow-up) Amend system preference descrpition and improve formatting This adds some documentation for the different options presented in the example YAML entry and improves formatting a little for better readability of the example. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Created attachment 152819 [details] [review] Bug 33716: (follow-up) Add cancel links and update breadcrumbs For both staff interface and OPAC: * Update breadcrumbs to have a new entry for the page * Rename button From Next to submit * Add a cancel link to back out Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Created attachment 152820 [details] [review] Bug 33716: (follow-up) Move sysprefs to new Workflow sub heading Move ILLModuleCopyrightClearance, ILLCheckAvailability, and ILLModuleDisclaimerByType sys prefs State that ILLModuleCopyrightClearance is OPAC only in its description Correct 'bold' reference in ILLModuleDisclaimerByType description Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Created attachment 152821 [details] [review] Bug 33716: (QA follow-up) Add atomic update file Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Created attachment 152822 [details] [review] Bug 33716: (QA follow-up) Fix copy/paste issues in Workflow.pm Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Created attachment 152823 [details] [review] Bug 33716: (QA follow-up) Fix styling for Type_disclaimer_date and Type_disclaimer_value on 'Request details' Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Created attachment 152826 [details] [review] Bug 33716: (QA follow-up) Fix copy/paste issues in Workflow.pm and TypeDisclaimer.pm Signed-off-by: Nick Clemens <nick@bywatersolutions.com> I squashed more minor comment updates to the copy/paste fixes patch and kept your signature in it Nick. Thanks for looking at this! (In reply to Pedro Amorim from comment #47) > I squashed more minor comment updates to the copy/paste fixes patch and kept > your signature in it Nick. Thanks for looking at this! Yeah, nice catch ;-) Thank you, Nick :) Created attachment 154305 [details] [review] Bug 33716: (QA follow-up) Update z39.50 availability search in 'Request from partners' screen Test plan: - Enable ILLCheckAvailability; - Enable ILLModule and install FreeForm - Update partner_code in koha-conf.xml to match the patron category being used ('IL' if on k-t-d) - Install and configure z39.50 availability plugin, link it to the patron ID ('16' if on k-t-d) - Add a valid e-mail address to the patron of 'IL' category - Create a new ILL request and go to 'Manage request' screen - Click 'Place request with partners' notice the label 'Partners available for searching: none' - Apply patch and refresh, notice a 'Search selected partners' button now shows up after you select the partner from the list This is a fix for a regression caused by the rest of the code in this bug. I'm submitting this here since this has not yet been pushed and the fix is quite self-explanatory Created attachment 154454 [details] [review] Bug 33716: (QA follow-up) Fix xt/yaml_valid.t Test plan: Run prove -vv xt/yaml_valid.t Created attachment 154714 [details] [review] Bug 33716: (QA follow-up) Fix submission when cardnumber is invalid Issue that this patch fixes: 1) Enable ILLmodule and install FreeForm, run: bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev.sh) 2) Copy the example YAML text into the system preference input box 3) Create a new FreeForm request and enter a duff borrowernumber e.g. '11111111111111' 4) Click 'Create'. Submit the type disclaimer stage. 5) Notice there's an error 6) Apply this patch. 7) Repeat steps 3 and 4. Verify that the correct 'The borrower details you entered are invalid' error message is displayed instead of the error in 5). Pushed to master for 23.11. Nice work everyone, thanks! New feature not pushed to 23.05.x |
Created attachment 151027 [details] Workflow diagram This new feature should allow the specification of a new custom HTML message alongside a custom authorised values category to be presented to the user after the ILL request has been submitted, on both OPAC and Staff. This should also allow for different specifications for each request type, and a fallback disclaimer if the type of the new ILL request being created does not exist in the new system preference. Once the disclaimer is submitted, the selected value from authorised values category as well as a timestamp should be saved in the database. To implement this, a refactor of the current ILLCheckAvailability system preference is required to make sure this new feature works in harmony, as it's also an extra step the user must take after it has submitted the create request form, but before the request has been saved in the database. Please check the attached diagram.