From 9a35b1bb0e6b1d25d04a30c1c3bbc242f86e54cb Mon Sep 17 00:00:00 2001 From: Matthias Le Gac Date: Thu, 7 Mar 2024 16:55:37 -0500 Subject: [PATCH] Bug 36122: NEW_SUGGESTION is sent for every modification to the suggestion Signed-off-by: Roman Dolny Signed-off-by: Martin Renvoize --- Koha/Suggestion.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Koha/Suggestion.pm b/Koha/Suggestion.pm index f406b71f0a9..b14c1123ca8 100644 --- a/Koha/Suggestion.pm +++ b/Koha/Suggestion.pm @@ -70,8 +70,7 @@ sub store { my $emailpurchasesuggestions = C4::Context->preference("EmailPurchaseSuggestions"); my $result = $self->SUPER::store(); - - if( $emailpurchasesuggestions ){ + if ( $emailpurchasesuggestions && $self->STATUS eq 'ASKED' ) { if ( my $letter = C4::Letters::GetPreparedLetter( -- 2.44.0