Bug 12609 - Replace use of DBI in C4::Ratings with DBIx::Class
Summary: Replace use of DBI in C4::Ratings with DBIx::Class
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Kyle M Hall
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 12608 13998
  Show dependency treegraph
 
Reported: 2014-07-18 14:41 UTC by Kyle M Hall
Modified: 2015-12-03 22:11 UTC (History)
2 users (show)

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


Attachments
Bug 12609 - Replace use of DBI in C4::Ratings with DBIx::Class (4.76 KB, patch)
2014-07-18 14:42 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 12609 - Replace use of DBI in C4::Ratings with DBIx::Class (4.76 KB, patch)
2014-07-18 14:43 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 12609 - Replace use of DBI in C4::Ratings with DBIx::Class (4.81 KB, patch)
2014-07-18 14:44 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 12609 - Replace use of DBI in C4::Ratings with DBIx::Class (4.87 KB, patch)
2014-07-18 14:45 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 12609 - Replace use of DBI in C4::Ratings with DBIx::Class (4.93 KB, patch)
2014-08-29 14:42 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 12609: Add some unit tests for C4::Ratings (5.62 KB, patch)
2014-08-29 14:53 UTC, Jonathan Druart
Details | Diff | Splinter Review
[PASSED QA] Bug 12609 - Replace use of DBI in C4::Ratings with DBIx::Class (5.16 KB, patch)
2014-09-07 23:01 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 12609: Add some unit tests for C4::Ratings (5.69 KB, patch)
2014-09-07 23:02 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 Kyle M Hall 2014-07-18 14:41:34 UTC
We should replace the use of DBI in C4::Ratings with DBIC instead.
Comment 1 Kyle M Hall 2014-07-18 14:42:33 UTC Comment hidden (obsolete)
Comment 2 Kyle M Hall 2014-07-18 14:43:40 UTC Comment hidden (obsolete)
Comment 3 Kyle M Hall 2014-07-18 14:44:37 UTC Comment hidden (obsolete)
Comment 4 Kyle M Hall 2014-07-18 14:45:41 UTC Comment hidden (obsolete)
Comment 5 Jonathan Druart 2014-08-29 14:42:24 UTC Comment hidden (obsolete)
Comment 6 Jonathan Druart 2014-08-29 14:53:13 UTC Comment hidden (obsolete)
Comment 7 Katrin Fischer 2014-09-07 23:01:51 UTC
Created attachment 31449 [details] [review]
[PASSED QA] Bug 12609 - Replace use of DBI in C4::Ratings with DBIx::Class

Test Plan:
1) Apply this patch
2) prove t/db_dependent/Ratings.t
3) Note all unit tests pass

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Also tested:
- Adding a rating
- Rating displayed on detail
- Rating displayed on results
- Modifying a rating
- Change displayed correctly on detail and results
Comment 8 Katrin Fischer 2014-09-07 23:02:04 UTC
Created attachment 31450 [details] [review]
[PASSED QA] Bug 12609: Add some unit tests for C4::Ratings

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Comment 9 Tomás Cohen Arazi 2014-09-18 01:12:20 UTC
Patches pushed to master.

Thanks Kyle and Jonathan!
Comment 10 Jonathan Druart 2015-04-15 11:11:16 UTC
(In reply to Tomás Cohen Arazi from comment #9)
> Patches pushed to master.
> 
> Thanks Kyle and Jonathan!

This breaks opac-ratings-ajax.pl:
opac-ratings-ajax.pl: Can't locate object method "new" via package "Koha::Database" (perhaps you forgot to load "Koha::Database"?) at /home/koha/src/C4/Ratings.pm line 206.
Comment 11 Jonathan Druart 2015-04-15 11:17:16 UTC
(In reply to Jonathan Druart from comment #10)
> (In reply to Tomás Cohen Arazi from comment #9)
> > Patches pushed to master.
> > 
> > Thanks Kyle and Jonathan!
> 
> This breaks opac-ratings-ajax.pl:
> opac-ratings-ajax.pl: Can't locate object method "new" via package
> "Koha::Database" (perhaps you forgot to load "Koha::Database"?) at
> /home/koha/src/C4/Ratings.pm line 206.

Actually it's not introduced by this patch, the issue does not exist on 3.18.x