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

Post Function Transition Event support

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Major Major
    • jira-trigger-plugin
    • Jenkins v2.129 Jira-trigger v0.63 Jira v7.5.2

      Hello,

      We've added a webhook in Jira triggered by Comment Created and Issue updated, with the following SWL query:

       project in ("Integrated Interior Platform","OIP 2.0","SSW Core") and issuetype in (Story,Task)
      

      As the transition we're interested to use, Working to Verifying, has a custom event, StorytoWorking, we added a post function on it, to send also the event to the Hook, so this appears now in the webhook:
      TransitionsVerifying of IIP Story Workflow W/o Delivered

      In Jenkins, once the transition is done, I can see the event in logs:

      Jul 24, 2018 10:52:58 AM FINEST com.ceilfors.jenkins.plugins.jiratrigger.webhook.JiraWebhook
      Webhook event body:
      
      Jul 24, 2018 10:52:58 AM FINEST com.ceilfors.jenkins.plugins.jiratrigger.webhook.JiraWebhook
      {
          "transition": {
              "workflowId": 924280,
              "workflowName": "IIP Story Workflow W/o Delivered",
              "transitionId": 31,
              "transitionName": "Verifying",
              "from_status": "Working",
              "to_status": "Verifying"*strong text*
      

      but the job isn't triggered. If I repeat the transition, I see comment_created, the second time, instead of issue_updated:

      Jul 24, 2018 10:55:52 AM FINE com.ceilfors.jenkins.plugins.jiratrigger.webhook.JiraWebhook
      Received Webhook callback from comment. Event type: comment_created
      
      Jul 24, 2018 10:56:08 AM FINEST com.ceilfors.jenkins.plugins.jiratrigger.webhook.JiraWebhook
      Webhook event body:
      
      Jul 24, 2018 10:56:08 AM FINEST com.ceilfors.jenkins.plugins.jiratrigger.webhook.JiraWebhook
      {
          "transition": {
              "workflowId": 924280,
              "workflowName": "IIP Story Workflow W/o Delivered",
              "transitionId": 31,
              "transitionName": "Verifying",
              "from_status": "Working",
              "to_status": "Verifying"
          },
      

      I've added the setup from Jira and Jenkins. Can you help?

      PS: By comment the job can be triggered.

      Thank you.

        1. trigger1.JPG
          34 kB
          Marian Postole
        2. trigger2.JPG
          46 kB
          Marian Postole
        3. trigger3.JPG
          46 kB
          Marian Postole

            ceilfors Wisen Tanasa
            mpostole Marian Postole
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: