title: Updating Jira items from Jenkins Pipeline build: jiraIssueSelector doesn't find any issues
body: <p>In freestyle Jenkins jobs, there is a post-build step called <code>&quot;JIRA: Update relevant issues&quot;</code>.  This job will add comments in the the appropriate JIRA tasks (based on commit messages) saying whether the build succeeded or failed.</p>
  <p>[![JIRA: Update relevant issues][1]][1]
  [1]: https://i.stack.imgur.com/aBJVZ.png</p>
  <p>I am wanting to do the same thing from a pipeline job.</p>
  <p>As far as I can tell, there's nothing built-in that does all of that in one step like the post-build step for freestyle jobs does.</p>
  <p>I <em>am</em> able to use the <code>jiraComment</code> pipeline step to add comments to Jira items, but I still need to figure out from the commit messages which Jira items need to be updated.</p>
  <p>I am trying to use the <code>jiraIssueSelector</code> pipeline step to do that.</p>
  <p>When I put the following in my Jenkinsfile:</p>
  <pre><code>    def issueKeys = jiraIssueSelector(issueSelector: [$class: 'DefaultIssueSelector'])    
      echo &quot;${issueKeys.size()}&quot;
  </code></pre>
  <p>And run it against a commit with the commit message <code>&quot;DEVO-2398 DEVO-2399&quot;</code>, it gives me the output</p>
  <pre><code>    [Pipeline] jiraIssueSelector
      [Pipeline] echo
      0
  </code></pre>
  <p>The <code>jiraIssueSelector</code> is not finding <em>any</em> jiraIssues in the commit message.</p>
  <p>When I run a freestyle job with the <code>JIRA: Update relevant issues</code> post-build step against that same git commit, it finds both Jira issues.  I get the following output:</p>
  <pre><code>[JIRA] Updating issue DEVO-2399
  [JIRA] Updating issue DEVO-2398
  </code></pre>
  <p>So my question is twofold:</p>
  <ol>
  <li>Is there an easier way to replicate the functionality of the Jira post-build step in pipeline than by combining <code>jiraComment</code> and <code>jiraIssueSelector</code>?</li>
  <li>Assuming that there is not, what am I doing wrong with <code>jiraIssueSelector</code>?  Why is it not finding any Jira issues in the commit message when there the Jira post-build step is able to find them just find them just fine?</li>
  </ol>