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

Issue Type must be selectable from fetched dropdown

      JIRA 7.0 comes in different flavors and because of that it does not have the "Bug" with ID=1 that is hardcoded in JiraRestService class.
      Need to provide a configuration dropdown field to select issue type.

      This results in an NPE during Create Issue task:

      java.lang.NullPointerException
      at hudson.plugins.jira.JiraSession.createIssue(JiraSession.java:305)
      

          [JENKINS-31164] Issue Type must be selectable from fetched dropdown

          Another option is to fetch the available issue types and use the ID of Bug if it is available, otherwise display dropdown field. However, a more generic approach to just select the issue type will be probably the best (with the Bug value option preselected for backwards compatibility).

          Radek Antoniuk added a comment - Another option is to fetch the available issue types and use the ID of Bug if it is available, otherwise display dropdown field. However, a more generic approach to just select the issue type will be probably the best (with the Bug value option preselected for backwards compatibility).

          Implemented with pull request https://github.com/jenkinsci/jira-plugin/pull/112 . Pending plugin release!

          Johno Crawford added a comment - Implemented with pull request https://github.com/jenkinsci/jira-plugin/pull/112 . Pending plugin release!

          Code changed in jenkins
          User: Johno Crawford
          Path:
          src/main/java/hudson/plugins/jira/JiraCreateIssueNotifier.java
          src/main/java/hudson/plugins/jira/JiraRestService.java
          src/main/java/hudson/plugins/jira/JiraSession.java
          src/main/resources/hudson/plugins/jira/JiraCreateIssueNotifier/config.jelly
          src/main/resources/hudson/plugins/jira/JiraCreateIssueNotifier/help-actionIdOnSuccess.html
          src/main/resources/hudson/plugins/jira/JiraCreateIssueNotifier/help-priorityId.html
          src/main/resources/hudson/plugins/jira/JiraCreateIssueNotifier/help-typeId.html
          src/test/java/hudson/plugins/jira/JiraCreateIssueNotifierTest.java
          http://jenkins-ci.org/commit/jira-plugin/0d70110f672840f9a0e8917353e89308b3f3a77c
          Log:
          JENKINS-31164: Configurable issue priorityId, typeId and actionIdOnSuccess

          Motivation:

          When Jenkins creates a JIRA ticket the priority and type ids are hardcoded and may break ticket creation as noted in JENKINS-31164.

          Modifications:

          Allow the admin to configure issue priority id and type id from the Jenkins job configuration.
          Allow the admin to configure actionId on success which allows the plugin to automatically resolve or close tickets.

          Result:

          Support for JIRA where the type ids are different and greater flexibility when setting up workflows.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Johno Crawford Path: src/main/java/hudson/plugins/jira/JiraCreateIssueNotifier.java src/main/java/hudson/plugins/jira/JiraRestService.java src/main/java/hudson/plugins/jira/JiraSession.java src/main/resources/hudson/plugins/jira/JiraCreateIssueNotifier/config.jelly src/main/resources/hudson/plugins/jira/JiraCreateIssueNotifier/help-actionIdOnSuccess.html src/main/resources/hudson/plugins/jira/JiraCreateIssueNotifier/help-priorityId.html src/main/resources/hudson/plugins/jira/JiraCreateIssueNotifier/help-typeId.html src/test/java/hudson/plugins/jira/JiraCreateIssueNotifierTest.java http://jenkins-ci.org/commit/jira-plugin/0d70110f672840f9a0e8917353e89308b3f3a77c Log: JENKINS-31164 : Configurable issue priorityId, typeId and actionIdOnSuccess Motivation: When Jenkins creates a JIRA ticket the priority and type ids are hardcoded and may break ticket creation as noted in JENKINS-31164 . Modifications: Allow the admin to configure issue priority id and type id from the Jenkins job configuration. Allow the admin to configure actionId on success which allows the plugin to automatically resolve or close tickets. Result: Support for JIRA where the type ids are different and greater flexibility when setting up workflows.

          Code changed in jenkins
          User: Radosław Antoniuk
          Path:
          src/main/java/hudson/plugins/jira/JiraCreateIssueNotifier.java
          src/main/java/hudson/plugins/jira/JiraRestService.java
          src/main/java/hudson/plugins/jira/JiraSession.java
          src/main/resources/hudson/plugins/jira/JiraCreateIssueNotifier/config.jelly
          src/main/resources/hudson/plugins/jira/JiraCreateIssueNotifier/help-actionIdOnSuccess.html
          src/main/resources/hudson/plugins/jira/JiraCreateIssueNotifier/help-priorityId.html
          src/main/resources/hudson/plugins/jira/JiraCreateIssueNotifier/help-typeId.html
          src/test/java/hudson/plugins/jira/JiraCreateIssueNotifierTest.java
          http://jenkins-ci.org/commit/jira-plugin/b5a325813b5e49b6107e888200b63eaa8a5311f7
          Log:
          Merge pull request #112 from johnou/configurable_priority_and_type

          JENKINS-31164: Configurable issue priority, type and actionIdOnSuccess.

          Compare: https://github.com/jenkinsci/jira-plugin/compare/37d7f69a8455...b5a325813b5e

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Radosław Antoniuk Path: src/main/java/hudson/plugins/jira/JiraCreateIssueNotifier.java src/main/java/hudson/plugins/jira/JiraRestService.java src/main/java/hudson/plugins/jira/JiraSession.java src/main/resources/hudson/plugins/jira/JiraCreateIssueNotifier/config.jelly src/main/resources/hudson/plugins/jira/JiraCreateIssueNotifier/help-actionIdOnSuccess.html src/main/resources/hudson/plugins/jira/JiraCreateIssueNotifier/help-priorityId.html src/main/resources/hudson/plugins/jira/JiraCreateIssueNotifier/help-typeId.html src/test/java/hudson/plugins/jira/JiraCreateIssueNotifierTest.java http://jenkins-ci.org/commit/jira-plugin/b5a325813b5e49b6107e888200b63eaa8a5311f7 Log: Merge pull request #112 from johnou/configurable_priority_and_type JENKINS-31164 : Configurable issue priority, type and actionIdOnSuccess. Compare: https://github.com/jenkinsci/jira-plugin/compare/37d7f69a8455...b5a325813b5e

            warden Radek Antoniuk
            warden Radek Antoniuk
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: