Summary: | ILL - Save the fact that copyright clearance has been confirmed by the patron | ||
---|---|---|---|
Product: | Koha | Reporter: | Pedro Amorim <pedro.amorim> |
Component: | ILL | Assignee: | Pedro Amorim <pedro.amorim> |
Status: | Pushed to main --- | QA Contact: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | david, lisette, martin.renvoize, n.halford-busby, pedro.amorim, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | --- | Documentation contact: | |
Documentation submission: | Text to go in the release notes: |
This enhancement to copyright clearance for interlibrary loan requests:
- records the copyright clearance in the database (it previously wasn't)
- shows the message "Patron has confirmed copyright clearance for this request" on the request page
(This requires text in the ILLModuleCopyrightClearance HTML customization.)
|
|
Version(s) released in: |
25.11.00
|
Circulation function: | |
Bug Depends on: | |||
Bug Blocks: | 40850 | ||
Attachments: |
Bug 40262: Save and display copyrightclearance_confirmed
Bug 40262: Save and display copyrightclearance_confirmed Bug 40262: (QA follow-up): Fix compatibility with ILLOpacUnauthenticatedRequest Bug 40262: Save and display copyrightclearance_confirmed Bug 40262: (QA follow-up): Fix compatibility with ILLOpacUnauthenticatedRequest Bug 40262: (follow-up) Refactor copyright clearance to use dedicated methods Bug 40262: (follow-up) Refactor copyright clearance to use dedicated methods |
Description
Pedro Amorim
2025-06-27 14:00:57 UTC
Created attachment 183607 [details] [review] Bug 40262: Save and display copyrightclearance_confirmed Test plan, k-t-d: 1) Enable ILLModule 2) Add a new HTML customization, visit: <staff_url>/cgi-bin/koha/tools/additional-contents.pl?op=add_form&category=html_customizations&editmode=wysiwyg 3) Pick ILLModuleCopyrightClearance as the 'Display location' 4) Pick a 'Publication date' in the past 5) Add a title and content. Save. 6) Create a new ILL request in the OPAC, visit: <opac_url>/cgi-bin/koha/opac-illrequests.pl?op=add_form&backend=Standard 7) Notice the copyright clearance step is shown. Click 'Yes'. 8) Enter a 'type' and (optionally) some metadata. Click 'Create'. 9) Go back to the module in Staff UI and pick the request just created through the OPAC, visit: <staff_url>/cgi-bin/koha/ill/ill-requests.pl 10) Notice the message 'Patron has confirmed copyright clearance for this request' is shown next to the patron in the the request details Created attachment 183662 [details] [review] Bug 40262: Save and display copyrightclearance_confirmed Test plan, k-t-d: 1) Enable ILLModule 2) Add a new HTML customization, visit: <staff_url>/cgi-bin/koha/tools/additional-contents.pl?op=add_form&category=html_customizations&editmode=wysiwyg 3) Pick ILLModuleCopyrightClearance as the 'Display location' 4) Pick a 'Publication date' in the past 5) Add a title and content. Save. 6) Create a new ILL request in the OPAC, visit: <opac_url>/cgi-bin/koha/opac-illrequests.pl?op=add_form&backend=Standard 7) Notice the copyright clearance step is shown. Click 'Yes'. 8) Enter a 'type' and (optionally) some metadata. Click 'Create'. 9) Go back to the module in Staff UI and pick the request just created through the OPAC, visit: <staff_url>/cgi-bin/koha/ill/ill-requests.pl 10) Notice the message 'Patron has confirmed copyright clearance for this request' is shown next to the patron in the the request details Signed-off-by: David Nind <david@davidnind.com> Created attachment 185096 [details] [review] Bug 40262: (QA follow-up): Fix compatibility with ILLOpacUnauthenticatedRequest This patch fixes the copyrightclearance_confirmed not saving if submitting an unauthenticated ILL request. I understand where this is coming from. But I'm now comfortable with this not being baked into a library and tested. Would you agree with a follow-up patch adding a dedicated method in `Koha::ILL::Request` to be called from the controller? (In reply to Tomás Cohen Arazi (tcohen) from comment #4) > I understand where this is coming from. But I'm now comfortable with this > not being baked into a library and tested. Would you agree with a follow-up > patch adding a dedicated method in `Koha::ILL::Request` to be called from > the controller? Yes, of course. Created attachment 186729 [details] [review] Bug 40262: Save and display copyrightclearance_confirmed Test plan, k-t-d: 1) Enable ILLModule 2) Add a new HTML customization, visit: <staff_url>/cgi-bin/koha/tools/additional-contents.pl?op=add_form&category=html_customizations&editmode=wysiwyg 3) Pick ILLModuleCopyrightClearance as the 'Display location' 4) Pick a 'Publication date' in the past 5) Add a title and content. Save. 6) Create a new ILL request in the OPAC, visit: <opac_url>/cgi-bin/koha/opac-illrequests.pl?op=add_form&backend=Standard 7) Notice the copyright clearance step is shown. Click 'Yes'. 8) Enter a 'type' and (optionally) some metadata. Click 'Create'. 9) Go back to the module in Staff UI and pick the request just created through the OPAC, visit: <staff_url>/cgi-bin/koha/ill/ill-requests.pl 10) Notice the message 'Patron has confirmed copyright clearance for this request' is shown next to the patron in the the request details Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> Created attachment 186730 [details] [review] Bug 40262: (QA follow-up): Fix compatibility with ILLOpacUnauthenticatedRequest This patch fixes the copyrightclearance_confirmed not saving if submitting an unauthenticated ILL request. Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> Created attachment 186731 [details] [review] Bug 40262: (follow-up) Refactor copyright clearance to use dedicated methods This patch refactors the copyright clearance confirmation functionality to follow proper separation of concerns by moving business logic from the controller to the model. Changes: - Add set_copyright_clearance_confirmed() method to Koha::ILL::Request - Add get_copyright_clearance_confirmed() method to Koha::ILL::Request - Update controller to use dedicated method instead of direct attribute manipulation - Update staff template to use the new dedicated accessor method - Add comprehensive test coverage for both methods Benefits: - Improved separation of concerns (business logic in model) - Consistency with existing patterns (get_type, get_type_disclaimer_value) - Better reusability and testability - Centralized attribute name management Test plan: 1. Apply patch 2. Run: $ ktd --shell k$ prove t/db_dependent/Koha/ILL/Request/CopyrightClearance.t => SUCCESS: Tests pass! New methods work correctly 3. Test ILL copyright clearance workflow still works: - Enable ILLModule - Create HTML customization for ILLModuleCopyrightClearance - Create OPAC ILL request with copyright clearance - Verify confirmation is saved and displayed in staff interface 4. Sign off :-D Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> Please confirm if you agree with the follow-up patch. Created attachment 186824 [details] [review] Bug 40262: (follow-up) Refactor copyright clearance to use dedicated methods This patch refactors the copyright clearance confirmation functionality to follow proper separation of concerns by moving business logic from the controller to the model. Changes: - Add set_copyright_clearance_confirmed() method to Koha::ILL::Request - Add get_copyright_clearance_confirmed() method to Koha::ILL::Request - Update controller to use dedicated method instead of direct attribute manipulation - Update staff template to use the new dedicated accessor method - Add comprehensive test coverage for both methods Benefits: - Improved separation of concerns (business logic in model) - Consistency with existing patterns (get_type, get_type_disclaimer_value) - Better reusability and testability - Centralized attribute name management Test plan: 1. Apply patch 2. Run: $ ktd --shell k$ prove t/db_dependent/Koha/ILL/Request.t => SUCCESS: Tests pass! New methods work correctly 3. Test ILL copyright clearance workflow still works: - Enable ILLModule - Create HTML customization for ILLModuleCopyrightClearance - Create OPAC ILL request with copyright clearance - Verify confirmation is saved and displayed in staff interface 4. Sign off :-D Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> PA amended: Test file name in commit message Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk> Nice work everyone! Pushed to main for 25.11 |