How to copy close notes to addition comment while closing the sc task
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-15-2023 02:59 AM
As per the requirement when we close the task then the close notes should be auto copied to "additional comment", how can i do this please suggest.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-15-2023 05:20 AM
Could you please tell me that how can i achive this thorugh BR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-15-2023 05:51 AM - edited 08-15-2023 05:55 AM
Hi @VIKAS MISHRA Please find below for the BR to achieve the same
(function executeRule(current, previous /*null when async*/ ) {
var openedBy = current.opened_by;
var assignmentGroup = current.assignment_group;
if (assignmentGroup == 'e8c3483c1b118510f48c65f7b04bcb0d' || assignmentGroup == 'ed09322b1b0c4d10680a0e9cdc4bcb43' || assignmentGroup == '551536e91b22cd10680a0e9cdc4bcb6a') {
current.work_notes = current.comments;
current.update();
}
})(current, previous);
Please mark it Correct & Hit Like if this works!
Regards,
Eswar Chappa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-15-2023 06:25 AM
I have tried beow mentioned script its still not working, when i try to copy the close notes to description or short descruptio then its working fine but not working only for additional comment, please suggest
(function executeRule(current, previous /*null when async*/ ) {
var openedBy = current.opened_by;
var assignmentGroup = current.assignment_group;
if (assignmentGroup == 'e8c3483c1b118510f48c65f7b04bcb0d' || assignmentGroup == 'ed09322b1b0c4d10680a0e9cdc4bcb43' || assignmentGroup == '551536e91b22cd10680a0e9cdc4bcb6a') {
current.comments = current.close_notes;
current.update();
}
})(current, previous);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-15-2023 08:06 AM
Hello,
Remove the if conditions in your script and set those groups in the 'When to Run' tab. Additionally, remove the current.update() as this is not best practice. Try the script below:
(function executeRule(current, previous /*null when async*/) {
var notes = current.close_notes;
current.work_notes.setJournalEntry(notes);
current.comments.setJournalEntry(notes);
})(current, previous);
Kind Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-15-2023 11:41 PM
(function executeRule(current, previous /*null when async*/ ) {
var openedBy = current.opened_by;
var assignmentGroup = current.assignment_group;
if (assignmentGroup == 'e8c3483c1b118510f48c65f7b04bcb0d' || assignmentGroup == 'ed09322b1b0c4d10680a0e9cdc4bcb43' || assignmentGroup == '551536e91b22cd10680a0e9cdc4bcb6a') {
var cn=current.close_notes;
current.comments =cn.toString();
current.update();
}
})(current, previous);