I have a multi tentant project and I want to know the previously released number for that project (and for the current environment) but I am getting a random(?) number. I am using:
Release.PreviousForEnvironment.Number
But it returns not the previous number for that tenant (in my case: it gives the number of the tenant above it, but that seems a coincidence).
Is this a bug? Is this not supported? In fact I think I am looking for:
Thanks for getting in touch! Getting a random number from this Release.PreviousForEnvironment.Number sounds very strange. It should be pulling the latest release number deployed to that environment (and this is regardless of the tenant). If you don’t see any reason for the value you’re getting back, could you provide some additional information to help me dig in further? A verbose deployment log with debugging variables enabled will be the most helpful, and you can reference the doc page below.
Unfortunately we don’t have a specific system variable for the previous release version for environment and tenant combination. I think this sounds like a good idea for a new variable, and I’ll bring it up with my team. For the time being, I was able to get the last successfully deployed release to the environment/tenant combination by going directly via the API in a script step which I’ll paste below.
That sounds great! Thanks for letting me know. I agree this would be a good variable to add, though I’m not sure how highly it could be prioritized. It might be worth suggesting this on our UserVoice site in order to gauge community support behind it.