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

If Updater fails to update due to missing permission, it crashes and never flushes the comment queue

    XMLWordPrintable

Details

    Description

      If the user does not have the appropriate permissions (in our case somebody referred to a read only issue), it crashes and will try again for the next build (it will post some more comments into the tickets that the user has permissions to and once it reaches the read-only issue ID, it will crash again, and so on)

      The problem lies here:
      https://github.com/jenkinsci/jira-plugin/blob/master/src/main/java/hudson/plugins/jira/Updater.java#L138

      According to the JIRA documentation, it should catch a RemoteException instead:

      com.atlassian.jira.rpc.soap.addComment

      Throws:

      • RemotePermissionException - If the user is not permitted to perform this operation in this context.
      • RemoteAuthenticationException - If the token is invalid or the SOAP session has timed out
      • RemoteException - If the issue does not exist or your dont have permission to see it

      Source:
      http://docs.atlassian.com/rpc-jira-plugin/latest/com/atlassian/jira/rpc/soap/JiraSoapService.html#addComment(java.lang.String, java.lang.String, com.atlassian.jira.rpc.soap.beans.RemoteComment)

      Attachments

        Issue Links

          Activity

            paul_muller Paul Muller created issue -
            paul_muller Paul Muller made changes -
            Field Original Value New Value
            Environment Jenkins 1.480
            JIRA 5.1.5
            Jenkins JIRA plugin 1.35
            jminne jminne made changes -
            Link This issue is related to JENKINS-13500 [ JENKINS-13500 ]
            warden Radek Antoniuk made changes -
            Assignee Radek Antoniuk [ warden ]
            warden Radek Antoniuk made changes -
            Labels jira-plugin-2.1
            warden Radek Antoniuk made changes -
            Remote Link This issue links to "PR50 (Web Link)" [ 13141 ]
            warden Radek Antoniuk made changes -
            Link This issue is duplicated by JENKINS-19875 [ JENKINS-19875 ]
            warden Radek Antoniuk made changes -
            Labels jira-plugin-2.1 jira-plugin-2.1 release-queue
            warden Radek Antoniuk made changes -
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Resolved [ 5 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 147988 ] JNJira + In-Review [ 192671 ]
            warden Radek Antoniuk made changes -
            Status Resolved [ 5 ] Closed [ 6 ]

            People

              warden Radek Antoniuk
              paul_muller Paul Muller
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: