Skip to content

Commit

Permalink
Correcly remove email notifications when unchecked [#291 state:resolved]
Browse files Browse the repository at this point in the history
  • Loading branch information
gschueler committed May 19, 2011
1 parent 8801b9c commit f16d3df
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,7 @@ class ScheduledExecutionController {

}

if(!params.notifications && (params.notifyOnsuccess || params.notifyOnfailure)){
if(!params.notifications && (params.notifyOnsuccess || params.notifyOnfailure) && 'false'!=params.notified){
def nots=[exists:true]
if('true'==params.notifyOnsuccess){
nots['onsuccess']=[email:params.notifySuccessRecipients]
Expand All @@ -955,7 +955,7 @@ class ScheduledExecutionController {
params.notifications=nots
}
def todiscard=[]
if(params.notifications && scheduledExecution.notifications){
if('false'==params.notified || params.notifications && scheduledExecution.notifications || !(params.notifyOnsuccess || params.notifyOnfailure)){
def todelete=[]
scheduledExecution.notifications.each{Notification note->
todelete<<note
Expand Down

0 comments on commit f16d3df

Please sign in to comment.