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

Comment trigger is no longer supported in JIRA Cloud

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: jira-trigger-plugin
    • Labels:
      None
    • Environment:
    • Similar Issues:

      Description

      Originally reported by Patrick Ng at JENKINS-49085 with all of the details from his comment.

      Commenting on a JIRA ticket with a specific phrase does not seem to be sending a POST request to the jira-trigger-plugin webhook in Jenkins anymore. According to the plugin README, it says to only set event to issue_updated but creating a comment does not seem to trigger an issue_updated event POST to the webhook. This seems to be the reason why I can no longer trigger a job from a matching comment.

      Root cause: https://developer.atlassian.com/cloud/jira/platform/change-notice-removal-of-comments-from-issue-webhooks/

      Logs and example webhook event:

      Webhook event body:
      Jan 23, 2018 5:14:04 PM FINEST com.ceilfors.jenkins.plugins.jiratrigger.webhook.JiraWebhook
      {
          "timestamp": 1516745644071,
          "webhookEvent": "comment_created",
          "comment": {
              "self": "https://sportsrecruits.atlassian.net/rest/api/2/issue/38747/comment/43735",
              "id": "43735",
              "author": {
                  "self": "https://sportsrecruits.atlassian.net/rest/api/2/user?username=alex",
                  "name": "alex",
                  "key": "alex",
                  "accountId": "557058:93f71831-7090-4c70-ab8e-c9a5c9aa2d8e",
                  "avatarUrls": {
                      "48x48": "https://avatar-cdn.atlassian.com/07be219aa1f894b95a868f2eef9d4e17?s=48&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F07be219aa1f894b95a868f2eef9d4e17%3Fd%3Dmm%26s%3D48%26noRedirect%3Dtrue",
                      "24x24": "https://avatar-cdn.atlassian.com/07be219aa1f894b95a868f2eef9d4e17?s=24&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F07be219aa1f894b95a868f2eef9d4e17%3Fd%3Dmm%26s%3D24%26noRedirect%3Dtrue",
                      "16x16": "https://avatar-cdn.atlassian.com/07be219aa1f894b95a868f2eef9d4e17?s=16&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F07be219aa1f894b95a868f2eef9d4e17%3Fd%3Dmm%26s%3D16%26noRedirect%3Dtrue",
                      "32x32": "https://avatar-cdn.atlassian.com/07be219aa1f894b95a868f2eef9d4e17?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F07be219aa1f894b95a868f2eef9d4e17%3Fd%3Dmm%26s%3D32%26noRedirect%3Dtrue"
                  },
                  "displayName": "Alex Figueroa ",
                  "active": true,
                  "timeZone": "America/New_York"
              },
              "body": "Jenkins go home",
              "updateAuthor": {
                  "self": "https://sportsrecruits.atlassian.net/rest/api/2/user?username=alex",
                  "name": "alex",
                  "key": "alex",
                  "accountId": "557058:93f71831-7090-4c70-ab8e-c9a5c9aa2d8e",
                  "avatarUrls": {
                      "48x48": "https://avatar-cdn.atlassian.com/07be219aa1f894b95a868f2eef9d4e17?s=48&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F07be219aa1f894b95a868f2eef9d4e17%3Fd%3Dmm%26s%3D48%26noRedirect%3Dtrue",
                      "24x24": "https://avatar-cdn.atlassian.com/07be219aa1f894b95a868f2eef9d4e17?s=24&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F07be219aa1f894b95a868f2eef9d4e17%3Fd%3Dmm%26s%3D24%26noRedirect%3Dtrue",
                      "16x16": "https://avatar-cdn.atlassian.com/07be219aa1f894b95a868f2eef9d4e17?s=16&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F07be219aa1f894b95a868f2eef9d4e17%3Fd%3Dmm%26s%3D16%26noRedirect%3Dtrue",
                      "32x32": "https://avatar-cdn.atlassian.com/07be219aa1f894b95a868f2eef9d4e17?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F07be219aa1f894b95a868f2eef9d4e17%3Fd%3Dmm%26s%3D32%26noRedirect%3Dtrue"
                  },
                  "displayName": "Alex Figueroa ",
                  "active": true,
                  "timeZone": "America/New_York"
              },
              "created": "2018-01-23T17:14:04.071-0500",
              "updated": "2018-01-23T17:14:04.071-0500"
          },
          "issue": {
              "id": "38747",
              "self": "https://sportsrecruits.atlassian.net/rest/api/2/issue/38747",
              "key": "SR-4186",
              "fields": {
                  "summary": "Identify and fix email address entry points to strip white space",
                  "issuetype": {
                      "self": "https://sportsrecruits.atlassian.net/rest/api/2/issuetype/3",
                      "id": "3",
                      "description": "A task that needs to be done.",
                      "iconUrl": "https://sportsrecruits.atlassian.net/secure/viewavatar?size=xsmall&avatarId=10318&avatarType=issuetype",
                      "name": "Task",
                      "subtask": false,
                      "avatarId": 10318
                  },
                  "project": {
                      "self": "https://sportsrecruits.atlassian.net/rest/api/2/project/10000",
                      "id": "10000",
                      "key": "SR",
                      "name": "Sports Recruits",
                      "projectTypeKey": "software",
                      "avatarUrls": {
                          "48x48": "https://sportsrecruits.atlassian.net/secure/projectavatar?pid=10000&avatarId=11300",
                          "24x24": "https://sportsrecruits.atlassian.net/secure/projectavatar?size=small&pid=10000&avatarId=11300",
                          "16x16": "https://sportsrecruits.atlassian.net/secure/projectavatar?size=xsmall&pid=10000&avatarId=11300",
                          "32x32": "https://sportsrecruits.atlassian.net/secure/projectavatar?size=medium&pid=10000&avatarId=11300"
                      }
                  },
                  "assignee": {
                      "self": "https://sportsrecruits.atlassian.net/rest/api/2/user?username=Paul",
                      "name": "Paul",
                      "key": "paul",
                      "accountId": "5a43c904b66c2f374530f7b7",
                      "emailAddress": "paul@sportsrecruits.com",
                      "avatarUrls": {
                          "48x48": "https://avatar-cdn.atlassian.com/d7a71cabea4d48b35a499dd3a68a5fcb?s=48&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fd7a71cabea4d48b35a499dd3a68a5fcb%3Fd%3Dmm%26s%3D48%26noRedirect%3Dtrue",
                          "24x24": "https://avatar-cdn.atlassian.com/d7a71cabea4d48b35a499dd3a68a5fcb?s=24&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fd7a71cabea4d48b35a499dd3a68a5fcb%3Fd%3Dmm%26s%3D24%26noRedirect%3Dtrue",
                          "16x16": "https://avatar-cdn.atlassian.com/d7a71cabea4d48b35a499dd3a68a5fcb?s=16&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fd7a71cabea4d48b35a499dd3a68a5fcb%3Fd%3Dmm%26s%3D16%26noRedirect%3Dtrue",
                          "32x32": "https://avatar-cdn.atlassian.com/d7a71cabea4d48b35a499dd3a68a5fcb?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fd7a71cabea4d48b35a499dd3a68a5fcb%3Fd%3Dmm%26s%3D32%26noRedirect%3Dtrue"
                      },
                      "displayName": "Paul Cox",
                      "active": true,
                      "timeZone": "America/New_York"
                  },
                  "priority": {
                      "self": "https://sportsrecruits.atlassian.net/rest/api/2/priority/3",
                      "iconUrl": "https://sportsrecruits.atlassian.net/images/icons/priorities/major.svg",
                      "name": "Major",
                      "id": "3"
                  },
                  "status": {
                      "self": "https://sportsrecruits.atlassian.net/rest/api/2/status/10500",
                      "description": "This is managed by JIRA",
                      "iconUrl": "https://sportsrecruits.atlassian.net/images/icons/statuses/generic.png",
                      "name": "QA on stage",
                      "id": "10500",
                      "statusCategory": {
                          "self": "https://sportsrecruits.atlassian.net/rest/api/2/statuscategory/4",
                          "id": 4,
                          "key": "indeterminate",
                          "colorName": "yellow",
                          "name": "In Progress"
                      }
                  }
              }
          }
      }
      Jan 23, 2018 5:14:04 PM WARNING java_util_logging_Logger$warning$1 call
      Received Webhook callback with an invalid event type or a body without comment/changelog. Event type: comment_created. Event body contains: [timestamp, webhookEvent, comment, issue].
      

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Wisen Tanasa
            Path:
            src/integrationTest/groovy/com/ceilfors/jenkins/plugins/jiratrigger/JiraTriggerAcceptanceTest.groovy
            src/integrationTest/groovy/com/ceilfors/jenkins/plugins/jiratrigger/integration/FakeJiraCloudRunner.groovy
            src/integrationTest/groovy/com/ceilfors/jenkins/plugins/jiratrigger/integration/FakeJiraRunner.groovy
            src/integrationTest/groovy/com/ceilfors/jenkins/plugins/jiratrigger/integration/JenkinsRunner.groovy
            src/integrationTest/resources/com/ceilfors/jenkins/plugins/jiratrigger/integration/cloudAddComment.json
            http://jenkins-ci.org/commit/jira-trigger-plugin/30fe790579a9023d6601745287c5521bf33df28a
            Log:
            JENKINS-49178 Add failing acceptance test.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Wisen Tanasa Path: src/integrationTest/groovy/com/ceilfors/jenkins/plugins/jiratrigger/JiraTriggerAcceptanceTest.groovy src/integrationTest/groovy/com/ceilfors/jenkins/plugins/jiratrigger/integration/FakeJiraCloudRunner.groovy src/integrationTest/groovy/com/ceilfors/jenkins/plugins/jiratrigger/integration/FakeJiraRunner.groovy src/integrationTest/groovy/com/ceilfors/jenkins/plugins/jiratrigger/integration/JenkinsRunner.groovy src/integrationTest/resources/com/ceilfors/jenkins/plugins/jiratrigger/integration/cloudAddComment.json http://jenkins-ci.org/commit/jira-trigger-plugin/30fe790579a9023d6601745287c5521bf33df28a Log: JENKINS-49178 Add failing acceptance test.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Wisen Tanasa
            Path:
            src/integrationTest/groovy/com/ceilfors/jenkins/plugins/jiratrigger/JiraTriggerAcceptanceTest.groovy
            src/integrationTest/resources/com/ceilfors/jenkins/plugins/jiratrigger/integration/cloudAddComment.json
            src/jiraIntegrationTest/groovy/com/ceilfors/jenkins/plugins/jiratrigger/integration/RealJiraSetupRule.groovy
            src/main/groovy/com/ceilfors/jenkins/plugins/jiratrigger/webhook/JiraWebhook.groovy
            src/main/groovy/com/ceilfors/jenkins/plugins/jiratrigger/webhook/WebhookChangelogEventJsonParser.groovy
            src/main/groovy/com/ceilfors/jenkins/plugins/jiratrigger/webhook/WebhookCommentEventJsonParser.groovy
            src/main/groovy/com/ceilfors/jenkins/plugins/jiratrigger/webhook/WebhookJsonParserUtils.groovy
            src/test/groovy/com/ceilfors/jenkins/plugins/jiratrigger/webhook/JiraWebhookTest.groovy
            src/test/resources/com/ceilfors/jenkins/plugins/jiratrigger/webhook/cloud_comment_added.json
            http://jenkins-ci.org/commit/jira-trigger-plugin/bb6e048eb5c2a6f670e37c512a4f825f1965b174
            Log:
            JENKINS-49178 Support JIRA Cloud comment event.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Wisen Tanasa Path: src/integrationTest/groovy/com/ceilfors/jenkins/plugins/jiratrigger/JiraTriggerAcceptanceTest.groovy src/integrationTest/resources/com/ceilfors/jenkins/plugins/jiratrigger/integration/cloudAddComment.json src/jiraIntegrationTest/groovy/com/ceilfors/jenkins/plugins/jiratrigger/integration/RealJiraSetupRule.groovy src/main/groovy/com/ceilfors/jenkins/plugins/jiratrigger/webhook/JiraWebhook.groovy src/main/groovy/com/ceilfors/jenkins/plugins/jiratrigger/webhook/WebhookChangelogEventJsonParser.groovy src/main/groovy/com/ceilfors/jenkins/plugins/jiratrigger/webhook/WebhookCommentEventJsonParser.groovy src/main/groovy/com/ceilfors/jenkins/plugins/jiratrigger/webhook/WebhookJsonParserUtils.groovy src/test/groovy/com/ceilfors/jenkins/plugins/jiratrigger/webhook/JiraWebhookTest.groovy src/test/resources/com/ceilfors/jenkins/plugins/jiratrigger/webhook/cloud_comment_added.json http://jenkins-ci.org/commit/jira-trigger-plugin/bb6e048eb5c2a6f670e37c512a4f825f1965b174 Log: JENKINS-49178 Support JIRA Cloud comment event.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Wisen Tanasa
            Path:
            README.md
            http://jenkins-ci.org/commit/jira-trigger-plugin/a4203aac5c718b8b23bc401cfb99993525ea571d
            Log:
            JENKINS-49178 Update README to setup JIRA Cloud.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Wisen Tanasa Path: README.md http://jenkins-ci.org/commit/jira-trigger-plugin/a4203aac5c718b8b23bc401cfb99993525ea571d Log: JENKINS-49178 Update README to setup JIRA Cloud.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Wisen Tanasa
            Path:
            src/main/groovy/com/ceilfors/jenkins/plugins/jiratrigger/webhook/WebhookChangelogEventJsonParser.groovy
            src/main/groovy/com/ceilfors/jenkins/plugins/jiratrigger/webhook/WebhookCommentEventJsonParser.groovy
            src/main/groovy/com/ceilfors/jenkins/plugins/jiratrigger/webhook/WebhookJsonParserUtils.groovy
            http://jenkins-ci.org/commit/jira-trigger-plugin/e3eb73b12a0aa1c7a90562beadfed881dcbb2faa
            Log:
            JENKINS-49178 Refactor variable names.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Wisen Tanasa Path: src/main/groovy/com/ceilfors/jenkins/plugins/jiratrigger/webhook/WebhookChangelogEventJsonParser.groovy src/main/groovy/com/ceilfors/jenkins/plugins/jiratrigger/webhook/WebhookCommentEventJsonParser.groovy src/main/groovy/com/ceilfors/jenkins/plugins/jiratrigger/webhook/WebhookJsonParserUtils.groovy http://jenkins-ci.org/commit/jira-trigger-plugin/e3eb73b12a0aa1c7a90562beadfed881dcbb2faa Log: JENKINS-49178 Refactor variable names.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -
            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Wisen Tanasa Path: CHANGELOG.md http://jenkins-ci.org/commit/jira-trigger-plugin/61aed0fe7640d9d333a600312bda5fcc2c25681b Log: Add JENKINS-49178 to CHANGELOG. Compare: https://github.com/jenkinsci/jira-trigger-plugin/compare/30fe790579a9 ^...61aed0fe7640
            Hide
            ceilfors Wisen Tanasa added a comment -

            Fix is released under version 0.6.0. Do note that there's a breaking change under that version that's documented in the CHANGELOG.md.

            CC: Patrick Ng Dmitriy Kagarlickij Rathishan P Do let me know if the fix is not working for you.

            Show
            ceilfors Wisen Tanasa added a comment - Fix is released under version 0.6.0. Do note that there's a breaking change under that version that's documented in the CHANGELOG.md . CC: Patrick Ng Dmitriy Kagarlickij Rathishan P Do let me know if the fix is not working for you.

              People

              • Assignee:
                ceilfors Wisen Tanasa
                Reporter:
                ceilfors Wisen Tanasa
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: