Combining Activity logs of Parent and Child requests
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2014 01:30 PM
I can't seem to find where there is the ability to combine the Activity logs from a Parent and a Child task into one continuous chronological view. I can see a business case for this when you have multiple TASKs under a RITM that need to coordinate and see updates from each child in the parent view. Am I missing something in the wiki? Or has anyone done something like this before?
TIA,
Cal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2014 01:47 PM
I don't know of any simple out of box answer, but you could accomplish this with a business rule.
You could write a business rule on the child table that updates the parent records additional comments field with the new notes. You can write something like this in an on update BR.
current.parent.additional_comments = "Update from Task" + current.number + " " + current.additional_comments;
That would clarify the update was coming from the child task. You will need to worry about notifications going out since this will be triggering those on the parent record if they are set up for the additional comments field.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2014 03:15 AM
I agree with Nick.
We had a similar requirement and we created a business rule on child table to automatically update comments of parent with similar comments mentioned by Nick.
So your code would be:
var parent = current.parent.getRefRecord();
parent.comments = "Update from Task" + current.number + " " + current.comments;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2014 05:00 AM
Here's another twist, how can you push the parent updates down to the Child? That seems to be the complaint of the engineers working TASKs and customers updating RITMs. It'd be great to have a clean view of a single Activity Log for both the Parent and all the children.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2014 07:16 PM
To copy comments from parent to child, write a BR on parent table when current.comment.changes()
var gr = new GlideRecord('sc_task');
gr.addQuery('parent',current.sys_id);
gr.query();
while (gr.next()) {
gr.comment = current.comments;
gr.update();
}
Make sure you dont run into infinite loop by writing this BR on both child as well as parent table.