Bug 8617

Summary: Problem with display of comments waiting for moderation in OPAC
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: OPACAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Mason James <mtj>
Severity: normal    
Priority: P5 - low CC: chris, julian.maurice, mtj, paul.poulain
Version: 3.8   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 8617 - Problem with display of comments waiting for moderation in OPAC
[SIGNED-OFF] Bug 8617 - Problem with display of comments waiting for moderation in OPAC
Bug 8617 - Problem with display of comments waiting for moderation in OPAC

Description Katrin Fischer 2012-08-10 05:58:35 UTC
To test:

1) Check you have comments activated (system preference: reviewson)

2) Add a comment to a record in the OPAC. 

The comment is shown with a light green background and the message:
Your comment (preview, pending approval)

3) Refresh the page.

Problem: The comment will no longer be shown to the logged in user.

4) Go into staff and approve the comment. (Tools > Comments)

5) Refresh the page in OPAC again.

The comment shows up as "Your comment" correctly.

6) Edit the comment and change the text.

Problem: Now 2 entries are shown in the comment list. One "Your comment" with the original text and one "Your comment (preview, pending approval)" with the edited text. It's confusing and looks like a new comment has been added.

7) Refresh the page.

Problem: Both comments are gone.

8) Go into staff and approve the edited comment again.

The edited comment is back and visible.

I think the behaviour on refreshing the page is confusing to the patron. The comments should show in their current state whenever I get to the page while being logged in.
Comment 1 Owen Leonard 2012-08-16 19:25:08 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2012-08-16 19:37:22 UTC
The reason new and edited comments disappear when you refresh the page is that the only reason they appear on the page in the first place is because they're added by JavaScript when you submit them.

I don't see any reason not to display unapproved comments by the logged-in user. I suppose it means adding an optional borrowernumber parameter to getallreviews so that we can ask for comments where approved = 1 OR borrowernumber = {borrowernumber}
Comment 3 Julian Maurice 2012-08-21 15:01:56 UTC
Created attachment 11720 [details] [review]
[SIGNED-OFF] Bug 8617 - Problem with display of comments waiting for moderation in OPAC

Works as expected.
Comment 4 Mason James 2012-09-14 13:06:06 UTC Comment hidden (obsolete)
Comment 5 Mason James 2012-09-14 13:09:10 UTC
(In reply to comment #3)
> Created attachment 11720 [details] [review]
> [SIGNED-OFF] Bug 8617 - Problem with display of comments waiting for
> moderation in OPAC
> 
> Works as expected.

patch looks good, passing QA…

$ koha-qa.pl  

testing 1 commit(s) (applied to commit 0acebb8)
 * 1834255 Bug 8617 - Problem with display of comments waiting for moderatio
      koha-tmpl/opac-tmpl/prog/en/modules/opac-review.tt

* koha-tmpl/opac-tmpl/prog/en/modules/opac-review.tt                       OK
Comment 6 Paul Poulain 2012-09-15 05:39:14 UTC
Patch pushed to master
Comment 7 Chris Cormack 2012-09-25 02:06:08 UTC
Pushed to 3.8.x, will be in 3.8.6