Bug 16961 - Add the Koha::Objects->update method
Summary: Add the Koha::Objects->update method
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 13019
Blocks: 16965 16966 17091
  Show dependency treegraph
 
Reported: 2016-07-22 12:55 UTC by Jonathan Druart
Modified: 2017-12-07 22:16 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 16961: Add Koha::Objects->update (2.62 KB, patch)
2016-07-22 13:00 UTC, Jonathan Druart
Details | Diff | Splinter Review
[SIGNED-OFF]Bug 16961: Add Koha::Objects->update (2.72 KB, patch)
2016-07-22 16:07 UTC, Héctor Eduardo Castro Avalos
Details | Diff | Splinter Review
[PASSED QA] Bug 16961: Add Koha::Objects->update (2.77 KB, patch)
2016-09-18 14:45 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2016-07-22 12:55:56 UTC
In order to update several rows in a single query, we need this new method.
Comment 1 Jonathan Druart 2016-07-22 13:00:59 UTC Comment hidden (obsolete)
Comment 2 Héctor Eduardo Castro Avalos 2016-07-22 16:07:48 UTC
Created attachment 53655 [details] [review]
[SIGNED-OFF]Bug 16961: Add Koha::Objects->update

In order to update several rows in a single query, we need this new
method.

Test plan:
Confirm that the changes in Objects.t make sense and that the tests
pass.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Test passed successfully
Comment 3 Marcel de Rooy 2016-07-22 16:47:18 UTC
Time for an AUTOLOAD ?
Comment 4 Jonathan Druart 2016-07-22 17:17:52 UTC
(In reply to Marcel de Rooy from comment #3)
> Time for an AUTOLOAD ?

Yes, it's in my todo list :) I have just needed it for bug 16966 and did not want to add a 'big' blocker.
Comment 5 Katrin Fischer 2016-09-18 14:36:49 UTC
Hm, big dependency tree starting here.
Comment 6 Katrin Fischer 2016-09-18 14:43:21 UTC
I am not sure if this line still makes sense... 
Koha::Cities->search( { city_country => 'UK' } )->update( { city_country => 'EU' } );
But the test works :)
Comment 7 Katrin Fischer 2016-09-18 14:45:01 UTC
Created attachment 55654 [details] [review]
[PASSED QA] Bug 16961: Add Koha::Objects->update

In order to update several rows in a single query, we need this new
method.

Test plan:
Confirm that the changes in Objects.t make sense and that the tests
pass.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Test passed successfully

Signed-off-by: Katrin Fischer  <katrin.fischer@bsz-bw.de>
Comment 8 Kyle M Hall 2016-09-27 13:10:32 UTC
Pushed to master for 16.11, thanks Jonathan!