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

Martin Renvoize (ashimema) <[email protected]> changed:

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

--- Comment #6 from Martin Renvoize (ashimema) 
<[email protected]> ---
Created attachment 186757
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186757&action=edit
Bug 40850: (follow-up) Use add_or_update_attributes in Standard backend

This patch updates the Standard ILL backend to use the new
add_or_update_attributes() method instead of the problematic
extended_attributes() method that only supports adding new
attributes.

Changes:
- Request creation: Use add_or_update_attributes() for setting metadata
- Request migration: Use add_or_update_attributes() for copying attributes

Benefits:
- Eliminates duplicate key errors when updating existing requests
- Cleaner code - removes array-to-hash conversion boilerplate
- More efficient - only updates attributes when values change
- Consistent with new Koha::ILL::Request API patterns

Locations updated:
- add_request(): Request creation with metadata (line ~1017)
- migrate(): Request migration copying attributes (line ~731)

Test plan:
1. Apply patch
2. Test ILL request creation in Standard backend:
   - Create new ILL request with metadata
   => SUCCESS: Request created with attributes
3. Test ILL request migration:
   - Migrate existing request to new request
   => SUCCESS: Attributes copied correctly
4. Test updating existing request metadata:
   - Edit request and update metadata fields
   => SUCCESS: No duplicate key errors
5. Sign off :-D

Signed-off-by: Martin Renvoize <[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