Help with Change Request Lead time
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-21-2013 12:29 PM
So our Change Manager wants me to update our Change Requests "The general lead-time is 10 days and anything from submit date to planned implementation date that is less than 10 days technically is an expedited change. Is there a way we can create system logic to monitor this and require the person to identify why this is expedited"
Currently we have a Planned Start Production Date (start_date) Is there anything I can do so it identifies the start_date if its less than 10 business days the it makes our field "u_expedite_change = true" which is a checkbox.
I tried to create a UI Policy see attachment but it doesn't work. Not sure why
I also thought maybe I could do something with a Business Rule and Glide Dates but can't figure out which one is for 10 days from now
http://wiki.servicenow.com/index.php?title=GlideSystem_Date_and_Time_Functions - Maybe 'start_date', '>' gs.beginningOfToday(10)???? I know it's probably something like that??? Can anyone help
Thanks so much
- Labels:
-
Change Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-29-2013 06:11 AM
Any ideas on how i can get a lead time to mark a field?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-04-2013 12:05 PM
Hi Wendy,
I am not sure whether it can be done through a UI policy. However, it can be done using a business rule:
Business rule properties:
Table: change_request
When: Before
Insert & Update: Check
Script:
if (!current.start_date.isNil())
checkExpediteChange(current);
function checkExpediteChange(current) {
if((gs.dateDiff(gs.nowDateTime(), current.start_date, true))/(60*60*24) <10){
current.u_expedite_change = true;
}
else
current.u_expedite_change = false;
}
====================End===============
I have done this in demo021 for you. I am new at writing business rules, so please use your own expertise before using it.
Thanks,
Tapish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-04-2013 12:52 PM
That's exactly what i am looking for. Is there anything i can add that if they don't fill out the "
u_reason_for_expedited_change" reason then it would error out. I figured out how to get the message message in your BR. But I cant figure out how to add it so they can't submit it unless that "Reason for expedited_change" is filled out? Thanks so much for your help. I can't script anything if my life depended on it.
--------------------------------------------------------------------------
if (!current.start_date.isNil())
checkExpediteChange(current);
function checkExpediteChange(current) {
if((gs.dateDiff(gs.nowDateTime(), current.start_date, true))/(60*60*24) <10){
current.u_expedite_change = true;
gs.addInfoMessage('Start Date is less than 10 days - Please go back and update Expedite Reason');
}
else
current.u_expedite_change = false;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-04-2013 04:25 PM
I am not too sure whether both the obejctives can be achived at the same time as to 'Expedite Change' to become true it needs to be posted, before it can be used to check whether 'Reason for expedite change' has value. But as I said I am not too sure so it may be possible but I don't know.
However, you can write a UI policy which will check 'Expedite Date' and will make 'Reason for expedite change' mandatory for subsequent changes on the change record. I have put a UI policy in demo021.
Thanks,
Tapish