[Koha-bugs] [Bug 1985] Email notification of new OPAC comments

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Apr 24 00:23:26 CEST 2018


M. Tompsett <mtompset at hotmail.com> changed:

           What    |Removed                     |Added
  Attachment #74763|0                           |1
        is obsolete|                            |

--- Comment #74 from M. Tompsett <mtompset at hotmail.com> ---
Created attachment 74770
Bug 1985: Send email alert when comment posted.

Many blog systems have a feature where the admin gets
an email when someone posts a new comment that needs
to be moderated. It would be nice to incorporate this
into Koha. Ideally, you could set an email address in
system preferences where notifications should be sent
(since the Koha administrator is probably not the one
approving comments). The body of the email would contain
the comments, and offer a direct link to approve or delete
the comment.

The authorship was corrected to Olli-Antti Kivilahti.

In comment #11, it was mentioned that title and
biblionumber from the biblio table were not available as
variables in the letter.

This corrects this by converting the parameter list to a
hashref, and adding the missing biblio number.

It also cleans up the license on C4/Review.pm to be in line
with the current coding guidelines license. Also strict and
warning have been changed to the 'Use Modern::Perl;' now.

Additionally, <<reviews.reviewid>> is now usable in the
letter, as is <<staffClientBaseURL>>. These were required
additions, because comment #1 expressly says there should
be a direct link to approve or delete. I also included
a review everything link, since there could be multiple
comments outstanding.

The default letter was tweaked as well to reflect these

Fixed bad URLs as noted in comment #26.

1) Create test branch and apply patch
2) run installer/data/mysql/updatedatabase.pl
   -- this will add the required default letter.
3) In the staff client:
   a) set the CommentModeratorsEmail system preference.
      -- not setting it will mean you won't get any queued
   a) set the staffClientBaseURL system preference.
      -- not setting it will mean your email links won't be
         valid (i.e http:///...).
   b) modify the COMMENT_CREATED default letter as desired.
      -- feel free to add other things.
4) In the OPAC:
   a) Log in
   b) Find something
   c) Click on the 'Comments' tab
      -- Holdings/Title notes/Comments (#) is at the bottom
   d) Click 'Post or edit your comments on this item'
   e) In the window that pops up, type your comment.
   f) Click 'Submit and close this window'.
   g) Click 'Edit' and repeat steps e and f again.
5) In a mysql client:
   a) Open the koha database
   b) SELECT * FROM message_queue WHERE letter_code='COMMENT_CREATED';
      -- There should be at least two.
      -- They should be able to contain the borrower number, biblio
         title, and other borrower and biblio related things.
      -- Comments are at a biblio level, so items, and issues don't
         make sense as variables for the letter.
      -- Confirm the URLs are valid by pasting into a browser.
6) prove -v t/db_dependent/Koha/Reviews.t
   -- six new tests should run.
7) Run the koha qa test tool.

You are receiving this mail because:
You are watching all bug changes.

More information about the Koha-bugs mailing list