From 94911e82fb33140e6e1fd9e7d45c2df9d699be3a Mon Sep 17 00:00:00 2001 From: Marc Carter Date: Thu, 10 Dec 2015 21:43:44 +0000 Subject: [PATCH] Don't sync display name from template to implementors --- .../com/joelj/jenkins/eztemplates/utils/TemplateUtils.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/com/joelj/jenkins/eztemplates/utils/TemplateUtils.java b/src/main/java/com/joelj/jenkins/eztemplates/utils/TemplateUtils.java index cc7889f..128ab4b 100644 --- a/src/main/java/com/joelj/jenkins/eztemplates/utils/TemplateUtils.java +++ b/src/main/java/com/joelj/jenkins/eztemplates/utils/TemplateUtils.java @@ -101,6 +101,7 @@ public static void handleTemplateImplementationSaved(AbstractProject implementat Map oldTriggers = implementationProject.getTriggers(); boolean shouldBeDisabled = implementationProject.isDisabled(); String description = implementationProject.getDescription(); + String displayName = implementationProject.getDisplayNameOrNull(); AuthorizationMatrixProperty oldAuthMatrixProperty = (AuthorizationMatrixProperty) implementationProject.getProperty(AuthorizationMatrixProperty.class); SCM oldScm = (SCM) implementationProject.getScm(); JobProperty oldOwnership = implementationProject.getProperty("com.synopsys.arc.jenkins.plugins.ownership.jobs.JobOwnerJobProperty"); @@ -120,6 +121,8 @@ public static void handleTemplateImplementationSaved(AbstractProject implementat fixProperties(implementationProject, property, implementationIsTemplate); fixParameters(implementationProject, oldImplementationParameters); + ReflectionUtils.setFieldValue(AbstractItem.class, implementationProject, "displayName", displayName); + if (!property.getSyncBuildTriggers()) { fixBuildTriggers(implementationProject, oldTriggers); }