https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40850 Bug ID: 40850 Summary: Add `Koha::ILL::Request->add_or_update_attributes` Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: ILL Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org CC: lisette@bywatersolutions.com, pedro.amorim@openfifth.co.uk, tomascohen@gmail.com Currently, ILL backends and plugins must implement custom logic to update existing extended attributes on ILL requests, as the core extended_attributes() method only supports adding new attributes and throws duplicate key errors when attempting to update existing ones. This has led to code duplication across multiple ILL plugins (Rapido, INNReach, SLNP) that all implement identical add_or_update_attributes() methods, and forces the Standard backend to use error-prone patterns when managing request metadata. The proposed `add_or_update_attributes()` method in Koha::ILL::Request would provide a safe, efficient way to add new attributes or update existing ones in a single operation, eliminating duplicate key errors and reducing code duplication. This enhancement would immediately benefit the Standard backend (which currently as 6+ locations using the problematic pattern), allow existing plugins to remove their custom implementations, improve performance by only updating attributes when values actually change, and provide a cleaner API for all ILL backend developers. The implementation follows proven patterns already tested in production plugins an d maintains full backward compatibility while solving a common pain point in ILL development. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.