diff --git a/core/src/main/java/hudson/model/JobCollection.java b/core/src/main/java/hudson/model/JobCollection.java index 55f77eeadb..61f3521b42 100644 --- a/core/src/main/java/hudson/model/JobCollection.java +++ b/core/src/main/java/hudson/model/JobCollection.java @@ -90,6 +90,26 @@ public abstract class JobCollection extends AbstractModelObject { return that.lastChange.compareTo(this.lastChange); } } + + /** + * Does this {@link JobCollection} has any associated user information recorded? + */ + public final boolean hasPeople() { + for (Job job : getJobs()) { + if (job instanceof Project) { + Project p = (Project) job; + for (Build build : p.getBuilds()) { + for (Entry entry : build.getChangeSet()) { + User user = entry.getAuthor(); + if(user!=null) + return true; + } + } + } + } + return false; + } + /** * Gets the users that show up in the changelog of this job collection. */ diff --git a/core/src/main/resources/hudson/model/JobCollection/sidepanel.jelly b/core/src/main/resources/hudson/model/JobCollection/sidepanel.jelly index 87f3338c61..e04b8a72ae 100644 --- a/core/src/main/resources/hudson/model/JobCollection/sidepanel.jelly +++ b/core/src/main/resources/hudson/model/JobCollection/sidepanel.jelly @@ -13,7 +13,9 @@ - + + +