提交 08459c32 编写于 作者: J Jesse Glick

[FIXED JENKINS-15666] Label.getTiedJobs ignores non-top-level jobs.

上级 2fd5f247
......@@ -58,6 +58,9 @@ Upcoming changes</a>
<li class=bug>
Update logging levels in LogRotator - hudson.tasks.LogRotator perform
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-15540">issue 15540</a>)
<li class=bug>
Jobs in folders not displayed when showing tied jobs for a computer or label.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-15666">issue 15666</a>)
<li class=bug>
When installing plugins with overlapping dependencies, Jenkins downloads the duplicate plugins multiple times.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-10569">issue 10569</a>)
......
......@@ -24,7 +24,6 @@
package hudson.model;
import antlr.ANTLRException;
import hudson.Util;
import static hudson.Util.fixNull;
import hudson.model.labels.LabelAtom;
......@@ -336,7 +335,7 @@ public abstract class Label extends Actionable implements Comparable<Label>, Mod
@Exported
public List<AbstractProject> getTiedJobs() {
List<AbstractProject> r = new ArrayList<AbstractProject>();
for( AbstractProject p : Util.filter(Jenkins.getInstance().getItems(),AbstractProject.class) ) {
for (AbstractProject<?,?> p : Jenkins.getInstance().getAllItems(AbstractProject.class)) {
if(this.equals(p.getAssignedLabel()))
r.add(p);
}
......
......@@ -111,7 +111,7 @@ THE SOFTWARE.
</p>
</j:when>
<j:otherwise>
<t:projectView jobs="${it.tiedJobs}" jobBaseUrl="${rootURL}/" />
<t:projectView jobs="${it.tiedJobs}" jobBaseUrl="${rootURL}/" useFullName="true"/>
</j:otherwise>
</j:choose>
......
......@@ -53,7 +53,7 @@ THE SOFTWARE.
</p>
</j:when>
<j:otherwise>
<t:projectView jobs="${it.tiedJobs}" jobBaseUrl="${rootURL}/" />
<t:projectView jobs="${it.tiedJobs}" jobBaseUrl="${rootURL}/" useFullName="true"/>
</j:otherwise>
</j:choose>
......
......@@ -25,6 +25,6 @@ THE SOFTWARE.
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:i="jelly:fmt">
<td style="${indenter.getCss(job)}">
<a href="${jobBaseUrl}${job.shortUrl}" class='model-link'> ${job.displayName}</a>
<a href="${jobBaseUrl}${job.shortUrl}" class='model-link'> ${useFullName ? job.fullDisplayName : job.displayName}</a>
</td>
</j:jelly>
\ No newline at end of file
......@@ -29,7 +29,11 @@ THE SOFTWARE.
Renders a list of jobs and their key information.
<st:attribute name="jobs" use="required" trim="Collection">
Items to disable.
Items to show.
</st:attribute>
<st:attribute name="useFullName" use="optional" type="boolean">
May be interpreted by columns to display the full name of a job.
Will also append a parent URL to jobBaseUrl if needed.
</st:attribute>
<st:attribute name="jobBaseUrl" type="String">
The base URL of all job links. Normally ${rootURL}/
......@@ -75,7 +79,7 @@ THE SOFTWARE.
</j:forEach>
<j:forEach var="job" items="${jobs}">
<t:projectViewRow />
<t:projectViewRow jobBaseUrl="${useFullName ? jobBaseUrl + job.parent.url : jobBaseUrl}"/>
</j:forEach>
</table>
<t:iconSize><t:rssBar/></t:iconSize>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册