The CreatorCon Call for Content is officially open! Get started here.

Help with ATF with respect to VR

Community Alums
Not applicable

Hi,

I have a requirement concerning VR using ATF. The requirement based on the selected variables in the pictures is 'the remediation target date should be 180 days after last opened'. I need to put this requirement in the ATF Test Steps. Kindly help.

 

IMG_6312.JPGIMG_6313.JPG

 

condition.png

 

Test Case 1.png

Test Case 2.png

Test Case 3.png

Test Case 4.png

 

Regards

Suman P.

6 REPLIES 6

Community Alums
Not applicable

Hi @Brian Lancaster,

Yes, exactly, but I don't know how to do it. Please take an example of incident with start date and  end date.

Regards

Suman P.

I think what you are going to need to do here is create a custom test step (Server Side) where you pass the records id. Then in the test step you will need to use the document ID to lookup the 2 field in the records using datediff. Some references below related to datediff.

https://developer.servicenow.com/dev.do#!/reference/api/washingtondc/server/no-namespace/GlideDBFunc...

 

https://docs.servicenow.com/bundle/xanadu-platform-administration/page/administer/time/concept/c_Res...

 

The only problem might be the face that one field is a date/time where the other is just a date. You may be able to get around this by converting the date/time field into a date by using glide date. You could also take the last open field and add 180 days to it then validate that it the matches remediation target. This would also be using GlideDate.

https://docs.servicenow.com/bundle/xanadu-api-reference/page/app-store/dev_portal/API_reference/Glid...