When expanding the help sections in Editable Email notification or Conditional Run action, the sections for the Token Macro help text are duplicate many times. This makes the help almost unusable as there is a mass amount of scrolling that is required to figure out which options are available for use.

      Jenkins 1.510
      Token Macro 1.8
      Email Extension 2.30.2
      Run condition .10
      conditional-buildstep 1.3

          [JENKINS-18912] Token macro help text is duplicated many times

          Sure. Anything that may help. What screenshots would you like to see? I can also upload the configs for the two projects that add 2 and 4 duplicates respectively to the screen with each run. If you come up with any test scenarios, I could run them too.

          Andrei Barychev added a comment - Sure. Anything that may help. What screenshots would you like to see? I can also upload the configs for the two projects that add 2 and 4 duplicates respectively to the screen with each run. If you come up with any test scenarios, I could run them too.

          Alex Earl added a comment -

          I'd like to see the context in which you are seeing the issue (e.g., is it only in the project level or does it show up in the global config as well?) Also, seeing how it looks in the conditional-build step area vs. email-ext area.

          Alex Earl added a comment - I'd like to see the context in which you are seeing the issue (e.g., is it only in the project level or does it show up in the global config as well?) Also, seeing how it looks in the conditional-build step area vs. email-ext area.

          Alex, the screenshots are so huge now, it's impractical to take them. You're interested in a full screenshot, right? I'll restart the server on weekend and take the screenshots while they are still manageable. In the meantime – the duplicate tokens are visible across all projects as well as in the global config.

          Andrei Barychev added a comment - Alex, the screenshots are so huge now, it's impractical to take them. You're interested in a full screenshot, right? I'll restart the server on weekend and take the screenshots while they are still manageable. In the meantime – the duplicate tokens are visible across all projects as well as in the global config.

          Alex Earl added a comment -

          I guess I'm not so interested in a full screenshot, just something that gives me a little more context of where to look. I need to understand why the private tokens from email-ext are showing up in conditional-build plugin at all, they shouldn't be, so I want to see if I can understand from the context (a job's config.xml might help as well).

          Alex Earl added a comment - I guess I'm not so interested in a full screenshot, just something that gives me a little more context of where to look. I need to understand why the private tokens from email-ext are showing up in conditional-build plugin at all, they shouldn't be, so I want to see if I can understand from the context (a job's config.xml might help as well).

          As per your request: Please take a look at the set of Dups-* files. There are screenshots of:

          • Jenkins global config after restart
          • Jenkins global config after a run of a project
          • Project after restart (mail-ext and cond-step tokens)
          • Project after 1 run (mail-ext and cond-step tokens)
            I have also attached the project's xml config.

          Andrei Barychev added a comment - As per your request: Please take a look at the set of Dups-* files. There are screenshots of: Jenkins global config after restart Jenkins global config after a run of a project Project after restart (mail-ext and cond-step tokens) Project after 1 run (mail-ext and cond-step tokens) I have also attached the project's xml config.

          As you can see in the screenshots, the private tokens are not present in cond-step's token list after Jenkins restart. They appear there only after I run a job.

          Andrei Barychev added a comment - As you can see in the screenshots, the private tokens are not present in cond-step's token list after Jenkins restart. They appear there only after I run a job.

          Alex Earl added a comment -

          Aha! I think I have a fix for this. I'll push the changes and post the URL for the build server so you can try a new hpi for token-macro.

          Alex Earl added a comment - Aha! I think I have a fix for this. I'll push the changes and post the URL for the build server so you can try a new hpi for token-macro.

          Code changed in jenkins
          User: Alex Earl
          Path:
          src/main/java/org/jenkinsci/plugins/tokenmacro/TokenMacro.java
          http://jenkins-ci.org/commit/token-macro-plugin/95b946e160434368fb381031af1879d246520580
          Log:
          Fix JENKINS-18912

          Created new list to hold the macros instead of using that returned by all(). If we use the one returned by all(), then all the private macros get added to the ExtensionList for TokenMacro!

          Compare: https://github.com/jenkinsci/token-macro-plugin/compare/c08666135eb6...95b946e16043

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Alex Earl Path: src/main/java/org/jenkinsci/plugins/tokenmacro/TokenMacro.java http://jenkins-ci.org/commit/token-macro-plugin/95b946e160434368fb381031af1879d246520580 Log: Fix JENKINS-18912 Created new list to hold the macros instead of using that returned by all(). If we use the one returned by all(), then all the private macros get added to the ExtensionList for TokenMacro! Compare: https://github.com/jenkinsci/token-macro-plugin/compare/c08666135eb6...95b946e16043

          Alex Earl added a comment - https://jenkins.ci.cloudbees.com/job/plugins/job/token-macro-plugin/lastBuild/org.jenkins-ci.plugins$token-macro/artifact/org.jenkins-ci.plugins/token-macro/1.9-SNAPSHOT/token-macro-1.9-SNAPSHOT.hpi

          Alex Earl added a comment -

          Made a new List<TokenMacro> so that the private tokens were not added to the ExtensionList<TokenMacro> each time.

          Alex Earl added a comment - Made a new List<TokenMacro> so that the private tokens were not added to the ExtensionList<TokenMacro> each time.

            slide_o_mix Alex Earl
            walterk82 Walter Kacynski
            Votes:
            2 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: