Hi all,
I’m working on revising our email template after it was noticed that the steps “appeared” out of order when the email was being reviewed after a failure. It appears that when the step gets the list of actions it puts the current step at the top of the list and any prior steps get rolled to the bottom of the list. I tried getting around that by adding the Step number in front of the Step name, but I can’t get the child steps to show their step number. Is there a good way to sort actions in their correct order as they appear on the Process page? If not, is there a way to get the child action step number?
Here is an example of how the emails come out (using our test project and aborting the manual intervention step).
- 2 - Email Deployment Created - Succeeded
- 4 - Email Deployment Proceed - Abandoned
- 5 - Deploy - Abandoned — NugetPackageId version 1.0.80-Dev
- #{Octopus.Step[#{action.Name}].Number} - Child Step -
- 6 - Send Deployment RESULTS Email - Running
- 1 - Get Current Date - Succeeded
- 3 - AcknowledgeDeploy - Failed The user did not complete the manual step Octopus.Server.Orchestration.Targets.Tasks.ActivityFailedException: The user did not complete the manual step at Octopus.Server.Orchestration.ServerTasks.Deploy.Steps.Manual.ManualActionHandler.ThrowOnUserAbort(Interruption interruption) at Octopus.Server.Orchestration.ServerTasks.Deploy.Steps.Manual.ManualActionHandler.Complete(ActionCommand command, String interruptionId) at Octopus.Server.Orchestration.ServerTasks.Deploy.DeploymentTaskController.ResumeAnyPausedSteps()
Here is what I’m using for the “deployment steps” section of the email:
<ul> #{each action in Octopus.Action} <li><strong>#{Octopus.Step[#{action.Name}].Number} - #{action.Name} - #{if Octopus.Step[#{action.Name}].Status.Code}#{Octopus.Step[#{action.Name}].Status.Code}#{/if} #{if Octopus.Step[#{action.Name}].Status.Error}#{Octopus.Step[#{action.Name}].Status.Error}#{/if} #{if Octopus.Step[#{action.Name}].Status.ErrorDetail}#{Octopus.Step[#{action.Name}].Status.ErrorDetail}#{/if}</strong> #{if action.Package.NuGetPackageId}— #{action.Package.NuGetPackageId} <em>version #{action.Package.NuGetPackageVersion}#{/if}</em> #{/each} </ul>