Skip to content

Commit af888c6

Browse files
authored
Create Onchange, When State is inprogress make assigned to and assignment group mandatory.js
Creating Onchange client script, When the State is inprogress make assigned to an assignment group mandatory.
1 parent 2d7b1ca commit af888c6

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
(function executeRule(current, previous /*null when async*/) {
2+
// Check if the new state is "In Progress"
3+
if (g_form.getValue('state') == '2') {
4+
// Make Assigned To and Assignment Group mandatory
5+
g_form.setMandatory('assigned_to', true);
6+
g_form.setMandatory('assignment_group', true);
7+
} else {
8+
// Make Assigned To and Assignment Group not mandatory when state is not "In Progress"
9+
g_form.setMandatory('assigned_to', false);
10+
g_form.setMandatory('assignment_group', false);
11+
}
12+
})();

0 commit comments

Comments
 (0)