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

--- Comment #32 from Tomás Cohen Arazi (tcohen) <[email protected]> ---
Created attachment 173077
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173077&action=edit
Bug 34784: Add RPC route for updating item callnumbers for a biblio

This patch takes the idea implemented on the original patch, moves it to
the /rpc namespace to make it clear this is not a RESTful endpoint.

Code gets improved a bit, using some patterns we are using nowadays.
The return value gets a bit more information and.

A big change is it now uses `Koha::Items->batch_update`. It originally
used `Koha::Items->update` with the `no_trigger` option. It felt like
`batch_update` is a bit more smart in terms of triggering indexing at
the end of the update, and only for the host biblio.

It looks like that was the spirit of the original implementation, but
missed to actually trigger indexing at the end of the call.

To test:
1. Apply this patches
2.Run:
   $ ktd --shell
  k$ yarn api:bundle
  k$ restart_all
3. Run the tests:
  k$ prove t/db_dependent/api/v1/rpc/biblios.t
=> SUCCESS: Tests pass!
4. Try the new routes with Postman or your favourite tool (if they don't
   match)
=> SUCCESS: The desired behavior is what you get.
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <[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