• Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • jira-plugin
    • None
    • any

      we make heavy use of svn externals, so the svn information for a project with 2 externals, for which 3 issues were affected would look like this on the build log page:

      Revisions

      • xxx/yyy : 313
      • xxx/zzz : 848

      Changes

      1. #JIRA-37
      #JIRA-38
      #JIRA-40
      2. #JIRA-37
      #JIRA-38
      #JIRA-40

      1 and 2 are exactly the same, since yyy and zzz share a common base.
      As a result, the comment that gets comitted by the JIRA plugin contains 2 times the exact same text, which is very, very disturbing and unnecessary. It also contains 2 times the exact same filelist.. Example for the above case:

      Integrated in xxx #50 (See [...])
      #JIRA-37
      #JIRA-38
      #JIRA-40
      #JIRA-37
      #JIRA-38
      #JIRA-40

      user :
      Files :
      */xxx/yyy/file1
      */xxx/yyy/file2
      */xxx/zzz/file1

      user :
      Files :
      */xxx/yyy/file1
      */xxx/yyy/file2
      */xxx/zzz/file1

      Imagine this for 20 externals, 30 changed files and a comment spreading over 10 lines. Yes, that's over 800 lines, where 40 lines would be sufficient.

      It should not be too hard to parse the svn info and extract only those comments that are different.

          [JENKINS-8310] have JIRA plugin recognize svn externals

          apostasia added a comment -

          ok this really was a showstopper for me so I made a quick fix myself.
          Attached plugin package and changed source:

          • for a build consisting of mutiple changesets, only the unique ones will made it into the comment (also applies to file list). This basically fixes this issue. Not of much use for #JENKINS-4439 however, that needs to persist state between builds. Shouldn't be to hard though.
          • add an option to the configuration that can enable/disable whether the changed files should be shown in the comment (I use the subversion commits in Jira so I don't need to see all files; apart from that, the file list would only be really useful if it consisted of scm links)
          • removed the leading spaces at the second line of the comment (== the first line of the scm comment), this increases readability and is more consistent

          apostasia added a comment - ok this really was a showstopper for me so I made a quick fix myself. Attached plugin package and changed source: for a build consisting of mutiple changesets, only the unique ones will made it into the comment (also applies to file list). This basically fixes this issue. Not of much use for # JENKINS-4439 however, that needs to persist state between builds. Shouldn't be to hard though. add an option to the configuration that can enable/disable whether the changed files should be shown in the comment (I use the subversion commits in Jira so I don't need to see all files; apart from that, the file list would only be really useful if it consisted of scm links) removed the leading spaces at the second line of the comment (== the first line of the scm comment), this increases readability and is more consistent

          Olivier Lamy added a comment -

          I have some compilation failure with your patch.
          Can please one without ?
          FYI sources has been moved to github : https://github.com/hudson/jira-plugin

          Olivier Lamy added a comment - I have some compilation failure with your patch. Can please one without ? FYI sources has been moved to github : https://github.com/hudson/jira-plugin

          apostasia added a comment -

          ah sorry I didn't update the tests.. It's the first time I programmed in java/used NetBeans so I just tried to get things going asap (so, please also review the code carefully before actually using it).

          Anyway, I cloned the sources and updated tests as well, things should be ok now;
          I also incorporated the change I was talking about: when using a subversion respository browser, the filelist will now display links to the files in scm. Tested with WebSVN2 only, but it works fine.

          apostasia added a comment - ah sorry I didn't update the tests.. It's the first time I programmed in java/used NetBeans so I just tried to get things going asap (so, please also review the code carefully before actually using it). Anyway, I cloned the sources and updated tests as well, things should be ok now; I also incorporated the change I was talking about: when using a subversion respository browser, the filelist will now display links to the files in scm. Tested with WebSVN2 only, but it works fine.

            Unassigned Unassigned
            apostasia apostasia
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: