Bug 4211 - Acquisitions actions on suggestions don't generate email
Summary: Acquisitions actions on suggestions don't generate email
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: master
Hardware: PC All
: P1 - high major (vote)
Assignee: Chris Cormack
QA Contact: Bugs List
URL:
Keywords:
: 1886 4273 (view as bug list)
Depends on: 5126 5127 7093 7094 7096
Blocks: 1886
  Show dependency treegraph
 
Reported: 2010-02-17 08:03 UTC by Jane Wagner
Modified: 2013-12-05 19:53 UTC (History)
5 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 for HEAD (1.04 KB, patch)
2010-08-12 16:37 UTC, Owen Leonard
Details | Diff | Splinter Review
Followup fix, (includes first patch) (8.03 KB, patch)
2010-08-12 21:46 UTC, Chris Cormack
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Cormack 2010-05-21 01:24:27 UTC


---- Reported by jwagner@ptfs.com 2010-02-17 20:03:01 ----

In previous versions, when a staff person went into Acquisitions, Manage Suggestions and took some action on pending suggestions (accept, reject, etc.), the action generated an email to the patron based on the templates in kohaclone/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion.  Under current head (3.2 alpha, roughly), those emails aren't being generated.  There are no entries in the error log, and these messages don't go through the message queue, so there's nothing to track them by.  The system is generating and sending other types of emails.



--- Bug imported by chris@bigballofwax.co.nz 2010-05-21 01:24 UTC  ---

This bug was previously known as _bug_ 4211 at http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=4211

Unknown operating system Windows 2000. Setting to default OS "All".
Actual time not defined. Setting to 0.0
The original reporter of this bug does not have
   an account here. Reassigning to the person who moved
   it here: chris@bigballofwax.co.nz.
   Previous reporter was jwagner@ptfs.com.
Setting qa contact to the default for this product.
   This bug either had no qa contact or an invalid one.

Comment 1 Owen Leonard 2010-08-12 16:08:27 UTC
On a default installation, there will be no notices defined for suggestions handling (accepted, rejected, etc.)--Bug 5127. In addition, there is no way to add a suggestions notice because that category doesn't exist in the "add notice" form--Bug 5126.

I've tested a fix for Bug 5126, and tried adding a suggestions notice, but the notice still failed:

suggestion.pl: can't enqueue letter HASH(0xa5073c8) at /kohaclone/C4/Suggestions.pm line 394
Comment 2 Owen Leonard 2010-08-12 16:37:32 UTC Comment hidden (obsolete)
Comment 3 Owen Leonard 2010-08-12 18:59:11 UTC
After applying that patch and testing I find that suggestions messages are getting added to the queue, but it doesn't look like the information is being processed correctly.

Some data is missing from the entry in the message_queue table: borrowernumber, to_address, and from_address are NULL.

The content column is populated, but the message includes the placeholders instead of the actual values: <<borrowers.firstname>> <<borrowers.surname>> etc.

I'm not sure where to look next.
Comment 4 Chris Cormack 2010-08-12 21:46:16 UTC
Created attachment 2514 [details] [review]
Followup fix, (includes first patch)
Comment 5 Owen Leonard 2010-08-13 12:46:12 UTC
After applying this patch and testing I'm getting the same results: placeholders in the enqueued message and NULL values for to_address and from_address.

We also have a problem with the options available for building the suggestions notices:

/cgi-bin/koha/tools/letter.pl?op=add_form&module=suggestions&code=ACCEPTED

The original template for suggestions notifications included the suggested title, the title's author, and the suggester's first and last name. In the "add notice" interface I've got the option to add data from branches, biblio, biblioitems, and items.

Is it possible to pull fields from suggestions as placeholders in the notice?
Comment 6 Chris Cormack 2010-08-14 08:42:58 UTC
Yup,

<<suggestions.title>> etc were working for me. So we just need to update the notices page to allow people to add those to the template.

None of the biblio ones will work for suggestions, except when a suggestion is filled. Otherwise the biblionumber is always empty.
Comment 7 Chris Cormack 2010-11-29 18:05:43 UTC
Patches pushed please test
Comment 8 Magnus Enger 2011-10-26 07:58:28 UTC
Setting status to "PATCH-Sent" and "Patch Pushed", see Comment 7.
Comment 9 Katrin Fischer 2011-10-26 15:21:43 UTC
*** Bug 4273 has been marked as a duplicate of this bug. ***
Comment 10 Katrin Fischer 2011-10-26 15:22:34 UTC
*** Bug 1886 has been marked as a duplicate of this bug. ***
Comment 11 Katrin Fischer 2011-10-26 15:28:37 UTC
Ok, I tested this on 3.6/current master today and the mail.

This is a summary, I will file additional bugs for the separate issues:

There are mails generated when you mark something as available or when you mark it as rejected. Every time you change the status between those too, the patron will get a notification email.

BUG 7093: The placeholders for fields from suggestions do not work. The patron name showed up correctly.

BUG 7094: I found no way to trigger the ORDERED notice..

BUG 7095: I found no way to trigger the AVAILABLE notice.
Comment 12 Katrin Fischer 2012-02-13 08:29:24 UTC
The missing placeholders and some of the other bugs this patch addresses have already been fixed in master (see list of related bugs in comment 11)
Not sure this patch is still needed.
Comment 13 Katrin Fischer 2012-06-11 13:04:03 UTC
I just checked. On current master mails for ordering, accepting and rejecting suggestions are generated nicely and are sent to the patron. Closing this RESOLVED FIXED.