Change request ATF issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2023 01:04 AM
Hey Developers,
I have an ATF on change table.
I also have a BR, where actual start date == planned start date.(javascript:gs.hoursAgo(-24))
Now the problem is,
actual end date will be capturing the closure time of final ctask under the change request.
Due to which I get an error saying actual end date is before actual start date.
Below are filed values filled in change form.
Is there a way I can use(minutes or seconds?) Ex:- javascript:gs.minutesAgo(-xxx)?(Which is currently not working).
Please suggest.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2023 01:23 AM
so basically you want to ensure end date > start date in ATF?
try this use "javascript:gs.daysAgo(-1)" for Actual start date and "javascript:gs.daysAgo(-2)" for Actual end date.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2023 03:31 AM
Actual start date will have value from Planned state date.
Actual end date will have value of final ctask closure date.
Example below.
These work fine manually.
While creating ATF, We have filled values like below,
Planned state date will be 24hrs Ago from now. Ex:- 04:00 pm 18 April (If we create now)
Same will be copied to Actual start date as well. 04:00 pm 18 April (Due to the BR we have)
Actual End date will capture closure time of final ctask.
Which can be on same day as well.
So problem begins here,
Planned start date = 04:00pm 18 April (Declared in ATF)
Actual start date = 04:00pm 18 April (Declared in BR)
Planned End Date = 04:00pm 18 May (Declared in ATF)
Problem, Actual End Date = 04:00pm 17 April.(As ctask closed today), Error = Actual End date can't be before Actual Start Date.
Need help to modify Planned start date in ATF to capture just 2 mints gap instead of 24 Hour gap.
javascript(colon)gs.hoursAgo(-24) to javascript(colon)gs.minutesAgo(-24) (Do we have something like minutes to declare in ATF's?)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2023 03:34 AM
We can't do this, "javascript:gs.daysAgo(-2)" for Actual end date.
Because Actual End Date will be captured from final ctask closure time.
We have BR which is doing this & can't modify that.
We need to put some seconds gap in Planned start date.
Is there something, javascript(colon)gs.minutesAgo(-2) or javascript(colon)gs.secondsAgo(-120)?
Please suggest.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2023 03:50 AM
then have custom step and create the logic and pass the value
ATF - Custom Step Configuration4 - Get Future/Prior Date from current date
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader