Setting one Project variable to another Project variable

Hi folks.

I’m trying to do something that seems it should be quite simple to me. I have 2 project variables, TrunkBuildNumber and ReleaseBuildNumber, and I am trying to set ReleaseBuildNumber to TrunkBuildNumber.

To do this I have created a stage in my configuration and use the “set variable” stage to assign the value. The problem is that the configuration run will fail with the message that TrunkBuildNumber is not a valid number. I have tried using both $$ and %% around the variable name, but no dice. Am I missing something fundamental here?

As to the why:
Basically we have 3 configurations that are all essentially trunk builds, that will continuously increment the Trunk Build Number. This part works fine.
What I am trying to do is to have an easy way to generate a new Release build number, that will assign the current TrunkBuildNumber variable to ReleaseBuildNumber variable, and then reset the TrunkBuildNumber. To do this I have set up a configuration that just sets Variable values and then persists the values.

Any help appreciated at this point.
Thanks
Carlos

 

Hi Carlos,

I suspect that you have not ticked the “Expand variable references in new value” checkbox for the Set Variable action. Note also that the New Value should be specified as %TrunkBuildNumber%. 

Otherwise if you send us full details of the settings you have entered in both the Set Variable action dialog and the Edit Variable dialogs for each variable, this will help us to diagnose your issue further. 

Posted By Dave Sparks on 31 Oct 2016 05:55 PM
Hi Carlos,

I suspect that you have not ticked the "Expand variable references in new value" checkbox for the Set Variable action. Note also that the New Value should be specified as %TrunkBuildNumber%. 

Otherwise if you send us full details of the settings you have entered in both the Set Variable action dialog and the Edit Variable dialogs for each variable, this will help us to diagnose your issue further. 


That was it. Thank you kindly sir. It is working a treat now