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

Incorect template name being displayed

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Editable Email Notification Templates only shows the first template after being configured regardless of what templates are being used.

      Steps to repeat
      1. Create a one or more templates. (as long as it’s not the first one)
      2. Create/Edit Job and add templates.
      3. Save and run job to confirm.
      4. Edit Job notice how only one template is shown, and it’s always the first one in the list.

      Expected Behaviors is that all the template being used should be shown. Good news is that the underlying code is correct but having it not listed correctly makes it confusing as to what templates are really being sent.

        Attachments

          Activity

          mkruer Matthew Kruer created issue -
          Hide
          slide_o_mix Alex Earl added a comment -

          Can you show a screenshot of what you mean?

          Show
          slide_o_mix Alex Earl added a comment - Can you show a screenshot of what you mean?
          mkruer Matthew Kruer made changes -
          Field Original Value New Value
          Attachment screenshot-1.jpg [ 26027 ]
          Hide
          mkruer Matthew Kruer added a comment -

          Attached, with an idea for how to improve the listing of the tempates. Also this I am still using 0.1 beta. I cant find the latest in the jenkins library

          Show
          mkruer Matthew Kruer added a comment - Attached, with an idea for how to improve the listing of the tempates. Also this I am still using 0.1 beta. I cant find the latest in the jenkins library
          Hide
          slide_o_mix Alex Earl added a comment -

          I released version 0.2 to the update center, so you should be able to install it instead of the beta.

          Show
          slide_o_mix Alex Earl added a comment - I released version 0.2 to the update center, so you should be able to install it instead of the beta.
          Hide
          mkruer Matthew Kruer added a comment -

          Thanks, I have version 0.2 installed now. Were you able to verfy this.

          Let me see if I can explain again what I think is happening.

          You have multiple email templates, Template1, Template2, and Template3

          You have a job or created a job and assign Template2, and Template3 as the default e-mail.
          You Save and build the job, it sends off emails based upon Template2, and Template3.
          You go and end the job a second time.
          The Original templates you assigned Template2 and Template3 are defaulted to Template1
          When you save the job, now emails are sent to Template1

          So the issue is when loading the job, it doesn’t correctly assign the existing templates

          Show
          mkruer Matthew Kruer added a comment - Thanks, I have version 0.2 installed now. Were you able to verfy this. Let me see if I can explain again what I think is happening. You have multiple email templates, Template1, Template2, and Template3 You have a job or created a job and assign Template2, and Template3 as the default e-mail. You Save and build the job, it sends off emails based upon Template2, and Template3. You go and end the job a second time. The Original templates you assigned Template2 and Template3 are defaulted to Template1 When you save the job, now emails are sent to Template1 So the issue is when loading the job, it doesn’t correctly assign the existing templates
          Hide
          slide_o_mix Alex Earl added a comment -

          Yes, there is definitely an issue here, I need to debug it still. My wife just had a baby, so things got put on hold.

          Show
          slide_o_mix Alex Earl added a comment - Yes, there is definitely an issue here, I need to debug it still. My wife just had a baby, so things got put on hold.
          Hide
          mkruer Matthew Kruer added a comment -

          Congrads. No rush. This feature is still awesome, and makes reassigning emails a snap.

          Once this is squared away I have another idea for different improvement. Execute Shell Scriptlet/Snippets.

          Reason: At this point most of my jobs are using the Parameterized Build plug-in and I end up pass the variable to the Execute Shell. My Execute Shell end up being identical across multiple jobs sometimes with extra steps or steps removed. So what I was thinking that if there was a way to make parts of the code come from a standardized base i.e. Scriptlet/Snippets and then link those to a job, in effect what you would have is the ability to reuse code or update (fix) code across multiple jobs at the same time. Does this sound intresting?

          Show
          mkruer Matthew Kruer added a comment - Congrads. No rush. This feature is still awesome, and makes reassigning emails a snap. Once this is squared away I have another idea for different improvement. Execute Shell Scriptlet/Snippets. Reason: At this point most of my jobs are using the Parameterized Build plug-in and I end up pass the variable to the Execute Shell. My Execute Shell end up being identical across multiple jobs sometimes with extra steps or steps removed. So what I was thinking that if there was a way to make parts of the code come from a standardized base i.e. Scriptlet/Snippets and then link those to a job, in effect what you would have is the ability to reuse code or update (fix) code across multiple jobs at the same time. Does this sound intresting?
          Show
          slide_o_mix Alex Earl added a comment - Have you looked at https://wiki.jenkins-ci.org/display/JENKINS/Managed+Script+Plugin
          Hide
          mkruer Matthew Kruer added a comment -

          Thanks, didn’t see that one, not as advanced as I was thinking but a good start. I Guess I can post enhancement requests into that plugin.

          Show
          mkruer Matthew Kruer added a comment - Thanks, didn’t see that one, not as advanced as I was thinking but a good start. I Guess I can post enhancement requests into that plugin.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Alex Earl
          Path:
          src/main/resources/org/jenkinsci/plugins/emailext_template/ExtendedEmailTemplatePublisher/config.groovy
          http://jenkins-ci.org/commit/emailext-template-plugin/292b9a01e1244e98d8578641d96c5a6cccca3e04
          Log:
          Fix JENKINS-22933

          Fixed logic that loads the templates for saved jobs.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Alex Earl Path: src/main/resources/org/jenkinsci/plugins/emailext_template/ExtendedEmailTemplatePublisher/config.groovy http://jenkins-ci.org/commit/emailext-template-plugin/292b9a01e1244e98d8578641d96c5a6cccca3e04 Log: Fix JENKINS-22933 Fixed logic that loads the templates for saved jobs.
          Hide
          slide_o_mix Alex Earl added a comment -

          Fixed in 0.3

          Show
          slide_o_mix Alex Earl added a comment - Fixed in 0.3
          slide_o_mix Alex Earl made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 155079 ] JNJira + In-Review [ 195128 ]

            People

            • Assignee:
              slide_o_mix Alex Earl
              Reporter:
              mkruer Matthew Kruer
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: