title: Jenkins pipeline conditional stage using "When" for choice parameters
body: <p>I am trying to build a jenkins pipeline where I have a choice parameter with n choices and want to create a <code>stage</code> which does something when some values from the choice parameter are selected
  I have something like below but doesn't seem to work. </p>
  
  <pre><code>#!/usr/bin/env groovy
  
  pipeline {
  
  agent any
  
      parameters {
  
          choice(
                  choices: 'a\nb\n\c\n\d\ne\nf',
                  description: 'name of the student',
                  name: 'name'
          )
      }
   stages {
         stage ('callNames') {
  
          when {
               expression { params.name == 'a|d|f' }
          }
          steps{
          echo "selected name is: ${name}"
          //do something
  
              }
          }        
      }
  }
  </code></pre>
  
  <p>So, I want to <code>do something</code> when the selected values for the parameter <code>name</code> are either <code>a</code> or <code>d</code> of <code>f</code>
  For the above, I get no errors but I am seeing this in the console output</p>
  
  <p><code>Stage 'callNames' skipped due to when conditional</code> when I select the value <code>a/d/f</code> during the build</p>
  
  <p>Please let me know what's missing here
  Thanks in advance</p>