Skip to content

Commit 695d030

Browse files
authored
Change close reminder business rule (#1933)
* Create change_close_reminder.js This Business Rule automatically prepares an email reminder for Change Requests that are about to close. When triggered, it dynamically builds a clear and actionable subject and body message to alert users that the Change Request is nearing closure. * Create README.md This Business Rule automatically prepares an email reminder for Change Requests that are about to close. When triggered, it dynamically builds a clear and actionable subject and body message to alert users that the Change Request is nearing closure. * Update README.md This Business Rule automatically generate a reminder message for Tasks that are approaching their closure time. * Update README.md
1 parent 9de7639 commit 695d030

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
About this script :
2+
3+
Type: Before Business Rule
4+
Table: Reminder [reminder]
5+
When: Before Insert or Update
6+
7+
This Business Rule automatically generate a reminder message for Tasks that are approaching their closure time.
8+
It dynamically fills in the Subject, Notes, and Using fields with a formatted message, ensuring consistent and timely communication.
9+
10+
What it does :
11+
It retrieves the Task number from the task field.
12+
It reads the reminder time (remind_me) to know how many minutes before closure the reminder should be sent.
13+
It builds a subject line like:
14+
15+
“Change Request CHG001234 Closure Approaching in 30 Minutes”
16+
17+
It builds a message body explaining the reminder details.
18+
It automatically sets:
19+
subject → reminder subject line
20+
notes → reminder message body
21+
using → "outlook" (indicating reminder channel)
22+
23+
Use of this script :
24+
This automation ensures that Change Managers and implementers are reminded before a Change Request closes, reducing the risk of:
25+
Missing required closure tasks
26+
Incomplete validations or documentation
27+
Unnotified team members before system changes finalize
28+
29+
30+
Please find the screenshots attached for clarity.
31+
<img width="1562" height="671" alt="image" src="https://github.com/user-attachments/assets/5c8db22f-4297-47e5-a76d-764f033329f2" />
32+
<img width="1500" height="572" alt="image" src="https://github.com/user-attachments/assets/74753ba0-38e6-4125-9396-435e205e6230" />
33+
34+
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
(function executeRule(current, previous /*null when async*/) {
2+
3+
var tsk_number = current.getDisplayValue('task'); // Get Change Request number
4+
var time = current.getValue('remind_me'); // Reminder time in minutes
5+
6+
var subject = 'Change Request ' + tsk_number + ' Closure Approaching in ' + time + ' Minutes';
7+
var body = 'This is a reminder that Change Request ' + tsk_number +
8+
' is scheduled to close in ' + time + ' minutes. Please ensure that all necessary ' +
9+
'tasks, validations, and documentation are completed before the closure.';
10+
11+
current.setValue('subject', subject);
12+
current.setValue('notes', body);
13+
current.setValue('using', 'outlook');
14+
15+
})(current, previous);

0 commit comments

Comments
 (0)