Bug or Side effect?
I recently ran into something interesting while moving a Task List from a Farm to another using save as template with content. After successfully moving the list over I found out that for some of the items the assigned user have changed from one user to another, but for other items they did not.
Initially I thought that it is a bug on importing the List, then I decided to investigate further.
I opened the xml file from inside the stp file and took a look at the data saved for the Assigned To column. The user was saved in the format of: “#ID;Display Name”. It seems that during the import the #ID was the only one that got imported, and Display Name was changed.
My next question was why?
In the API the SPUser object is the one stored in Assigned To column. I also found that in each site collection there is a hidden list named “User Information List”.
Every time WSS provisions a new site collection, it automatically creates this “User Information List” as a hidden list in the top-level site. WSS then adds a new item for each external principal the first time that principal is assigned permission, or the first time it passes a security check to access a securable object. Note that the user profile stored in the User Information List does not extend across site collections—when users update their profile settings in one site collection, there are no changes to that user’s profile settings in other site collections.
Putting everything together – if we save a list as a template including content and then restore it on another site collection, any column that references a user will not be ported correctly. The contained user might change during this process because in the second environment, the ID numbers in the User Information List may be associated with different names.