Project Tasks - How to make the roll-up field true?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-23-2013 08:03 AM
Hello,
We want the task number of project tasks that have child tasks to be shaded green to indicate they have child tasks. The setting to make that happen is if rollup == true. The rollup field is being left as false (unchecked) when we create a child task. Would it be a business rule that needs to be tweaked or created or could it be a UI Policy on the project task form? Any insights will be appreciated. Thanks.
Troy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-27-2013 08:44 AM
There is a business rule, called "Update parent rollup field". This should set your "rollup" checkbox. If your "parent" field isn't being set right, then this might not work.
I would look into that business rule and the parent field.
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-06-2013 03:31 AM
Update the setRollup() function with the following and it should work as expected:
function setRollup(task) {
var gr = new GlideRecord("planned_task");
gr.addQuery("parent", task.getUniqueValue());
gr.setLimit(1); //only need one to know
gr.query();
var hasChildren = false;
if (gr.hasNext())
var hasChildren = true;
if (task.rollup != hasChildren) {
var gr2 = new GlideRecord("planned_task");
gr2.addQuery("sys_id", task.sys_id);
gr2.query();
if(gr2.next()) {
gr2.rollup = hasChildren;
gr2.setWorkflow(false);
gr2.update();
}
}
}
BR, Jussi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-06-2013 01:27 PM
I know there was a reported bug around rollup field at one point. Check with support to see if there's a patch for the version you are running.