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

Joni5
Tera Expert

Your original regex is looking for a line break as well, so you're not replacing anything currently.

I see that you've already gotten a working solution, but I'll add this anyway.

var dateRE = /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}.*\)/;

Here we're basically looking for the digits + anything until first closing bracket.