The CreatorCon Call for Content is officially open! Get started here.

Additional comments(customer visible) copy to RITM

John Vo1
Tera Guru

Currently I have a BR called Work notes to RITM.   This will copy what was put in the task under work notes and pull that up to RITM.  

Here is the script:

find_real_file.png

What do I need to add to the script so additional comments (customer visible) gets copied up to RITM as well?

1 ACCEPTED SOLUTION

Hi John,



Not sure of already got the answer, got some time to do some testing as I promised and here is the test it did:



Type: Business Rule


Table: sc_task


Parameters: Run: Before insert and update


Filter Conditions: Additional comments or work notes changes


Script:


cascadeComment();


function cascadeComment(){


var gr=new GlideRecord("sc_req_item");


gr.get(current.request_item);



gr.work_notes=current.work_notes;


gr.comments=current.comments;


gr.update();


}



And I can see comments and work_notes are updated in activity formatter. Try this and see if this helps



Screen Shot 2017-07-23 at 10.11.23 PM.png



Screen Shot 2017-07-23 at 10.11.30 PM.png



Screen Shot 2017-07-23 at 10.11.44 PM.png



Screen Shot 2017-07-23 at 10.11.56 PM.png


View solution in original post

22 REPLIES 22

on the conditions for your br do you have any condition specifying that the request_item is not empty??



it sounds like your issue is that your br is running for EVERY task not just those that have a request item... although with the code you have i don't see how it should cause much slowness...


can we get to which task comments/worknotes has added


as few ritms have more than one task and it is difficult to find it out



is it possible to show who added


shruti_tyagi
ServiceNow Employee
ServiceNow Employee

I guess you can print the request_item number in your comments or worknotes.



Shruti


Steven Parker
Giga Sage

I have a big problem with how comments work in ServiceNow.   If someone as an ITIL user comments on a TASK it should automatically flow through any other TASK, RITM, and REQ.   Same from a customer perspective...if a customer comments, it should flow to every TASK, RITM, and REQ.



You shouldn't have to create Business Rules to do this although we had to do it too.   Commenting and attachments are handled pretty terribly natively by ServiceNow.



Please mark this response as correct and/or helpful if it assisted you with your question.
Steven

randrews
Tera Guru

keep in mind you will NOT see additonal comments in the additional comments block of the item.. ONLY in the activity stream.. .<it is a journal entry field> also be aware most people already have a BR to copy the add comments from the item into the task.. it is VERY easy to form a loop here where the task updates the items add comments .. the item then updates the task add comments.. which updates the item.. etc.