I want to close the sc_task
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2024 01:50 PM
Hello folks,
I am trying to close an sc_task when the state is 'Closed Incomplete'. This is my custom choice with a value of 25. If the sc_task state changes to 25, how will the system consider the sc_task as closed?
I found an out-of-the-box (OOB) Business Rule (BR) with the following condition:
current.state.changes() && (current.state == 3 || current.state ==4 || current.state == 7)
and script is :
current.active = false;
current.work_end = nowDateTime();
var dc = new DurationCalculator();
var diffInSeconds = dc.calcScheduleDuration(current.work_start.getDisplayValue(),current.work_end.getDisplayValue());
current.business_duration = new GlideDuration(diffInSeconds*1000).getDurationValue();
I have modified the condition to include my custom state:
condition is : current.state.changes() && (current.state == 3 || current.state ==4 || current.state == 7 || current.state == 25).
However, when the sc_task state changes to 25, it seems to automatically set the state to 'Closed Complete'. Does anyone have any ideas on why this is happening or how to properly handle this?
Please help me out.
Thanks, Shareef
0 REPLIES 0