https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42311 --- Comment #11 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 198011 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198011&action=edit Bug 42311: (QA follow-up) Standardise CRUD controllers on new_from_api Two of the four calendar CRUD controllers previously used the $library->calendar->add_* accessor path on POST, while the other two (WeeklyClosures, RepeatingClosures) used Koha::Calendar::*->new_from_api. The accessor path skips new_from_api and therefore skips the API-name to column-name translation: the two styles happen to behave identically today because the spec's field names match column names, but any future divergence would silently break only the two accessor-based endpoints. Switch SingleClosures and ClosureExceptions add() to the new_from_api pattern so all four controllers follow the same Koha REST convention. While here, add the missing "use Scalar::Util qw( blessed );" to every controller in the directory: each was calling blessed() in its catch block without importing it. Test plan: 1. prove t/db_dependent/api/v1/libraries_calendar.t 2. POST /api/v1/libraries/{id}/calendar/single_closures still creates a closure; duplicate POST returns 409 3. POST /api/v1/libraries/{id}/calendar/closure_exceptions same -- You are receiving this mail because: You are watching all bug changes.