From 866e1269b27f1e28e26f8be1eec0e18279f12e8f 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 Signed-off-by: Katrin Fischer (cherry picked from commit 4ab5e6d29d6a67320a2931e4b9f667879aaadb3d) Signed-off-by: Fridolin Somers --- Koha/Suggestion.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Koha/Suggestion.pm b/Koha/Suggestion.pm index 631c1f662a..37c509fa88 100644 --- a/Koha/Suggestion.pm +++ b/Koha/Suggestion.pm @@ -69,8 +69,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.39.5