Bug 5503 - comments shouldn't show patron's full name
Summary: comments shouldn't show patron's full name
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: 3.8
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Jonathan Druart
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-15 15:25 UTC by Nicole C. Engard
Modified: 2013-12-05 20:05 UTC (History)
6 users (show)

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


Attachments
Proposed fix (9.21 KB, patch)
2011-12-16 21:38 UTC, Owen Leonard
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 5503 - comments shouldn't show patron's full name (9.45 KB, patch)
2011-12-17 18:03 UTC, Nicole C. Engard
Details | Diff | Splinter Review
Proposed fix, revised (9.56 KB, patch)
2012-01-17 20:00 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 5503 [REVISED] comments shouldn't show patron's full name (9.55 KB, patch)
2012-02-13 17:41 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 5503 [REVISED] comments shouldn't show patron's full name (9.58 KB, patch)
2012-02-27 13:32 UTC, Owen Leonard
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 5503 [REVISED] comments shouldn't show patron's full name (9.67 KB, patch)
2012-02-27 14:00 UTC, Nicole C. Engard
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 5503 [REVISED] comments shouldn't show patron's full name (9.66 KB, patch)
2012-03-01 15:23 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 Nicole C. Engard 2010-12-15 15:25:09 UTC
When leaving comments in the OPAC it shows the patron's full name.  This is done without asking the patron if they approve of sharing that info. Either it should show the first name last initial, patron initials, or should give the patrons a choose of what name to show (like on most blogging applications).  No matter what we shouldn't show the full name of the patron on the OPAC for all to see without asking them if it's okay.
Comment 1 Owen Leonard 2010-12-15 15:33:50 UTC
See also http://wiki.koha-community.org/wiki/OPAC_Comments_RFC, specifically this proposal:

In the OPAC the name displays currently would like to change that to a system preference offering display choices:
   o First and last name, First name, Last name, First name with Last Initial, none, nick, or login ID.
Comment 2 Nicole C. Engard 2011-02-22 12:45:38 UTC
Just for the record:

In file "opac-details.tmpl", line 692 :
            <h5>
                Comment by
                <!-- TMPL_VAR NAME="title" -->
                <!-- TMPL_VAR NAME="firstname" -->
                <!-- TMPL_VAR NAME="surname" -->
            </h5>


This is something I could probably tackle today (we'll see if I get distracted with other work).
Comment 3 Katrin Fischer 2011-12-13 15:13:07 UTC

*** This bug has been marked as a duplicate of bug 5897 ***
Comment 4 Nicole C. Engard 2011-12-13 15:14:37 UTC
This is not a duplicate - this asks for an enhancement to the preference about showing names - allowing the library to choose how the name displays.
Comment 5 Owen Leonard 2011-12-16 21:38:23 UTC Comment hidden (obsolete)
Comment 6 Nicole C. Engard 2011-12-17 18:03:19 UTC Comment hidden (obsolete)
Comment 7 Ian Walls 2011-12-21 22:13:17 UTC
Mostly a template change, making use of SWITCH (which we may not have access to in Perl 5.10, but we do in T:T!).  Provides a plethora of options, and is easily extensible should need others.

Marking Passed QA
Comment 8 Paul Poulain 2011-12-27 17:25:55 UTC
Changing severity, it's more an ENH than a bugfix
Comment 9 Paul Poulain 2012-01-10 22:23:45 UTC
QA comment 
Well, it seems this patch has not be tested. When upgrading, I get a mySQL error:

    [Tue Jan 10 23:19:12 2012] updatedatabase.pl: DBD::mysql::db do failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's identity is presented alongside comments in the OPAC', `type` = 'Choice' WHER' at line 1 at /home/paul/koha.dev/koha-community/installer/data/mysql/updatedatabase.pl line 4610.
    [Tue Jan 10 23:19:12 2012] updatedatabase.pl: DBD::mysql::db do failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's identity is presented alongside comments in the OPAC', `type` = 'Choice' WHER' at line 1 at /home/paul/koha.dev/koha-community/installer/data/mysql/updatedatabase.pl line 4611.


Looking at the code, I see :
    $dbh->do(" UPDATE  `koha`.`systempreferences` SET  `value` =  'none', `options` =  'none|full|first|surname|firstandinitial|username', `explanation` =  'Choose how a commenter\'s identity is presented alongside comments in the OPAC', `type` =  'Choice' WHERE  `systempreferences`.`variable` =  'ShowReviewer' AND `systempreferences`.`variable` = 0");

Should be commenter''s I think.

Also note, as you'll have to send a follow-up that ` should be removed from table & column names, it's a mysql-ism

thx
Comment 10 Owen Leonard 2012-01-17 20:00:07 UTC Comment hidden (obsolete)
Comment 11 Adrien SAURAT 2012-02-03 09:41:24 UTC
The database name is mentionned in the updatedatabase, my DB has a different name and the update failed.

Would be good to replace `koha`.`systempreferences` by systempreferences (and remove the others ` characters).

I'll get back to sign off asap, but as I was testing the pre-patch fonctionnality, I couldn't see the commenter's name in OPAC even when the ShowReviewer systempreference was activated. Am I missing something needed to activate this?
Comment 12 Owen Leonard 2012-02-13 17:41:31 UTC Comment hidden (obsolete)
Comment 13 Nicole C. Engard 2012-02-14 19:47:04 UTC
Owen,

Does the revised patch need a sign off again? It says I signed off on the patch that is attached so I'm confused.

Nicole
Comment 14 Owen Leonard 2012-02-14 19:53:01 UTC
(In reply to comment #13)

> Does the revised patch need a sign off again? It says I signed off on the patch
> that is attached so I'm confused.

Sorry, that must have been my mistake during preparing the patch. The patch does include (minor) revisions, so another signoff is in order.
Comment 15 Nicole C. Engard 2012-02-26 21:08:53 UTC
Bug 5503 [REVISED] comments shouldn't show patron's full name
Apply? [yn] y

Applying: Bug 5503 [REVISED] comments shouldn't show patron's full name
error: patch failed: installer/data/mysql/updatedatabase.pl:4678
error: installer/data/mysql/updatedatabase.pl: patch does not apply
Patch failed at 0001 Bug 5503 [REVISED] comments shouldn't show patron's full name
When you have resolved this problem run "git am --resolved".
If you would prefer to skip this patch, instead run "git am --skip".
To restore the original branch and stop patching run "git am --abort".
Patch left in /tmp/Bug-5503-REVISED-comments-shouldnt-show-patrons-fu-tt1qCP.patch
nengard@kohavm:~/kohaclone$
Comment 16 Owen Leonard 2012-02-27 13:32:56 UTC Comment hidden (obsolete)
Comment 17 Owen Leonard 2012-02-27 13:36:57 UTC
Okay, yeah, that still says signed off. Hm. Anyway, the conflict was a garden-variety updatedatabase conflict. The new patch has been rebased against current master.
Comment 18 Nicole C. Engard 2012-02-27 14:00:51 UTC Comment hidden (obsolete)
Comment 19 Jonathan Druart 2012-03-01 15:23:20 UTC
Created attachment 7968 [details] [review]
[SIGNED-OFF] Bug 5503 [REVISED] comments shouldn't show patron's full name

Rebased patch (conflicts in updatedatabase.pl)

marked as Passed QA
Comment 20 Jared Camins-Esakov 2012-12-31 00:42:08 UTC
There have been no further reports of problems so I am marking this bug resolved.