https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40262

Pedro Amorim <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #186731|0                           |1
        is obsolete|                            |

--- Comment #10 from Pedro Amorim <[email protected]> ---
Created attachment 186824
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186824&action=edit
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 <[email protected]>

PA amended: Test file name in commit message

Signed-off-by: Pedro Amorim <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to