We should replace the use of DBI in C4::Ratings with DBIC instead.
Created attachment 29846 [details] [review] 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
Created attachment 29847 [details] [review] 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
Created attachment 29848 [details] [review] 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
Created attachment 29849 [details] [review] 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
Created attachment 31293 [details] [review] 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>
Created attachment 31294 [details] [review] Bug 12609: Add some unit tests for C4::Ratings Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
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
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>
Patches pushed to master. Thanks Kyle and Jonathan!
(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.
(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