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

Issue Type must be selectable from fetched dropdown

    XMLWordPrintable

Details

    Description

      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)
      

      Attachments

        Issue Links

          Activity

            warden Radek Antoniuk created issue -
            warden Radek Antoniuk made changes -
            Field Original Value New Value
            Description 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.
            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:
            {code}
            java.lang.NullPointerException
            at hudson.plugins.jira.JiraSession.createIssue(JiraSession.java:305)
            {code}
            warden Radek Antoniuk made changes -
            Priority Minor [ 4 ] Critical [ 2 ]
            warden Radek Antoniuk made changes -
            Labels jira-plugin-2.2
            warden Radek Antoniuk made changes -
            Summary Hardcoded Bug value will not work with JIRA 7.0 Issue Type must be selectable from fetched dropdown
            warden Radek Antoniuk made changes -
            Issue Type Bug [ 1 ] Improvement [ 4 ]

            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).

            warden 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).
            warden Radek Antoniuk made changes -
            Assignee Radek Antoniuk [ warden ]
            warden Radek Antoniuk made changes -
            Labels jira-plugin-2.2
            zajic Jan Zajíc made changes -
            Link This issue is duplicated by JENKINS-21766 [ JENKINS-21766 ]
            warden Radek Antoniuk made changes -
            Assignee Radek Antoniuk [ warden ]
            warden Radek Antoniuk made changes -
            Link This issue duplicates JENKINS-21766 [ JENKINS-21766 ]
            warden Radek Antoniuk made changes -
            Link This issue is duplicated by JENKINS-21766 [ JENKINS-21766 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 166345 ] JNJira + In-Review [ 182363 ]
            warden Radek Antoniuk made changes -
            Link This issue relates to JENKINS-38026 [ JENKINS-38026 ]
            johno Johno Crawford made changes -
            Assignee Radek Antoniuk [ warden ]

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

            johno Johno Crawford added a comment - Implemented with pull request https://github.com/jenkinsci/jira-plugin/pull/112 . Pending plugin release!
            johno Johno Crawford made changes -
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Resolved [ 5 ]

            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_issue_link 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_issue_link 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 made changes -
            Labels jira-plugin-2.3
            warden Radek Antoniuk made changes -
            Link This issue is duplicated by JENKINS-21766 [ JENKINS-21766 ]
            warden Radek Antoniuk made changes -
            Link This issue duplicates JENKINS-21766 [ JENKINS-21766 ]
            cloudbees CloudBees Inc. made changes -
            Remote Link This issue links to "CloudBees Internal OSS-1648 (Web Link)" [ 18614 ]
            warden Radek Antoniuk made changes -
            Status Resolved [ 5 ] Closed [ 6 ]

            People

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

              Dates

                Created:
                Updated:
                Resolved: