You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A successful deployment of #{Octopus.Project.Name} in the #{Octopus.Environment.Name} environment on #{ | NowDate | Format DateTime \"HH dd-MM-yyyy\"} has occurred.
Result: The email writes out just that without any of the variables substituting, including the system variables.
Workaround: If you remove the escape from the quotes (#{ | NowDate | Format DateTime "HH dd-MM-yyyy"}), all variables in the body are substituted as expected.
This would be due to the evaluation aborting due to an error and then just returning the original string. We should look into whether we can easily just skip over that one. If not, close as wont-fix
Although Octostache is currently built to fail to replace any variables if the expression contains invalid variable patterns, a fix has been added to provide a warning if this takes place since it is understandable that a block of text like the body is much more likely to encounter this problem.
Not that if a variable cannot be found, the other variables in the body will still be replaced
This thread has been automatically locked since there has not been any recent activity after it was closed. If you think you've found a related issue, please contact our support team so we can triage your issue, and make sure it's handled appropriately.
lockbot
locked as resolved and limited conversation to collaborators
Aug 25, 2019
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Octopus 2018.6.15
Steps to reproduce
#{Octopus.Project.Name}
) along with the MyDate variable with formatting (shown in blog post: https://octopus.com/blog/octostache-json-formatting#formatting)It'll look something like this:
Result: The email writes out just that without any of the variables substituting, including the system variables.
Workaround: If you remove the escape from the quotes (
#{ | NowDate | Format DateTime "HH dd-MM-yyyy"}
), all variables in the body are substituted as expected.Source: https://help.octopus.com/t/octopus-project-name-and-other-variables-not-being-replaced-in-email-body/20792
The text was updated successfully, but these errors were encountered: