The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Change request ATF issue.

Naveen87
Tera Guru

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.

Naveen87_0-1681718387188.png

Naveen87_1-1681718491339.png

 

 

5 REPLIES 5

Ankur Bawiskar
Tera Patron
Tera Patron

@Naveen87 

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.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Ankur Bawiskar ,

Actual start date will have value from Planned state date.

Actual end date will have value of final ctask closure date.

Example below.

Naveen87_0-1681726872568.png

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)

 

 

Naveen87_1-1681726920902.png

 

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?)

 

 

 

@Ankur Bawiskar ,

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.   

@Naveen87 

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.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader