Export Incident to xml, import loses order of activity stream

Cort1
Tera Expert

I want to export some incidents to xml in our test environment, save them and re-import once we clone over from production on a monthly basis. I tried to export and import in our dev instance but noticed that all the comments and notes in the activity stream are no longer in the same order. The timestamp is not the same either, which is fine, but I was hoping the sequence would remain. It did not.

Have you experienced this?

1 ACCEPTED SOLUTION

Chuck Tomasi
Tera Patron

Hi Cortney,



I recall hearing something about this a few months back. I verified it on my Helsinki (p1) instance a few moments ago.



Source record activities:


find_real_file.png



Target record activities:


find_real_file.png



While mine remained in order, the date on today's comment does not correspond. I recall hearing something about an open PRB on this, but don't have the number. If you call support, they can find it for you.



HI Service Portal - ServiceNow


Contact Support | ServiceNow


View solution in original post

15 REPLIES 15

Hi,

Yes I did, I figured it out on my own.

What you need to do is:

1) delete the records you have imported to your new instance, just the ones affected by all this.

2) In your old instance, export these files in XML:

-Records you wish to move to new instance

-sys_audit.list for the time period of those records

-sys_history_set.list for the time period of those records

-sys_history_line.list for the time period of those records

-sys_email.list for the time period of those records

3) Import those files in to any list BUT ensure you import the actual records XML file last...do all the other tables first.

4) Profit!

*Side note: if you are coming from Express, there is a limitation of 40,000 rows for XML, you will need to either have SN HI Support increase that...or ensure your pull is less than that.* If it's from another Enterprise instance, I would double-check your XML export limit in sys_properties.list.


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!