- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2019 01:09 PM
I'm trying to import project tasks then subtasks from excel sheet however for some reason planned start date is not updating and the same date is applied to all the tasks despite each having different planned start dates.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2019 01:58 PM
Hmmmmm tricky thing to do in Transform Map. There is a setWorkflow(false) method but it disables all the business rules which in your case, you do not want it.
I would go ahead and plan this import during a downtime and would inactivate the desired business rule itself. Import all the data and then re-activate it later.
Hope it makes sense.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2019 12:57 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2019 12:58 PM
Also here's the script for that business rule "Disable the Change of Planned Dates"
function onBefore(current, previous) {
var propertyName = 'com.snc.project.enable_alter_of_planned_dates';
var tableName = current.sys_class_name;
var isEnableAlterOfPlannedDates = SNC.PPMConfig.getProperty(propertyName, tableName, 'false');
// If Task is in WIP and Planned Start Date Changes OR
// If Task is Closed and Planned Start Date or Planned End Date Changes
var stateUtil = new PlannedTaskStateUtil(current);
var stateBucket = stateUtil.getBucketForState(current.state);
if ( stateBucket == PlannedTaskStateUtil.CLOSE_STATES) {
if ( current.end_date.changes() ) {
// Ignore this condition if triggered for Actual dates update
if(current.work_start.changes() || current.work_end.changes() || current.state.changes())
return;
gs.addErrorMessage(gs.getMessage("Cannot change the planned end date of closed task"));
current.setAbortAction(true);
}
}
if ( stateBucket != PlannedTaskStateUtil.OPEN_STATES && stateBucket != PlannedTaskStateUtil.PENDING_STATES ) {
if ( current.start_date.changes() && isEnableAlterOfPlannedDates != 'true') {
gs.addErrorMessage(gs.getMessage("Cannot change the planned start date of already started / complete task"));
current.setAbortAction(true);
}
}
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2019 01:11 PM
You can defintiely disable the business rules by unchecking 'Run Business Rules' in the Transform Script. For Client script, I believe just disable it and import a test set. But remember this is a Out of Box functionality (Business Rule and Client Script ) which makes sense to not change the planned start date and end date.
Look at it this way: If your state of the project is already closed , why would you change the planned start date and end date. Even in your spreadsheet, the PRJ is already closed so changing that again will disrupt the workflows and metrics and your duration fields.
Please mark this as correct answer/helpful if this solves your problem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2019 01:12 PM
Hi Abhishek,
Good news. I was able to find the business rule which was preventing the planned start date field to be updated.
As you can see it's an oob, is there a workaround wherein I can temporarily disable this specific business rule and reactivate it while running the transform using a script.
Please help.
Thanks again!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2019 01:33 PM