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

Path token is not expanded when used with other tokens in pathFormat

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: email-ext-plugin
    • Labels:
      None
    • Environment:
      GFv3, Linux
    • Similar Issues:

      Description

      I am using HTML as output and if I have something like the following:

      ${CHANGES,showPaths=true,format="%p",pathFormat="<tr><td align=\"left\">&nbsp&nbsp&nbsp<img src=\"${HUDSON_URL}/hudson/images/16x16/document_edit.gif\"></img></td>&nbsp %p</tr>"}

      The %p is not getting expanded.

        Attachments

          Activity

          Hide
          mezlight mezlight added a comment -

          In the case above, the ${HUDSON_URL} is not getting expanded

          Show
          mezlight mezlight added a comment - In the case above, the ${HUDSON_URL} is not getting expanded
          Hide
          istocia istocia added a comment - - edited

          I have one suggestion that could help resolve issue with %p not being expanded:

          • Please check class: hudson.plugins.emailext.plugins.content.ChangesSinceLastSuccessfulBuildContent at lines: 78-80 when new map object is created: childArgs.
          • It looks like that following line is missing:
            childArgs.put(SHOW_PATHS_ARG_NAME, args.get(SHOW_PATHS_ARG_NAME));
          • Without above line default value from ChangesSinceLastSuccessfulBuildContent class is used (private static final boolean REVERSE_DEFAULT_VALUE = false as a result of line: 66 in class hudson.plugins.emailext.plugins.content.ChangesSinceLastBuildContent variable showPaths is set to false => what is NOT that what was expected here

          NOTE: the same should be probably corrected in class: ChangesSinceLastUnstableBuildContent

          Could you please look at it if I'm correct?

          BTW: the simplest example to test with could be:
          ${CHANGES_SINCE_LAST_SUCCESS, showPaths=true}

          Thanks,
          Pawel

          Show
          istocia istocia added a comment - - edited I have one suggestion that could help resolve issue with %p not being expanded: Please check class: hudson.plugins.emailext.plugins.content.ChangesSinceLastSuccessfulBuildContent at lines: 78-80 when new map object is created: childArgs. It looks like that following line is missing: childArgs.put(SHOW_PATHS_ARG_NAME, args.get(SHOW_PATHS_ARG_NAME)); Without above line default value from ChangesSinceLastSuccessfulBuildContent class is used (private static final boolean REVERSE_DEFAULT_VALUE = false as a result of line: 66 in class hudson.plugins.emailext.plugins.content.ChangesSinceLastBuildContent variable showPaths is set to false => what is NOT that what was expected here NOTE: the same should be probably corrected in class: ChangesSinceLastUnstableBuildContent Could you please look at it if I'm correct? BTW: the simplest example to test with could be: ${CHANGES_SINCE_LAST_SUCCESS, showPaths=true} Thanks, Pawel
          Hide
          ashlux ashlux added a comment -

          I think this can be easily resolved by having AbstractChangesSinceContent.hasNestedContent and ChangesSinceLastBuildContent.hasNestedContent return true.

          Show
          ashlux ashlux added a comment - I think this can be easily resolved by having AbstractChangesSinceContent.hasNestedContent and ChangesSinceLastBuildContent.hasNestedContent return true.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Alex Earl
          Path:
          src/main/java/hudson/plugins/emailext/plugins/content/AbstractChangesSinceContent.java
          src/main/java/hudson/plugins/emailext/plugins/content/ChangesSinceLastBuildContent.java
          http://jenkins-ci.org/commit/email-ext-plugin/084cf48bcb47150a61cfb2da9a3a33a55659b99e
          Log:
          Fix JENKINS-5376

          • Let AbstractChangesSinceContent and ChangesSinceLastBuildContent have nested content.
          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Alex Earl Path: src/main/java/hudson/plugins/emailext/plugins/content/AbstractChangesSinceContent.java src/main/java/hudson/plugins/emailext/plugins/content/ChangesSinceLastBuildContent.java http://jenkins-ci.org/commit/email-ext-plugin/084cf48bcb47150a61cfb2da9a3a33a55659b99e Log: Fix JENKINS-5376 Let AbstractChangesSinceContent and ChangesSinceLastBuildContent have nested content.
          Hide
          slide_o_mix Alex Earl added a comment -

          Fixed in 629943c

          Show
          slide_o_mix Alex Earl added a comment - Fixed in 629943c

            People

            • Assignee:
              slide_o_mix Alex Earl
              Reporter:
              mezlight mezlight
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: