}
}
}
});
if (projects.size()>0){
Session session=SessionFactory.getInstance().getSession(opt.isLocal());
final SaveOptions o=(SaveOptions)opt.clone();
o.setPostSaving(new Closure() {
public void execute(Object obj) {
Project p = (Project)obj;
p.setAllTasksAsUnchangedFromPersisted(true);
p.validateNewDistributionMap();
portfolio.handleExternalTasks(p,false, true); // external link handling
if (opt.getPostSaving()!=null) opt.getPostSaving().execute(obj); //id, combobox update
}
});
Job job=session.getSaveProjectJob(projects,o);
return job;
}
return null;
}