IsSkipped not working?

Hi,

We have this snippet used to send an email after the deployment is done:

  #{each action in Octopus.Action}
    #{unless action.IsSkipped }
    <li><strong>
      #{action.Name}</strong> #{if action.Package.NuGetPackageId}&mdash; #{action.Package.NuGetPackageId} 
      <em>version #{action.Package.NuGetPackageVersion}#{/if}</em>
    </li>
   #{/unless}
  #{/each}

And it worked just fine, only steps/actions that were actually executed, were included in the email.

After upgrading to a version post 3.5.5, where the steps could be disabled, the email shows all steps, even those that are disabled.
We also used to have several parent steps with actions in them, then we changed all steps into actions - no more parent steps.
Could it be related to this change?

Currently we want to exclude actions that are either skipped or disabled.
But the action object doesn’t have a IsDisabled property. At least I couldn’t find it.

Hi,

Thanks for reaching out! I’m sorry you hit this unexpected behavior. I was able to replicate what you’re seeing with your script. The disabled steps aren’t logged, though they are included in the email. I talked it over with my team, and we came to the consensus that it should be consistent and not show disabled steps in the email. We’ve opened up a GitHub issue which you can track.

Don’t hesitate to get in touch if you have any further issues.

Kenny

Hi,
I’ve upgraded to 3.7.18 and the code snippet used for the email still displays the actions that were skipped.

In the attachment, all the actions underlined with red are disabled.

Hi,

I just noticed that you have a space after IsSkipped, could you try removing that?

Otherwise, please turn on variable logging and send us the task log.

Robert W

Thanks, the space was causing the problem.

Hi,

Thanks for letting me know, I’ve raised an issues for that.

Robert W