I am getting the error while order a catalog item in ATF

kranthi2
Tera Expert

Hi,

If i try to use the Order a catalog item(SP) step in ATF it is showing the error message, which means already data is present in the system, hence this error is showing, any possibility to rectify this. 

kranthi2_0-1744454028464.png

 

I can Resolve/Close this case then i can run the ATF but that is not the case for all the times.

 

Thanks

 

5 REPLIES 5

Robert H
Mega Sage

Hello @kranthi2 ,

 

Do you get the same error when trying to submit this Catalog Item manually, going through the same steps and entering the same data as the ATF test?

 

This does not look like an ATF issue but a custom business logic that blocks something as long as an Incident for the same "product" is still open. So I guess that Incident would need to be closed first.

 

Regards,

Robert

 

 

Yes, exactly if i try to submit it manually still i am getting this,

I can change this manually and perform the manual testing

Also, i can change values or i can close the incident and resubmit the same, but I can't do this kind this activity every time testing runs.

 

Provide me some workaround here.

 

Thanks

Hello @kranthi2 ,

 

Thanks for the response. So this has nothing to do with ATF.

 

As I said, it's your custom business logic that is preventing you from submitting this request while an Incident for the same product is open. As long as that logic is there you have no choice but to close any such Incidents before submitting this Catalog Item.

 

Of course you could automate this in your ATF test, by adding a "Run Server Side Script" Test Step at the beginning of your Test. The script would run a GlideRecord query for any open Incidents that are related to this particular product, and close them. 

 

Regards,

Robert

@Robert H 

Kindly help me out the script for the same. what script need to be added into the "Run Server side script" step.

Thanks