Evidence in clone target that a clone has taken place...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2022 02:36 PM
I do not see a whole lot of conversation on this topic, and maybe it is just because I am somewhat new to the ServiceNow experience.
In any given instance the Clone History table shows where THIS SOURCE has been cloned TO. That is great information to know, but how about the reverse angle? If I am in any given instance, how can I know A) when THIS INSTANCE was established as a clone and B) Which instance was it's SOURCE? If I wanted to know the source where an instance was cloned from, I would have to check the clone history of all my instances
But why couldn't the cloning automation insert a record in the Clone History as a breadcrumb of the source information. That should be a simple addition to the process (at least I think it would be), and I think it would be value add. From any instance you could then see the history of clones where I am the source AND when I was the target, where my data came from.
In lieu of this being added to the cloning automation (a la ServiceNow engineer / back-end server-based scripting), how about running a post-clone cleanup script which inserts a breadcrumb record someplace? I'd suggest the Clone History table, but maybe that is an off-limits system-managed table. and entry that you would prepare in advance of the clone which would announce "This was cloned from PROD" or something else meaningful. Ideally I'd love to record the source, target, date, time, initiator (person), request number or change number, and maybe if there were other meta-datq about the event. Maybe even a note about what tables were included, excluded, preserved, etc.
Does anyone have this question or concern? Does anyone have this already solved in your shop?
Respectfully submitted to this great community.
Rob

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2022 10:22 PM
Hi Rob,
A lot of us use a post-clone script to identify when a clone was performed for lower environments. I've not had a use case for identifying the source of a clone as I've only ever gone from a single prod downwards to sub-prods.
The below shows up on the banner of the backend SN view
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2022 07:49 AM
HM... I do not see that banner. Can you tell me where that is?
I thought about what you said above, and then I added a cleanup script "Insert CLONED FROM breadcrumb info" which executes on the clone.
This script inserts a sys_properties record "instance_cloned_from" and it sets the value to something like "Cloned from {instance name} on Wed, 20-Apr-2022 10:37:49".
The script also updates the sys_properties entry for 'glide.product.description' so it reads "Service Delivery-Cloned from {instance name} on Wed, 20-Apr-2022 10:37:49"
The script has the hard-coded source instance name, so if you ever clone from a non-prod to anyplace else, you can update this cleanup script beforehand.
Rob