History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: QB-2177
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Robin Shen
Reporter: SH
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
QuickBuild

QB can't handle a getChildren call for a step that has no children

Created: 11/Sep/14 10:34 PM   Updated: 12/Sep/14 12:26 AM
Component/s: None
Affects Version/s: 5.1.30
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Environment: Linux,


 Description  « Hide
 groovy.lang.MissingMethodException: No signature of method: com.pmease.quickbuild.plugin.basis.ScriptStep.getStepChildNames() is applicable for argument types: () values: []

Doing something like "system.getConfigurationManager().get('root').getStep('myStep').getStepChildNames()" fails with the above error when looking to see which steps have children.

If the step has children, it works fine. It should just return 0 children.



 All   Comments   Work Log   Change History      Sort Order:
Robin Shen [12/Sep/14 12:26 AM]
The leaf step is a different class than the container step, and method "getChildStepNames()" only exists in container step. To check if the step has any children, first check if it is a container step, then further check if contains any child steps as below:

groovy:
def mystep = system.configurationManager.get("root").getStep("mystep");
if ((mystep instanceof com.pmease.quickbuild.stepsupport.CompositeStep) && !mystep.childStepNames.isEmpty()) {
// there are child steps
}