https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38745 --- Comment #12 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 209597 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=209597&action=edit Bug 38745: Add the biblios.populate_empty_callnumbers RPC method The first RPC method, ported from bug 38226: fill the empty callnumbers of the items of a biblio (or of a single item) from its record. It needs the edit_catalogue permission, and reports a missing biblio or item, a missing itemcallnumber configuration and an empty callnumber in the record as JSON-RPC errors. The proof of concept version of the method in the REST biblios controller is removed. To test: 1. Enable RESTBasicAuth, set itemcallnumber to 082ab and create a biblio with an 082 field and items without a callnumber. 2. POST to /api/v1/rpc as a user with edit_catalogue: {"jsonrpc":"2.0","method":"biblios.populate_empty_callnumbers", "params":{"biblio_id":<id>},"id":1} => the items have the callnumber, listed in the result. 3. Repeat as a user without edit_catalogue => permission denied error. 4. prove t/db_dependent/api/v1/rpc.t t/db_dependent/Koha/RPC.t t/db_dependent/Koha/Biblio.t Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> -- You are receiving this mail because: You are watching all bug changes.