Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2018 01:39 AM
// Try this sample code
var additionalComments = '';
var workNotes = '';
var dateRE = /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}.*\n/;
if(current.comments.changes){
additionalComments = current.task.comments.getJournalEntry(1);
}else if(current.work_notes.changes){
workNotes = current.task.work_notes.getJournalEntry(1);
}else{
//Do nothing
}
if(additionalComments != ''){
current.comments = additionalComments.replace(dateRE, '');
}
if(workNotes != ''){
current.comments = workNotes.replace(dateRE, '');
}