Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-29573

IndexOutOfBoundsException error when jql returns no issue

XMLWordPrintable

      I'm getting an error when Jira issue updater can't find any issue to update.
      I've looked the code and the problem is here "issues.get(0)" at line 228, maybe just change the if clause at line 227 is going to work (if ( ! fixedVersionNames.isEmpty() && !issues.isEmpty() ))

      This is the stack I got:
      Your JQL, 'IssueKey IN (PRD-0000)' did not return any issues. No issues will be updated during this build.
      ERROR: Build step failed with exception
      java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
      at java.util.ArrayList.rangeCheck(Unknown Source)
      at java.util.ArrayList.get(Unknown Source)
      at info.bluefloyd.jenkins.IssueUpdatesBuilder.perform(IssueUpdatesBuilder.java:228)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
      at hudson.model.Build$BuildExecution.build(Build.java:205)
      at hudson.model.Build$BuildExecution.doRun(Build.java:162)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:537)
      at hudson.model.Run.execute(Run.java:1741)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:98)
      at hudson.model.Executor.run(Executor.java:381)

      Thank you!

            idenardi Ivan Denardi
            idenardi Ivan Denardi
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: