Bug 7093 - Placeholders for suggestion table in suggestion related mails broken
Summary: Placeholders for suggestion table in suggestion related mails broken
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: 3.6
Hardware: All All
: PATCH-Sent (DO NOT USE) critical
Assignee: Ian Walls
QA Contact: Marcel de Rooy
URL:
Keywords:
: 7212 (view as bug list)
Depends on:
Blocks: 4211
  Show dependency treegraph
 
Reported: 2011-10-26 15:15 UTC by Katrin Fischer
Modified: 2019-06-27 09:24 UTC (History)
3 users (show)

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


Attachments
Proposed Patch (1.83 KB, patch)
2011-12-07 16:47 UTC, Ian Walls
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 7093: placeholds for suggestion table not working in notices (2.05 KB, patch)
2011-12-08 05:46 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2011-10-26 15:15:12 UTC
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. The messages are correctly written into the message_queue table.

BUT: The placeholders for fields from suggestions do not work. The patron name showed up correctly. For testing purposes I added all fields from suggestions to my notices:

suggestionid <<suggestions.suggestionid>>
suggestedby <<suggestions.suggestedby>>
suggesteddate <<suggestions.suggesteddate>>
managedby <<suggestions.managedby>>
manageddate <<suggestions.manageddate>>
acceptedby <<suggestions.acceptedby>>
accepteddate <<suggestions.accepteddate>>
rejectedby <<suggestions.rejectedby>>
rejecteddate <<suggestions.rejecteddate>>
STATUS <<suggestions.STATUS>>
note <<suggestions.note>>
author <<suggestions.author>>
title <<suggestions.title>>
copyrightdate <<suggestions.copyrightdate>>
publishercode <<suggestions.publishercode>>
date <<suggestions.date>>
volumedesc <<suggestions.volumedesc>>
publicationyear <<suggestions.publicationyear>>
place <<suggestions.place>>
isbn <<suggestions.isbn>>
mailoverseeing <<suggestions.mailoverseeing>>
biblionumber <<suggestions.biblionumber>>
reason <<suggestions.reason>>
budgetid <<suggestions.budgetid>>
branchcode <<suggestions.branchcode>>
collectiontitle <<suggestions.collectiontitle>>
itemtype <<suggestions.itemtype>>
quantity <<suggestions.quantity>>
currency <<suggestions.currency>>
price <<suggestions.price>>
total <<suggestions.total>>

None of those showed up in my mails. Without at least title and author the mails are quite useless.
Comment 1 Katrin Fischer 2011-11-10 20:19:59 UTC
*** Bug 7212 has been marked as a duplicate of this bug. ***
Comment 2 Ian Walls 2011-12-07 16:47:14 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2011-12-08 05:46:48 UTC
Created attachment 6657 [details] [review]
[SIGNED-OFF] Bug 7093: placeholds for suggestion table not working in notices

In parseletter_sth, the suggestions table was defined twice.  The first time (which
is the only definition to get called, as it matches first then exists), defined the
primary search keys as borrowernumber and biblionumber.  This is incorrect; the only
usage of the suggestions table tokens is with suggestionid as the key.  This is defined
further down the if/then chain.

This patch removes the erroneous sth query definition.

To test:

1.  Place a suggestion with a patron account with a configured email you can access
2.  Approve or reject it
3.  Verify the message you receive contains suggestion tokens (like title, author and reason)

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Suggestion mails for accepted, rejected and ordered look good now.
I couldn't test the suggestion mail AVAILABLE (bug 7096), but
assuming this would work too.
Comment 4 Ian Walls 2011-12-08 15:23:34 UTC
Assigning to Marcel for QA, since I wrote
Comment 5 Paul Poulain 2011-12-13 15:50:07 UTC
QA comment: small patch, obvious bug, passed QA

patch pushed, please test
Comment 6 Jared Camins-Esakov 2012-05-23 12:17:20 UTC
Included in 3.6 prior to 3.6.5.