User references during change set deployment
Key Takeaway
During a change set deployment, Salesforce matches users by username and ignores the sandbox suffix. If a username doesn't exist in the destination org, the deployment stops with an error.
Some components in a change set refer to a specific user. When you deploy, Salesforce has to find that same person in the destination org, so usernames can affect whether the deployment goes through.
How Salesforce finds a matching user
Examples of components that refer to a specific user are the recipients of workflow email notifications and a dashboard running user. During a change set deployment, Salesforce tries to find a matching user in the destination org by comparing usernames.
When you copy data to a sandbox, the usernames from the production org change to include the sandbox name.
For example, in a sandbox named test, the username user@acme.com becomes user@acme.com.test. The .test at the end is the sandbox suffix.
During a change set deployment, Salesforce ignores the sandbox suffix, so a user you add to a component in one sandbox carries over to other sandboxes or to the production org.