Skip to content

Commit

Permalink
Fix upgrade issue with description null values
Browse files Browse the repository at this point in the history
  • Loading branch information
gschueler committed Sep 23, 2011
1 parent 39f94a7 commit 60f1a81
Showing 1 changed file with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,12 @@ class ScheduledExecutionController {
changeinfo.extraInfo = " (internalID:${scheduledExecution.id})"
}
scheduledExecution.properties = nonopts


//fix potential null/blank issue after upgrading rundeck to 1.3.1/1.4
if (!scheduledExecution.description) {
scheduledExecution.description = ''
}

final Map oldopts = params.findAll{it.key=~/^(name|command|type|adhocExecution|adhocFilepath|adhoc.*String)$/}
if(oldopts && !params.workflow){
//construct workflow with one item from these options
Expand Down Expand Up @@ -1134,6 +1139,12 @@ class ScheduledExecutionController {
scheduledExecution.clearFilterFields()
scheduledExecution.properties = newprops

//fix potential null/blank issue after upgrading rundeck to 1.3.1/1.4
if (!scheduledExecution.description) {
scheduledExecution.description = ''
}


//clear old mode job properties
scheduledExecution.adhocExecution=false;
scheduledExecution.adhocRemoteString=null
Expand Down Expand Up @@ -1666,6 +1677,12 @@ class ScheduledExecutionController {
final Map nonopts = params.findAll {!it.key.startsWith("option.") && it.key != 'workflow'&& it.key != 'options'&& it.key != 'notifications'}
final Map oldopts = params.findAll{it.key=~/^(name|command|type|adhocExecution|adhocFilepath|adhoc.*String)$/}
scheduledExecution.properties = nonopts

//fix potential null/blank issue after upgrading rundeck to 1.3.1/1.4
if(!scheduledExecution.description){
scheduledExecution.description=''
}

if(oldopts && !params.workflow){
//construct workflow with one item from these options
oldopts.project=scheduledExecution.project
Expand Down

0 comments on commit 60f1a81

Please sign in to comment.