How to Set the Default Stage to "Not Started" in ServiceNow's "Leave of Absence" Journey Feature
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2023 05:02 AM
Hello everyone,
I have successfully configured the "Leave of Absence" record producer in the Employee Service Center (ESC) using ServiceNow's journey feature. However, I've encountered an issue: when a new record is created through this record producer, the stage is automatically set to "In Progress" by default. According to our requirements, the default stage should be "Not Started" instead.
Upon reviewing the script in the "JNY Task Card" widget, I noticed that the first case condition does have a "Not Started" state. Here is the relevant code snippet:
c.getStageDisplayState = function(state, defaultValue) {
var ans = defaultValue;
switch (state) {
case "awaiting_trigger":
ans = "${Not started}";
break;
case "running_activities":
case "10":
ans = "${In Progress}";
break;
case "finished":
case "2":
ans = "${Completed}";
break;
default:
ans = defaultValue;
break;
}
return ans;
};
Would anyone know how to configure the journey so that, upon creation, it defaults to the "Not Started" stage rather than "In Progress"? Any accurate solutions will be greatly appreciated, and I will mark your answer as resolved.
Thank you in advance for your help!