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

jira-ext-plugin fails to parse commit message for JIRA ticket in certain patterns

    Details

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

      Description

      Using plugin as "Update JIRA issues", DIscover Issues by "Mentioned somewhere in commit message"

      Plugin seems to fail to extract JIRA ticket in certain conditions, like example shown below
      where Commit message contains "Message...ticket#..3 spaces"

      If I add \n to the end - jira plugin parses the commit line fine and extracts JIRA ticket fine

      Commit string in GIT (shown in single quotes):
      _____________________________
      'Testing JIRA (ticket with a few spaces at the end and no EOL) SBUSWIT-141 '

      Jenkins output (fails to show JIRA ticket SBUSWIT-141 and ticket is not updated)
      __________________________
      14:26:14 Updating JIRA tickets
      14:26:14 ChangeLogSet class: class hudson.plugins.git.GitChangeSetList
      14:26:14 Operation: Add a comment
      14:26:14 Operation: Transition tickets
      14:26:14 Finish updating JIRA tickets
      14:26:14 Collecting metadata...
      14:26:14 Metadata collection done.
      14:26:14 Finished: SUCCESS

        Attachments

          Activity

          Hide
          dalvizu Dan Alvizu added a comment - - edited

          Hi there! Owner here - I'm not able to reproduce. Can you please go to <jenkins-url>/configure and check that you have 'Ticket Pattern' configured to match the issue keys you are trying to search for? (e.g, SBUSWIT-).

          If yes, and the problem persists, please include the following to help me debug:

          • the job's config.xml
          • the job run's build.xml
          • the full console log
          • issue pattern specified in global config

          Thanks!

          Show
          dalvizu Dan Alvizu added a comment - - edited Hi there! Owner here - I'm not able to reproduce. Can you please go to <jenkins-url>/configure and check that you have 'Ticket Pattern' configured to match the issue keys you are trying to search for? (e.g, SBUSWIT- ). If yes, and the problem persists, please include the following to help me debug: the job's config.xml the job run's build.xml the full console log issue pattern specified in global config Thanks!
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Dan Alvizu
          Path:
          src/test/java/org/jenkinsci/plugins/jiraext/view/MentionedInCommitStrategyTest.java
          http://jenkins-ci.org/commit/jira-ext-plugin/866012f9a4ea39c1c2ce8a0f2dbaa729f6bb3876
          Log:
          Add test for JENKINS-33856

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Dan Alvizu Path: src/test/java/org/jenkinsci/plugins/jiraext/view/MentionedInCommitStrategyTest.java http://jenkins-ci.org/commit/jira-ext-plugin/866012f9a4ea39c1c2ce8a0f2dbaa729f6bb3876 Log: Add test for JENKINS-33856
          Show
          dalvizu Dan Alvizu added a comment - I've added a test for your issue: https://github.com/jenkinsci/jira-ext-plugin/commit/866012f9a4ea39c1c2ce8a0f2dbaa729f6bb3876
          Hide
          dalvizu Dan Alvizu added a comment -

          Please re-open with more info if problem persists

          Show
          dalvizu Dan Alvizu added a comment - Please re-open with more info if problem persists
          Hide
          sumeshkanayi Sumesh kk added a comment - - edited

          Hi Dan,

          You were right the problem was with the Ticket pattern , i was thinking that the Ticket pattern is something like a regex pattern and hence was expecting it working with out changing it in the tools configuration
          Today i gave the ticket pattern matching the correct JIRA ticket replacing FOO- and it worked ..

          Thanks a lot

          Show
          sumeshkanayi Sumesh kk added a comment - - edited Hi Dan, You were right the problem was with the Ticket pattern , i was thinking that the Ticket pattern is something like a regex pattern and hence was expecting it working with out changing it in the tools configuration Today i gave the ticket pattern matching the correct JIRA ticket replacing FOO- and it worked .. Thanks a lot

            People

            • Assignee:
              Unassigned
              Reporter:
              sleonovich Sergey Leonovich
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: