OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openproject/mocha/factories/planning_element_factory.js

17 lines
576 B

Factory.define('PlanningElement', Timeline.PlanningElement)
.sequence('id')
11 years ago
.sequence('name', function (i) {
return "Project No. " + i;
})
.after(function(PlanningElement, options) {
if(options && options.children) {
var i;
for (i = 0; i < options.children.length; i += 1) {
options.children[i].Project = PlanningElement.project;
options.children[i].parent = PlanningElement;
options.children[i] = Factory.build('PlanningElement', options.children[i]);
}
11 years ago
PlanningElement.children = options.children;
}
});