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

Additional comments on req vs ritm vs sc_task

varunp
Tera Guru

Hi All,

We are implementing a service now from scratch. I am seeing there are additional comments on Request, RITM as well as on Sc_Task.

The requester can only see additional comments of Request from Portal. And fulfiller can only see the additional comments from sc_task.

I want to know what is the best practice of using the additional comments.

Should I copy Request additional comments to sc_task and vice-versa so that requester and fulfiller both see the same additional comments and skip the RITM additional comments because it is of no use? If I do the same then how do I avoid the infinite loop?

In my organization, 1 Req will only have 1 RITM, but 1 RITM can have more than 1 task. If I need to copy Request additional comments to task, I need to copy in all sc_task. And when any fulfiller will add any additional comments on sc_task, I need to copy it to Request so that requester can see the fulfiller comments on Portal.

Any comments would be helpful.

1 ACCEPTED SOLUTION

Andrew Wortham
Kilo Guru

Hello Varun,



This is a very common question! Best practice in my experience is to hide the REQ for end users.   Typically it is easier for the end users to deal with a single ticket and the RITM level is the natural ticket for them to know.   However, this does take a bit of configuration.   Including changing the portal to show RITMs in the menus and lists.   And changing the notifications to navigate to the portal (this needs to be changed regardless)



As to end user - fulfiller communication, the RITM is often the place where this should occur, set up notifications / inbound actions on the RITM and train fulfiller to go up a level to communicate since sc_tasks just have work notes.   I have seen and implemented business rules for some clients that carry additional comments up to the RITM and back down so that fulfillers can live at the task level while end users only see RITMs.   Both work.  



If you opt to try and use REQ as the point of contact you will have to add additional comments and work notes to the REQ.



In short no matter what you choose there is going to be some configuration involved and the most important part is that you get to a process that works for both the end users and fulfillers.   But I would recommend using the RITM as the primary record for communication.



Best,


Andrew


View solution in original post

30 REPLIES 30

Andrew Wortham
Kilo Guru

Hello Varun,



This is a very common question! Best practice in my experience is to hide the REQ for end users.   Typically it is easier for the end users to deal with a single ticket and the RITM level is the natural ticket for them to know.   However, this does take a bit of configuration.   Including changing the portal to show RITMs in the menus and lists.   And changing the notifications to navigate to the portal (this needs to be changed regardless)



As to end user - fulfiller communication, the RITM is often the place where this should occur, set up notifications / inbound actions on the RITM and train fulfiller to go up a level to communicate since sc_tasks just have work notes.   I have seen and implemented business rules for some clients that carry additional comments up to the RITM and back down so that fulfillers can live at the task level while end users only see RITMs.   Both work.  



If you opt to try and use REQ as the point of contact you will have to add additional comments and work notes to the REQ.



In short no matter what you choose there is going to be some configuration involved and the most important part is that you get to a process that works for both the end users and fulfillers.   But I would recommend using the RITM as the primary record for communication.



Best,


Andrew


Hello Varun,



I agree with Andrews recommendation.... use the RITM as the primary record for communication.   We have implemented business rules so that fulfillers live at task level and the end user sees RITMs.   Seems to be working for both.  



Regards,


John


Hello Andrew,



I had a question on your statement from above:



"I have seen and implemented business rules for some clients that carry additional comments up to the RITM and back down so that fulfillers can live at the task level while end users only see RITMs."



How do you implement this without creating a loop situation? We tried adding Additional Comments to SCTASK and had them copy to Additional Comments on the RITM record and vice versa but this created a loop for us.



Thanks!



Mike


Hello Michael,



I believe I got this code from the community so I don't take credit for it.   Here is an on after business rule that runs at the RITM level to update the tasks.   Notice the indexOf checking to see if the tasks comments are the same.   This will prevent lopping from occuring.   Aslo all the regexing will remove the journal entry and keep only the commment.



(function executeRule(current, previous /*null when async*/) {



updateComments();


function updateComments() {




var task = new GlideRecord('sc_task');


task.addQuery('request_item', current.sys_id);


task.query();



while (task.next()) {


var regex= new RegExp('\n'); // searching for the first line break


var comments = current.comments.getJournalEntry(1);


var comments2=comments;


var i = comments.search(regex);


if (i>0)


{


// taking everything after the first line break.


comments2 = comments.substring(i+1, comments.length);


}



var taskComments = task.comments.getJournalEntry(1);


var taskComments2=taskComments;


var i2 = taskComments.search(regex);


if (i2>0)


{


// taking everything after the first line break.


taskComments2 = taskComments.substring(i2+1, comments.length);


}



if (taskComments2.indexOf(comments2)<0) {


// OnAfter business rules cannot process comments so we need to pull from the journal


//     The journal history contains extra text that does not need to flow to the new comments


//     so we have to clean it up


task.comments = comments2.replace(/^\s+|\s+$/g, '');



task.update();


//}


}


}


}



})(current, previous);