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

JIRA Trigger Plugin doesn't map all non-custom Issue objects

    Details

    • Type: New Feature
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: jira-trigger-plugin
    • Labels:
      None
    • Environment:
      jira-trigger: 0.5.1
      Jenkins ver.: 2.60.3
      java.runtime.name OpenJDK Runtime Environment
      java.runtime.version 1.8.0_131-b12
      JIRA: v7.3.1
    • Similar Issues:

      Description

      Hi Wisen,

      It seems the excellent jira-trigger plugin isn't able to map all non-custom Issues attributes to parameters.

      Webhooks are working and I have successfully resolved my JIRA_ISSUE_KEY

      echo KEY: ${JIRA_ISSUE_KEY}
      KEY: TESJIRA-204

      Now I'll provide some representative working and failing examples to demonstrate the problem.

       

      1. Working example of top level data**

      JSON payload:

      "summary": "Asset 3: Work being completed",

      echo SUM: ${SUM}
      SUM: Asset 3: Work being completed

       

      2. Working example of nested data

      JSON payload (abridged):

      "assignee": {
          "name": "marcus.greville",
      },

      echo ASSIG: ${ASSIG}
      ASSIG: marcus.greville

       

      3. Failing example of top level data

      JSON payload:

      "lastViewed": "2017-09-11T14:06:10.573+1000",

      echo LV: ${LV}
      LV:

       

      When an item fails to resolve this gets posted to the logs -

      Sep 11, 2017 6:55:47 PM SEVERE java_util_logging_Logger$log$2 call

      Hit JiraTriggerException! (jira-trigger-plugin has failed to translate this exception to a human friendly error message, please report a bug).
      com.ceilfors.jenkins.plugins.jiratrigger.JiraTriggerException: Class: ParameterErrorCode, Name: FAILED_TO_RESOLVE, Code: 1, Attributes: [:]
          at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
          at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)

       

      Full trace is attaced - jira_trigger_plugin_stack_trace.txt

      The item failures have no apparent pattern to my eye.

      I will mention here for completeness sake the CustomFields I tested would not resolve either.

      I believe the issue is likely the same as https://issues.jenkins-ci.org/browse/JENKINS-39766

      If there is anything other detail I can provide let me know.

      Regards.

        Attachments

          Activity

          Hide
          ceilfors Wisen Tanasa added a comment -

          Can you attach the log as per the instruction here: enable-logging with FINEST method? It is possible that your JIRA Webhook is not configured correctly. FINEST log level will print the event body that you are getting in Jenkins.

          Show
          ceilfors Wisen Tanasa added a comment - Can you attach the log as per the instruction here: enable-logging with FINEST method? It is possible that your JIRA Webhook is not configured correctly. FINEST log level will print the event body that you are getting in Jenkins.
          Hide
          mgreville Marcus Greville added a comment - - edited

          Hi Wisen, thanks for the speedy reply. Attached is the requested log. You'll notice a few comments, I've been busy trying to capture my fields and have swapped between v 0.5.0 -> 0.5.1 -> 0.4.2 -> 0.5.1 to get it to work.

          JIRA-webhook-POST-results.zip

          Thanks and regards.

          Show
          mgreville Marcus Greville added a comment - - edited Hi Wisen, thanks for the speedy reply. Attached is the requested log. You'll notice a few comments, I've been busy trying to capture my fields and have swapped between v 0.5.0 -> 0.5.1 -> 0.4.2 -> 0.5.1 to get it to work. JIRA-webhook-POST-results.zip Thanks and regards.
          Hide
          ceilfors Wisen Tanasa added a comment - - edited

          The issue attribute path was never implemented to walk down the JSON. If you read the help, basically it walks down the Issue object, and I can see that lastViewed is not available in that object. I have converted this ticket to a feature request.

          It would be great if you can describe you use case as well of why you think fields like lastViewed is important (or any other fields that you are trying to resolve but not available).

          Show
          ceilfors Wisen Tanasa added a comment - - edited The issue attribute path was never implemented to walk down the JSON. If you read the help, basically it walks down the Issue object , and I can see that lastViewed is not available in that object. I have converted this ticket to a feature request. It would be great if you can describe you use case as well of why you think fields like lastViewed is important (or any other fields that you are trying to resolve but not available).
          Hide
          mgreville Marcus Greville added a comment - - edited

          Thanks for clarifying how the plugin works. Creating a feature request to perform a JSON tree walk is a good idea.

           

          Show
          mgreville Marcus Greville added a comment - - edited Thanks for clarifying how the plugin works. Creating a feature request to perform a JSON tree walk is a good idea.  
          Hide
          aswin_fractal Aswin Achuthan added a comment - - edited

          Hi Wisen Tanasa ,  I got the same error when I tried to fetch custom field value[single select], is it something you can help with ? Thanks 

          Show
          aswin_fractal Aswin Achuthan added a comment - - edited Hi Wisen Tanasa ,  I got the same error when I tried to fetch custom field value [single select] , is it something you can help with ? Thanks 

            People

            • Assignee:
              ceilfors Wisen Tanasa
              Reporter:
              mgreville Marcus Greville
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: