bug[ats_TW1944]: Branch created without selecting new action dialog check

Change-Id: If18cf961c4803883612cfce859385b8225c2e82e
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/wizard/AbstractWizardItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/wizard/AbstractWizardItem.java
index 40cd617..419187d 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/wizard/AbstractWizardItem.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/wizard/AbstractWizardItem.java
@@ -67,6 +67,8 @@
       new DoubleKeyHashMap<>();
    private final IAtsServices services;
    private final WizardFields[] fields;
+   private XComboViewer versionCombo;
+   private XCheckBox createBranchCheck;
 
    public AbstractWizardItem(IAtsServices services, WizardFields... fields) {
       this.services = services;
@@ -190,7 +192,7 @@
             comp.setLayout(ALayout.getZeroMarginLayout(2, false));
             comp.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false, false));
 
-            XComboViewer versionCombo = new XComboViewer("Targeted Version", SWT.NONE);
+            versionCombo = new XComboViewer("Targeted Version", SWT.NONE);
             Collection<Object> objects = new LinkedList<>();
             objects.addAll(versions);
             versionCombo.setInput(objects);
@@ -202,7 +204,7 @@
             comp2.setLayout(ALayout.getZeroMarginLayout(2, false));
             comp2.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false, false));
 
-            final XCheckBox createBranchCheck = new XCheckBox("Create Branch Automatically");
+            createBranchCheck = new XCheckBox("Create Branch Automatically");
             createBranchCheck.setToolTip(
                "Branch will be completed after Action Creation (Valid Targeted Version must be selected)");
             createBranchCheck.setEditable(false);
@@ -323,7 +325,9 @@
          wizardCompletedFeatureGroup(teamWf, teamDef, changes);
          wizardCompletedUnPlanned(teamWf, teamDef, changes);
 
-         changes.addExecuteListener(new CreateBranch(teamDef));
+         if (versionCombo.getSelected() != null && createBranchCheck.isChecked()) {
+            changes.addExecuteListener(new CreateBranch(teamDef));
+         }
       }
    }