From 04c8a1efc0f6324868638be9a4cfdb085e17744f Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Mon, 7 Oct 2013 18:40:48 -0400 Subject: [PATCH] [FIXED JENKINS-18633] Simplified distinction between Jenkins.description and View.description. Both are shown if defined. The edit description link only applies to View.description. Properly handle a ViewGroup other than Jenkins itself, such as a folder. --- changelog.html | 3 +++ core/src/main/java/hudson/model/AllView.java | 14 -------------- .../AbstractModelObject/descriptionForm.jelly | 2 +- .../main/resources/hudson/model/View/index.jelly | 4 +--- 4 files changed, 5 insertions(+), 18 deletions(-) diff --git a/changelog.html b/changelog.html index 5c3db06563..5e83cc80f0 100644 --- a/changelog.html +++ b/changelog.html @@ -68,6 +68,9 @@ Upcoming changes Split matrix authorization strategies into an independent plugin.
  • UI Samples plugin fully separated from core. To view samples during plugin development or at any other time, just install from the update center. +
  • + View description should be clearly separated from the Jenkins system message. + (issue 18633)
  • SCM polling sometimes broken since 1.527 due to a change in how environment variables are calculated. (issue 19307) diff --git a/core/src/main/java/hudson/model/AllView.java b/core/src/main/java/hudson/model/AllView.java index 5d9b235769..0bc73d3c58 100644 --- a/core/src/main/java/hudson/model/AllView.java +++ b/core/src/main/java/hudson/model/AllView.java @@ -23,7 +23,6 @@ */ package hudson.model; -import jenkins.model.Jenkins; import org.kohsuke.stapler.DataBoundConstructor; import org.kohsuke.stapler.Stapler; import org.kohsuke.stapler.StaplerRequest; @@ -53,11 +52,6 @@ public class AllView extends View { this.owner = owner; } - @Override - public String getDescription() { - return Jenkins.getInstance().getDescription(); - } - @Override public boolean isEditable() { return false; @@ -82,14 +76,6 @@ public class AllView extends View { return (Collection)getOwnerItemGroup().getItems(); } - @Override - public synchronized void doSubmitDescription( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException { - checkPermission(Jenkins.ADMINISTER); - - Jenkins.getInstance().setSystemMessage(req.getParameter("description")); - rsp.sendRedirect("."); - } - @Override public String getPostConstructLandingPage() { return ""; // there's no configuration page diff --git a/core/src/main/resources/hudson/model/AbstractModelObject/descriptionForm.jelly b/core/src/main/resources/hudson/model/AbstractModelObject/descriptionForm.jelly index d4bcdae590..e0259987ff 100644 --- a/core/src/main/resources/hudson/model/AbstractModelObject/descriptionForm.jelly +++ b/core/src/main/resources/hudson/model/AbstractModelObject/descriptionForm.jelly @@ -27,7 +27,7 @@ THE SOFTWARE. --> - + diff --git a/core/src/main/resources/hudson/model/View/index.jelly b/core/src/main/resources/hudson/model/View/index.jelly index 75c7cadce7..464262f320 100644 --- a/core/src/main/resources/hudson/model/View/index.jelly +++ b/core/src/main/resources/hudson/model/View/index.jelly @@ -31,12 +31,10 @@ THE SOFTWARE.
    -
    -
    - +
    -- GitLab