This pre-deploy error appears when attempting to deploy a Jira element which contains a some username, which doesn't exist in the target environment.
What triggers this error?
When deploying to Jira, you may get the "Element references users which don’t exist in target environment" error, and an element won't be deployed because of this error.
This message shows up when Salto is trying to deploy Jira elements such as projects or boards which contain a reference to one or more users, but some of these users do not exist in the target environment. This means that Salto can't automatically deploy the element as-is, and you'll have to solve the problem in order to deploy it.
How can I solve this?
To solve this issue, you have 3 options:
Manually add this user to your target Jira environment. After doing that, try deploying again for Salto to identify the newly added user.
Manually edit the element's NACL file, and change the missing username to one which exists in the target environment. You can edit the NACL during a deployment, in the pre-deployment overview stage.
Add the DefaultMissingUserFallback option to your target Salto environment's configuration file.
When using environment deployments, your environment configuration can be accessed from the environment "Settings" tab:
The DefaultMissingUserFallback, under the "deploy" section, should be set to "##DEPLOYER##" or to a specific user ID:
If set to "##DEPLOYER##", Salto will replace missing users with the Deployer's username. You will get a pre-deploy warning to remind you when that happens with a "usernames will be overridden" message.
If set to a specific user ID, Salto will replace missing users with the username you provided. You will get a "usernames will be overridden" pre-deploy warning to remind you when that happens.
On Jira Cloud, use user emails as the ID for this configuration
On Jira Data Center, use usernames as the ID for this configuration
Here's an sample configuration file which includes this option:jira {
fetch = {
include = [
{
type = ".*"
},
]
exclude = [
]
}
deploy = {
defaultMissingUserFallback = "##DEPLOYER##"
}
}