Bug 35854 - Suggestions generate identical messages when edited
Summary: Suggestions generate identical messages when edited
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal with 5 votes (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-22 09:50 UTC by Magnus Enger
Modified: 2024-04-12 16:57 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

Note You need to log in before you can comment on or make changes to this bug.
Description Magnus Enger 2024-01-22 09:50:05 UTC
To reproduce: 

- Log in to the OPAC and enter a purchase suggestion
- Log in to the staff client and locate the purchase suggestion
- Change the status to "Accepted"
- Check the notices of the patron that entered the suggestion in the OPAC. Verify there is message with the title "Purchase suggestion accepted"
- Now edit the purchase suggestion again, without changing the status
- Check the messages of the patron again, and verify there are now to "Purchase suggestion accepted" messages 

The standard ACCEPTED message reads: 

Dear koha,
You have suggested that the library acquire Test by Johan Theorin.
The library has reviewed your suggestion today. The item will be ordered as soon as possible. You will be notified by mail when the order is completed, and again when the item arrives at the library.
If you have any questions, please email us at .
Thank you,
Centerville

It might be possible to phrase this another way, so it makes sense to send it out multiple times for the same suggestion even if the status is not changed, but in general I think it will be confusing to generate identical messages for the same suggestion. 

The suggested fix is to only send messages when the status is changed. 

Perhaps there are libraries that depend on the current functionality, so we might need a syspref like SuggestionsOnlySendMessagesOnChangedStatus that defaults to off, to keep the current behaviour. Thoughts?
Comment 1 Katrin Fischer 2024-01-22 19:53:31 UTC
I think the notices should only be sent when the status changes.

Did editing the suggestion work for you? Because there is bug 34963.
Comment 2 Magnus Enger 2024-01-23 07:15:31 UTC
(In reply to Katrin Fischer from comment #1)
> Did editing the suggestion work for you? Because there is bug 34963.

I just tested with adding to the title or something like that.
Comment 3 S Martin 2024-02-02 20:58:56 UTC
I'm also having this problem. The suggestion accepted message is sent to patrons whenever something in the record is edited. It's also being sent when the suggestion is marked as ordered (the suggestion ordered notice is sent, and the suggestion accepted message is being sent again at the same time.)
Comment 4 Caroline Cyr La Rose 2024-02-16 19:49:30 UTC
I just created bug 36122, I'm not sure if it's the same as this or not. It's similar but affects the NEW_SUGGESTION notice sent for every change in the suggestion when EmailPurchaseSuggestion is enabled instead of the patron notices.
Comment 5 Mirjam Vantieghem 2024-02-20 15:08:11 UTC
+1