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

missing Interface in Perforce plugin causes exception in JIRA plugin

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: perforce-plugin
    • Labels:
      None
    • Environment:
      not relevant
    • Similar Issues:

      Description

      This is related to issue JENKINS-2508 "JIRA plugin not updating JIRA when perforce plugin used". I looked at the JIRA plugin and it fails to update the JIRA issue because an exception is thrown when calling getAffectedFiles() from the Perforce plugin, but the interface is not implemented yet. I added handling the exception in the JIRA plugin and now it at least creates a comment with an empty file list, but I'm new to this and don't feel comfortable to implement the interface in the Perforce plugin. It would be great if someone else could take care of it who knows what he's doing

      This is the missing implementation: hudson.scm.ChangeLogSet.Entry.getAffectedFiles()

        Attachments

          Activity

          Hide
          rpetti Rob Petti added a comment -

          I would argue that the JIRA plugin should be using the getAffectedPaths() call instead, which should be universally supported by all SCMs. getAffectedFiles() is an optional interface, so it hasn't been implemented in all SCMs.

          I'll take a look at this, but I still feel the JIRA plugin should fall back to getAffectedPaths if getAffectedFiles is not implemented.

          Show
          rpetti Rob Petti added a comment - I would argue that the JIRA plugin should be using the getAffectedPaths() call instead, which should be universally supported by all SCMs. getAffectedFiles() is an optional interface, so it hasn't been implemented in all SCMs. I'll take a look at this, but I still feel the JIRA plugin should fall back to getAffectedPaths if getAffectedFiles is not implemented.
          Hide
          smadden Sandra Madden added a comment -

          thanks for the pointer to getAffectedPaths. I added the fallback to the JIRA plugin and attached a patch file to issue JENKINS-2508.

          Show
          smadden Sandra Madden added a comment - thanks for the pointer to getAffectedPaths. I added the fallback to the JIRA plugin and attached a patch file to issue JENKINS-2508 .
          Hide
          evernat evernat added a comment -

          Since getAffectedPaths is now used in the jira plugin, can we close this issue as fixed?

          Show
          evernat evernat added a comment - Since getAffectedPaths is now used in the jira plugin, can we close this issue as fixed?
          Hide
          rpetti Rob Petti added a comment -

          I don't see why not.

          Show
          rpetti Rob Petti added a comment - I don't see why not.

            People

            • Assignee:
              Unassigned
              Reporter:
              smadden Sandra Madden
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: