To recreate: 1. Turn on EmailPurchaseSuggestions and add an email address to EmailAddressForSuggestions. 2. Create a new suggestion and set the " Created by:" field to a patron with an email address 3. Check the message queue ( select * from message_queue where letter_code = "NEW_SUGGESTION" ) 4. There is a NEW_SUGGESTION queued, the to_address should be the email you entered in EmailAddressForSuggestions. 5. The borrowernumber is the borrower who made the suggestion. This shouldn't end up in the notice tab for the borrower since these notices are for staff.
Created attachment 182315 [details] [review] Bug 39883: Do not pass the borrowernumber for NEW_SUGGESTION notices 1. Turn on EmailPurchaseSuggestions and add an email address to EmailAddressForSuggestions. 2. Create a new suggestion and set the " Created by:" field to a patron with an email address 3. Check the message queue ( select * from message_queue where letter_code = "NEW_SUGGESTION" ) 4. There is a NEW_SUGGESTION queued, the to_address should be the email you entered in EmailAddressForSuggestions. 5. The borrowernumber is the borrower who made the suggestion. 6. APPLY PATCH, restart_all 7. Repeat steps 2 - 4. 8. This time a NEW_SUGGESTION should be queued, but the borrowernumber will be undef 9. Check in the patron's notice tab, there should be nothing queued.
Created attachment 182391 [details] [review] Bug 39883: Do not pass the borrowernumber for NEW_SUGGESTION notices 1. Turn on EmailPurchaseSuggestions and add an email address to EmailAddressForSuggestions. 2. Create a new suggestion and set the " Created by:" field to a patron with an email address 3. Check the message queue ( select * from message_queue where letter_code = "NEW_SUGGESTION" ) 4. There is a NEW_SUGGESTION queued, the to_address should be the email you entered in EmailAddressForSuggestions. 5. The borrowernumber is the borrower who made the suggestion. 6. APPLY PATCH, restart_all 7. Repeat steps 2 - 4. 8. This time a NEW_SUGGESTION should be queued, but the borrowernumber will be undef 9. Check in the patron's notice tab, there should be nothing queued. Signed-off-by: Lin Wei Li <lin-wei.li@inLibro.com>
Created attachment 185133 [details] [review] Bug 39883: Do not pass the borrowernumber for NEW_SUGGESTION notices 1. Turn on EmailPurchaseSuggestions and add an email address to EmailAddressForSuggestions. 2. Create a new suggestion and set the " Created by:" field to a patron with an email address 3. Check the message queue ( select * from message_queue where letter_code = "NEW_SUGGESTION" ) 4. There is a NEW_SUGGESTION queued, the to_address should be the email you entered in EmailAddressForSuggestions. 5. The borrowernumber is the borrower who made the suggestion. 6. APPLY PATCH, restart_all 7. Repeat steps 2 - 4. 8. This time a NEW_SUGGESTION should be queued, but the borrowernumber will be undef 9. Check in the patron's notice tab, there should be nothing queued. Signed-off-by: Lin Wei Li <lin-wei.li@inLibro.com> Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Nice work everyone! Pushed to main for 25.11
Created attachment 185467 [details] [review] Bug 39883: ( follow-up ) Adjust tests to not rely on borrowernumber
Actually, a better way to get the data I want is to replace the search by borrowernumber with letter_code => 'NEW_SUGGESTION
Created attachment 185471 [details] [review] Bug 39883: (follow-up) Retrieve messages by letter_code
follow-up pushed to main