[Bug 15839] New: Move the reviews related code to Koha::Reviews
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 Bug ID: 15839 Summary: Move the reviews related code to Koha::Reviews Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: ASSIGNED Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: jonathan.druart@bugs.koha-community.org Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org Blocks: 15449 The subroutines in C4::Reviews are only doing CRUD operations. This module can be moved easily to Koha::Reviews. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15449 [Bug 15449] Move stuffs to the Koha namespace -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 48166 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=48166&action=edit Bug 15839: Koha::Reviews - Add Koha::Review[s] classes The subroutines in C4::Reviews are only doing CRUD operations. This patch set moves them to 2 new Koha::Review[s] classes. Test plan for the whole patch set: 0/ Set the reviewson syspref 1/ At the OPAC, create a couple of reviews for a record Try and create a review without html tags different that br b i em big small strong: You should get a warning. 2/ Edit a review 3/ On the Staff interface, you should see a "Comments pending approval" link on the mainpage 4/ Approve 1 review and delete the other 5/ At the OPAC you should only see 1 review (the approved one) in the "Comments" tab 6/ Modify the review 7/ The review should appear again in the "comments awaiting moderation" tab. Note that even the comment has not been changed, it will have to be reapproved (FIXME later). This behavior already existed prior to this patch. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 48167 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=48167&action=edit Bug 15839: Koha::Reviews - Remove getreviews The C4::Reviews::getreviews subroutine retrieved the reviews for a given record, depending on their status. This can be achieve with a call to Koha::Reviews->search. There were 2 calls to this subroutine. The one from opac-ISBDdetail.pl does not look in used: the reviews are not display on this page. It certainly comes from an old copy/paste from opac-detail.pl. The one from opac-detail only asked for the approved reviews. So the logged in user does not see its own review if it is pending approval. Actually this pending approval review is only displayed when the user submits it (because of a unecessary complex text replacement done in JS). With this patch, the approved reviews AND the unaproved review from the logged in user will be displayed. It will allow a future enhancement to add a way to delete our own reviews. Moreover, the reviews were retrieved even if they were not displayed (if reviewson is off), it's now fixed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 48168 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=48168&action=edit Bug 15839: Koha::Reviews - Remove getallreviews -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 48169 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=48169&action=edit Bug 15839: Koha::Reviews - Remove approvereview & unapprovereview This patch adds 2 new methods to Koha::Review: approve and unapprove. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 48170 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=48170&action=edit Bug 15839: Koha::Reviews - Change default value for approved to 0 The reviews.approved column had a default value set to NULL. It does not make sense, the default value should be 0, this will avoid to have to specify the approved value when creating a new review. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 48171 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=48171&action=edit Bug 15839: Koha::Reviews - Remove deletereview Note that a future enhancement should take into account the possible error returned by ->approve, ->unapprove and ->delete -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 48172 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=48172&action=edit Bug 15839: Koha::Reviews - Remove getreview Note that this (biblionumber, borrowernumber) pair should be defined as a unique key at the DB level (FIXME added) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 48173 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=48173&action=edit Bug 15839: Koha::Reviews - Remove getnumberofreviews -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 48174 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=48174&action=edit Bug 15839: Koha::Reviews - Remove updatereview -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 --- Comment #10 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 48175 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=48175&action=edit Bug 15839: Koha::Reviews - Remove savereview -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 --- Comment #11 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 48176 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=48176&action=edit Bug 15839: Koha::Reviews - Remove C4::Review residue -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #48166|0 |1 is obsolete| | --- Comment #12 from Marc Véron <veron@veron.ch> --- Created attachment 48280 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=48280&action=edit Bug 15839: Koha::Reviews - Add Koha::Review[s] classes The subroutines in C4::Reviews are only doing CRUD operations. This patch set moves them to 2 new Koha::Review[s] classes. Test plan for the whole patch set: 0/ Set the reviewson syspref 1/ At the OPAC, create a couple of reviews for a record Try and create a review without html tags different that br b i em big small strong: You should get a warning. 2/ Edit a review 3/ On the Staff interface, you should see a "Comments pending approval" link on the mainpage 4/ Approve 1 review and delete the other 5/ At the OPAC you should only see 1 review (the approved one) in the "Comments" tab 6/ Modify the review 7/ The review should appear again in the "comments awaiting moderation" tab. Note that even the comment has not been changed, it will have to be reapproved (FIXME later). This behavior already existed prior to this patch. Tested all patches together (with database updated) Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #48167|0 |1 is obsolete| | --- Comment #13 from Marc Véron <veron@veron.ch> --- Created attachment 48281 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=48281&action=edit Bug 15839: Koha::Reviews - Remove getreviews The C4::Reviews::getreviews subroutine retrieved the reviews for a given record, depending on their status. This can be achieve with a call to Koha::Reviews->search. There were 2 calls to this subroutine. The one from opac-ISBDdetail.pl does not look in used: the reviews are not display on this page. It certainly comes from an old copy/paste from opac-detail.pl. The one from opac-detail only asked for the approved reviews. So the logged in user does not see its own review if it is pending approval. Actually this pending approval review is only displayed when the user submits it (because of a unecessary complex text replacement done in JS). With this patch, the approved reviews AND the unaproved review from the logged in user will be displayed. It will allow a future enhancement to add a way to delete our own reviews. Moreover, the reviews were retrieved even if they were not displayed (if reviewson is off), it's now fixed. Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #48168|0 |1 is obsolete| | --- Comment #14 from Marc Véron <veron@veron.ch> --- Created attachment 48282 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=48282&action=edit Bug 15839: Koha::Reviews - Remove getallreviews Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #48169|0 |1 is obsolete| | --- Comment #15 from Marc Véron <veron@veron.ch> --- Created attachment 48283 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=48283&action=edit Bug 15839: Koha::Reviews - Remove approvereview & unapprovereview This patch adds 2 new methods to Koha::Review: approve and unapprove. Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #48170|0 |1 is obsolete| | --- Comment #16 from Marc Véron <veron@veron.ch> --- Created attachment 48284 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=48284&action=edit Bug 15839: Koha::Reviews - Change default value for approved to 0 The reviews.approved column had a default value set to NULL. It does not make sense, the default value should be 0, this will avoid to have to specify the approved value when creating a new review. Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #48171|0 |1 is obsolete| | --- Comment #17 from Marc Véron <veron@veron.ch> --- Created attachment 48285 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=48285&action=edit Bug 15839: Koha::Reviews - Remove deletereview Note that a future enhancement should take into account the possible error returned by ->approve, ->unapprove and ->delete Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #48172|0 |1 is obsolete| | --- Comment #18 from Marc Véron <veron@veron.ch> --- Created attachment 48286 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=48286&action=edit Bug 15839: Koha::Reviews - Remove getreview Note that this (biblionumber, borrowernumber) pair should be defined as a unique key at the DB level (FIXME added) Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #48173|0 |1 is obsolete| | --- Comment #19 from Marc Véron <veron@veron.ch> --- Created attachment 48287 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=48287&action=edit Bug 15839: Koha::Reviews - Remove getnumberofreviews Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #48174|0 |1 is obsolete| | --- Comment #20 from Marc Véron <veron@veron.ch> --- Created attachment 48288 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=48288&action=edit Bug 15839: Koha::Reviews - Remove updatereview Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #48175|0 |1 is obsolete| | --- Comment #21 from Marc Véron <veron@veron.ch> --- Created attachment 48289 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=48289&action=edit Bug 15839: Koha::Reviews - Remove savereview Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #48176|0 |1 is obsolete| | --- Comment #22 from Marc Véron <veron@veron.ch> --- Created attachment 48290 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=48290&action=edit Bug 15839: Koha::Reviews - Remove C4::Review residue Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |veron@veron.ch Patch complexity|--- |Medium patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de Status|Signed Off |Patch doesn't apply --- Comment #23 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Please rebase! Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 15839: Koha::Reviews - Add Koha::Review[s] classes Applying: Bug 15839: Koha::Reviews - Remove getreviews Applying: Bug 15839: Koha::Reviews - Remove getallreviews Applying: Bug 15839: Koha::Reviews - Remove approvereview & unapprovereview Applying: Bug 15839: Koha::Reviews - Change default value for approved to 0 Applying: Bug 15839: Koha::Reviews - Remove deletereview fatal: sha1 information is lacking or useless (C4/Review.pm). Repository lacks necessary blobs to fall back on 3-way merge. Cannot fall back to three-way merge. Patch failed at 0001 Bug 15839: Koha::Reviews - Remove deletereview The copy of the patch that failed is found in: /home/katrin/kohaclone/.git/rebase-apply/patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #48280|0 |1 is obsolete| | --- Comment #24 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 51197 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=51197&action=edit Bug 15839: Koha::Reviews - Add Koha::Review[s] classes The subroutines in C4::Reviews are only doing CRUD operations. This patch set moves them to 2 new Koha::Review[s] classes. Test plan for the whole patch set: 0/ Set the reviewson syspref 1/ At the OPAC, create a couple of reviews for a record Try and create a review without html tags different that br b i em big small strong: You should get a warning. 2/ Edit a review 3/ On the Staff interface, you should see a "Comments pending approval" link on the mainpage 4/ Approve 1 review and delete the other 5/ At the OPAC you should only see 1 review (the approved one) in the "Comments" tab 6/ Modify the review 7/ The review should appear again in the "comments awaiting moderation" tab. Note that even the comment has not been changed, it will have to be reapproved (FIXME later). This behavior already existed prior to this patch. Tested all patches together (with database updated) Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #48281|0 |1 is obsolete| | --- Comment #25 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 51198 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=51198&action=edit Bug 15839: Koha::Reviews - Remove getreviews The C4::Reviews::getreviews subroutine retrieved the reviews for a given record, depending on their status. This can be achieve with a call to Koha::Reviews->search. There were 2 calls to this subroutine. The one from opac-ISBDdetail.pl does not look in used: the reviews are not display on this page. It certainly comes from an old copy/paste from opac-detail.pl. The one from opac-detail only asked for the approved reviews. So the logged in user does not see its own review if it is pending approval. Actually this pending approval review is only displayed when the user submits it (because of a unecessary complex text replacement done in JS). With this patch, the approved reviews AND the unaproved review from the logged in user will be displayed. It will allow a future enhancement to add a way to delete our own reviews. Moreover, the reviews were retrieved even if they were not displayed (if reviewson is off), it's now fixed. Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #48282|0 |1 is obsolete| | --- Comment #26 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 51199 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=51199&action=edit Bug 15839: Koha::Reviews - Remove getallreviews Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #48283|0 |1 is obsolete| | --- Comment #27 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 51200 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=51200&action=edit Bug 15839: Koha::Reviews - Remove approvereview & unapprovereview This patch adds 2 new methods to Koha::Review: approve and unapprove. Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #48284|0 |1 is obsolete| | --- Comment #28 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 51201 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=51201&action=edit Bug 15839: Koha::Reviews - Change default value for approved to 0 The reviews.approved column had a default value set to NULL. It does not make sense, the default value should be 0, this will avoid to have to specify the approved value when creating a new review. Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #48285|0 |1 is obsolete| | --- Comment #29 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 51202 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=51202&action=edit Bug 15839: Koha::Reviews - Remove deletereview Note that a future enhancement should take into account the possible error returned by ->approve, ->unapprove and ->delete Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #48286|0 |1 is obsolete| | --- Comment #30 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 51203 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=51203&action=edit Bug 15839: Koha::Reviews - Remove getreview Note that this (biblionumber, borrowernumber) pair should be defined as a unique key at the DB level (FIXME added) Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #48287|0 |1 is obsolete| | --- Comment #31 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 51204 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=51204&action=edit Bug 15839: Koha::Reviews - Remove getnumberofreviews Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #48288|0 |1 is obsolete| | --- Comment #32 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 51205 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=51205&action=edit Bug 15839: Koha::Reviews - Remove updatereview Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #48289|0 |1 is obsolete| | --- Comment #33 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 51206 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=51206&action=edit Bug 15839: Koha::Reviews - Remove savereview Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #48290|0 |1 is obsolete| | --- Comment #34 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 51207 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=51207&action=edit Bug 15839: Koha::Reviews - Remove C4::Review residue Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | CC| |m.de.rooy@rijksmuseum.nl --- Comment #35 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- QA: Looking here now.. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 --- Comment #36 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- qa tools: Processing files after patches fatal: ambiguous argument 'C4/Review.pm': unknown revision or path not in the working tree. Use '--' to separate paths from revisions -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #37 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- QA Comment: If I submit a new review, the approved status will be NULL. But reviewswaiting.pl will not show it: my $status = $query->param('status') || 0; ... my $reviews = Koha::Reviews->search( { approved => $status }, -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off --- Comment #38 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Marcel de Rooy from comment #37)
QA Comment: If I submit a new review, the approved status will be NULL. But reviewswaiting.pl will not show it:
my $status = $query->param('status') || 0; ... my $reviews = Koha::Reviews->search( { approved => $status },
Marcel, This is fixed by "Change default value for approved to 0", please execute the updatedatabase.pl and update the schema. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 --- Comment #39 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Jonathan Druart from comment #38)
(In reply to Marcel de Rooy from comment #37)
QA Comment: If I submit a new review, the approved status will be NULL. But reviewswaiting.pl will not show it:
my $status = $query->param('status') || 0; ... my $reviews = Koha::Reviews->search( { approved => $status },
Marcel, This is fixed by "Change default value for approved to 0", please execute the updatedatabase.pl and update the schema.
QA: Looking again -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 --- Comment #40 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Marc, The é in Véron still makes me crazy. Especially in 11 patches :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #51197|0 |1 is obsolete| | --- Comment #41 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 53794 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53794&action=edit Bug 15839: Koha::Reviews - Add Koha::Review[s] classes The subroutines in C4::Reviews are only doing CRUD operations. This patch set moves them to 2 new Koha::Review[s] classes. Test plan for the whole patch set: 0/ Set the reviewson syspref 1/ At the OPAC, create a couple of reviews for a record Try and create a review without html tags different that br b i em big small strong: You should get a warning. 2/ Edit a review 3/ On the Staff interface, you should see a "Comments pending approval" link on the mainpage 4/ Approve 1 review and delete the other 5/ At the OPAC you should only see 1 review (the approved one) in the "Comments" tab 6/ Modify the review 7/ The review should appear again in the "comments awaiting moderation" tab. Note that even the comment has not been changed, it will have to be reapproved (FIXME later). This behavior already existed prior to this patch. Tested all patches together (with database updated) Signed-off-by: Marc Veron <veron@veron.ch> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #51198|0 |1 is obsolete| | --- Comment #42 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 53795 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53795&action=edit Bug 15839: Koha::Reviews - Remove getreviews The C4::Reviews::getreviews subroutine retrieved the reviews for a given record, depending on their status. This can be achieve with a call to Koha::Reviews->search. There were 2 calls to this subroutine. The one from opac-ISBDdetail.pl does not look in used: the reviews are not display on this page. It certainly comes from an old copy/paste from opac-detail.pl. The one from opac-detail only asked for the approved reviews. So the logged in user does not see its own review if it is pending approval. Actually this pending approval review is only displayed when the user submits it (because of a unecessary complex text replacement done in JS). With this patch, the approved reviews AND the unaproved review from the logged in user will be displayed. It will allow a future enhancement to add a way to delete our own reviews. Moreover, the reviews were retrieved even if they were not displayed (if reviewson is off), it's now fixed. Signed-off-by: Marc Veron <veron@veron.ch> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #51199|0 |1 is obsolete| | --- Comment #43 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 53796 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53796&action=edit Bug 15839: Koha::Reviews - Remove getallreviews Signed-off-by: Marc Veron <veron@veron.ch> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #51200|0 |1 is obsolete| | --- Comment #44 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 53797 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53797&action=edit Bug 15839: Koha::Reviews - Remove approvereview & unapprovereview This patch adds 2 new methods to Koha::Review: approve and unapprove. Signed-off-by: Marc Veron <veron@veron.ch> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #51201|0 |1 is obsolete| | --- Comment #45 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 53798 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53798&action=edit Bug 15839: Koha::Reviews - Change default value for approved to 0 The reviews.approved column had a default value set to NULL. It does not make sense, the default value should be 0, this will avoid to have to specify the approved value when creating a new review. Signed-off-by: Marc Veron <veron@veron.ch> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #51202|0 |1 is obsolete| | --- Comment #46 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 53799 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53799&action=edit Bug 15839: Koha::Reviews - Remove deletereview Note that a future enhancement should take into account the possible error returned by ->approve, ->unapprove and ->delete Signed-off-by: Marc Veron <veron@veron.ch> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #51203|0 |1 is obsolete| | --- Comment #47 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 53800 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53800&action=edit Bug 15839: Koha::Reviews - Remove getreview Note that this (biblionumber, borrowernumber) pair should be defined as a unique key at the DB level (FIXME added) Signed-off-by: Marc Veron <veron@veron.ch> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #51204|0 |1 is obsolete| | --- Comment #48 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 53801 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53801&action=edit Bug 15839: Koha::Reviews - Remove getnumberofreviews Signed-off-by: Marc Veron <veron@veron.ch> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #51205|0 |1 is obsolete| | --- Comment #49 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 53802 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53802&action=edit Bug 15839: Koha::Reviews - Remove updatereview Signed-off-by: Marc Veron <veron@veron.ch> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #51206|0 |1 is obsolete| | --- Comment #50 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 53803 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53803&action=edit Bug 15839: Koha::Reviews - Remove savereview Signed-off-by: Marc Veron <veron@veron.ch> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #51207|0 |1 is obsolete| | --- Comment #51 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 53804 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53804&action=edit Bug 15839: Koha::Reviews - Remove C4::Review residue Signed-off-by: Marc Veron <veron@veron.ch> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 --- Comment #52 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 53805 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53805&action=edit Bug 15839: [QA Follow-up] Update existing rows in dbrev Adding the default is fine for new records; we also should take care of the pending existing ones. Trivial addition to atomic update file. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Tested the dbrev again with existing unapproved reviews. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 --- Comment #53 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 53806 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53806&action=edit Bug 15839: [QA Follow-up] Paging on opac-showreviews Paging is kind of messy here. This patch at least improves somewhat. The page number should be rounded. The results per page should be passed to the template too. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Tested a number of reviews and played with count parameter in URL. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 --- Comment #54 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 53807 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53807&action=edit Bug 15839: [QA Follow-up] Error checking in opac-review.pl [1] Adds a check on biblionumber. (Prevents a DBIx error.) [2] If you have a reviewid, search on that and check results. Add an unauthorized error in template. [3] If you add a new review, check that there is no review yet. If so, edit the existing one. This supports the added FIXME on a unique constraint. Note: This script could receive further attention. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Tested all crud ops with opac-review.pl (incl URL manipulation). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #55 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- qa tools: OK t/db_dependent/Koha/Reviews.t OK Added a follow-up for db rev Loop in opac-detail repeatedly calls GetMember for possibly same borrower? Enabled ShowRecentComments opac-showreviews: Improved paging in a small follow-up. (The count parameter is not kept when paging.) reviewswaiting: When I delete an approved review, the display jumps back to awaiting moderation. Just to mention: If I have two comments on a book, these two icons are weird imo. (Even one, but that is personal taste. :) opac-review: See follow-up Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=17090 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |kyle@bywatersolutions.com --- Comment #56 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to master for 16.11, thanks Jonathan, Marcel! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |19808 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19808 [Bug 19808] Reviews from deleted patrons make few scripts to explode -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |19843 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19843 [Bug 19843] reviews.datereviewed is not set -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=19808 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15839 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=20858 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org