Step Template taking project variable value rather then the value passed in the step (When project variable name is the same as the one defined in the step template)

Octopus Version: 3.2.10

When passing in a parameter to a step template, if there is a project variable using the same name as the parameter, that value is used rather then the value passed into the step template.

E.G

Set-QueueDetails -queueNames $OctopusParameters['QueueNames'] `
                 -isTransactionalQueue ([System.Convert]::ToBoolean($OctopusParameters['IsTransactionalQueue'])) `
                 -enableJournaling ([System.Convert]::ToBoolean($OctopusParameters['EnableJournaling'])) `
                 -isClusteredQueue ([System.Convert]::ToBoolean($OctopusParameters['IsClusteredQueue'])) `
                 -MSMQNetworkName $OctopusParameters['MSMQNetworkName'] `
                 -ClusterGroupName $OctopusParameters['ClusterGroupName']

Project variables:
MSMQNetworkName = 'Server1’
MSMQNetworkName2 = ‘Server2’

Creating two steps in the deployment process using the same step template but populating the MSMQNetworkName field with ‘MSMQNetworkName’ and ‘MSMQNetworkName2’ respectivley. When the second step is hit the value for MSMQNetworkName in the step template is picking up the value ‘Server1’

Hi Jonathan,

Thanks for reaching out!

If you have duplicate variable names between the Project and the Step Template on it, the Project level variable will always prevail, as it is more specific. This is a know behavior (not an issue) that has confused some users, and for that reason we added a log message for those scenarios in 3.2.17.

Best regards,
Dalmiro