Bug 14553 - Warns when clearing a rating on an item on OPAC
Summary: Warns when clearing a rating on an item on OPAC
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Aleisha Amohia
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-17 03:48 UTC by Aleisha Amohia
Modified: 2017-06-14 22:05 UTC (History)
4 users (show)

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


Attachments
Bug 14553: Silencing warn triggered when clearing item rating on OPAC (1.22 KB, patch)
2015-07-21 21:28 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 14553: Silencing warn triggered when clearing item rating on OPAC (1.34 KB, patch)
2015-11-11 12:54 UTC, Frédéric Demians
Details | Diff | Splinter Review
Bug 14553: Silencing warn triggered when clearing item rating on OPAC (1.34 KB, patch)
2015-11-11 13:29 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Aleisha Amohia 2015-07-17 03:48:34 UTC
opac-ratings-ajax.pl: Use of uninitialized value $rating_value in string eq at /home/vagrant/kohaclone/opac/opac-ratings-ajax.pl line 71

To recreate, search up a record on the OPAC and click on it
Click on the stars to add a rating, then click the minus button on the left to clear it
Notice the warn
Comment 1 Aleisha Amohia 2015-07-21 21:28:11 UTC Comment hidden (obsolete)
Comment 2 Frédéric Demians 2015-11-11 12:54:40 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2015-11-11 13:29:22 UTC
Created attachment 44759 [details] [review]
Bug 14553: Silencing warn triggered when clearing item rating on OPAC

To test:

1) Go to any item and clear the star rating (don't have to set a rating first)
2) Notice the warn
3) Apply patch and reload page
4) Clear star rating
5) Notice no warn
6) Click a star to add a rating
7) Make sure your rating, the average rating and amount of votes are all
   correct
8) Could be beneficial to log in as another user and try to add a rating on the
   same item from their account. Check the average rating is
   cacalculated and amount of votes increases
9) Confirm still no warns

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
  Can see the warning in logs, and its disappearance with this patch.
Comment 4 Tomás Cohen Arazi (tcohen) 2015-11-11 14:12:10 UTC
Patch pushed to master.

Thanks Aleisha!
Comment 5 Frédéric Demians 2015-11-29 20:53:11 UTC
This patch has been pushed to 3.20.x, will be in 3.20.6.
Comment 6 Liz Rea 2016-01-06 21:20:07 UTC
Pushed to 3.18.13, and released.