Remove User info and timestamp from commets

DS14
Tera Contributor

Hello All,

   Below regular expression is not working for me,it still showing the info and time in notification mail for Incident record. Is there any changes/property i need to modify for this.

find_real_file.png

  find_real_file.png

 

Thanks in advanced.

1 ACCEPTED SOLUTION

Deepak Ingale1
Mega Sage

Below is working expression I am using in returning work note and comments as output without time stamp and user details who updated it. It must work for you as well.

current.comments.getJournalEntry(1).match(/\n.*/gm).join("\n");

 

Note: Please mark reply as correct if it answers your question.

View solution in original post

10 REPLIES 10

thanks ! it works ..

could you please explain .match(/\n.*/gm).join("\n") ?

Hi Deepak,

Thank you for sharing this, it was working great! We have since upgraded from Madrid to Orlando and the expression you shared has stopped working for us.  Are you aware of anything that may have changed in Orlando that would have caused this to stop working?

 

Thanks,

Jeff

jeff43
Tera Contributor

Deepak,

I was able to figure out how to fix the expression so it works.  I had to update the * with the + sign.  

       getJournalEntry(1).match(/\n.+/gm).join("\n")

 

 

find_real_file.png

I was looking left and right and couldn't find an answer to my problem. Thanks for your input! 

 

Hi Deepak,

I have also tried it, but it gives me only last comment as I want to print all the previous comments on work notes. That I have achieved by using (-1) instead of (1) but along with time stamp and user detail

current.comments.getJournalEntry(-1).match(/\n.*/gm).join("\n");

find_real_file.png

I have tried above line of code and getting the output which is shown in the above image. I hope my question will be easy to understand for you.

Thanks & Regards