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

Backlinks option is commenting on wrong projects.

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • youtrack-plugin
    • None
    • plugin v0.6.1

      Our instance of youtrack has 2 different projects (AT and PYAT). Commit messages citing PYAT-123 are causing jekins to comment links to the build on both AT-123 and PYAT-123.

      Seems like this option ignores the project id(s) set in the plugin options for this job.
      Additionally, we are using a service on our source code browser that parses ticket numbers starting with #. Seems like the overlapping pattern problem could be fixed by only matching ticket numbers starting with #...

          [JENKINS-25057] Backlinks option is commenting on wrong projects.

          Code changed in jenkins
          User: Erik Zielke
          Path:
          src/main/java/org/jenkinsci/plugins/youtrack/YoutrackIssueUpdater.java
          src/test/java/org/jenkinsci/plugins/youtrack/YouTrackSCMListenerTest.java
          http://jenkins-ci.org/commit/youtrack-plugin/ba4ab603f963c61c360efc77966438f82c0e5e82
          Log:
          fixes JENKINS-25057

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Erik Zielke Path: src/main/java/org/jenkinsci/plugins/youtrack/YoutrackIssueUpdater.java src/test/java/org/jenkinsci/plugins/youtrack/YouTrackSCMListenerTest.java http://jenkins-ci.org/commit/youtrack-plugin/ba4ab603f963c61c360efc77966438f82c0e5e82 Log: fixes JENKINS-25057

          Owen Nelson added a comment -

          Hi there!
          Thanks for addressing this so quickly!
          I just wanted to let you know I'm seeing the same overlapping pattern problem on the annotated changelist (it'll nest the anchors).

          Thanks for your help!

          Owen Nelson added a comment - Hi there! Thanks for addressing this so quickly! I just wanted to let you know I'm seeing the same overlapping pattern problem on the annotated changelist (it'll nest the anchors). Thanks for your help!

          Code changed in jenkins
          User: Erik Zielke
          Path:
          src/main/java/org/jenkinsci/plugins/youtrack/YouTrackChangeLogAnnotator.java
          src/main/java/org/jenkinsci/plugins/youtrack/YoutrackIssueUpdater.java
          http://jenkins-ci.org/commit/youtrack-plugin/eb6d20c3adde7a38bde37c5da8d70813d124a8c3
          Log:
          JENKINS-25057

          Removed the nested anchors on changelogs when project names are overlapping

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Erik Zielke Path: src/main/java/org/jenkinsci/plugins/youtrack/YouTrackChangeLogAnnotator.java src/main/java/org/jenkinsci/plugins/youtrack/YoutrackIssueUpdater.java http://jenkins-ci.org/commit/youtrack-plugin/eb6d20c3adde7a38bde37c5da8d70813d124a8c3 Log: JENKINS-25057 Removed the nested anchors on changelogs when project names are overlapping

          Erik Zielke added a comment -

          Oh, thanks for pointing that out. I have released it with the bugfix just now, so there can go up to a day before its in the update center. The pattern now just checks if its the beginning or there is a non word character before the issue id.

          1. is used for commands, so "#issue-id some text" will try to apply some text as a command for the issue. Isn't that also a problem for you, if your source browser only links issue ids starting with #?

          Erik Zielke added a comment - Oh, thanks for pointing that out. I have released it with the bugfix just now, so there can go up to a day before its in the update center. The pattern now just checks if its the beginning or there is a non word character before the issue id. is used for commands, so "#issue-id some text" will try to apply some text as a command for the issue. Isn't that also a problem for you, if your source browser only links issue ids starting with #?

          Owen Nelson added a comment - - edited

          We haven't been using commands from the youtrack plugin, so perhaps we just got lucky in this regard.
          I'm looking to see if there's a way to customize the parser, but it looks like the `#` is just always used to mark the start of the pattern. This is coming from https://github.com/mstrap/bugtraq (which is the system employed by gitblit) just in case it's interesting...

          update: lol, having read the bugtraq docs a bit more carefully, there is a whole regex pipeline I can take advantage of, so I can totally switch the pattern from ids starting with `#` to use some other character, or enclose in `[]` or whatever. Totally possible, but until we have the need to run custom commands, I suspect we'll stick with the default.

          Owen Nelson added a comment - - edited We haven't been using commands from the youtrack plugin, so perhaps we just got lucky in this regard. I'm looking to see if there's a way to customize the parser, but it looks like the `#` is just always used to mark the start of the pattern. This is coming from https://github.com/mstrap/bugtraq (which is the system employed by gitblit) just in case it's interesting... update: lol, having read the bugtraq docs a bit more carefully, there is a whole regex pipeline I can take advantage of, so I can totally switch the pattern from ids starting with `#` to use some other character, or enclose in `[]` or whatever. Totally possible, but until we have the need to run custom commands, I suspect we'll stick with the default.

          Erik Zielke added a comment -

          Okay

          Erik Zielke added a comment - Okay

            erikzielke Erik Zielke
            onelson Owen Nelson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: