Skip to content
Permalink
Browse files

[JENKINS-20892] /user/*/rssLatest should use getAllItems to check in …

…folders, just like /user/*/builds does.

(cherry picked from commit ece9373)
  • Loading branch information
jglick authored and olivergondza committed Feb 28, 2014
1 parent 537e94a commit 46d4a638182d149b105414eadf172157e4fcb96e
Showing with 3 additions and 6 deletions.
  1. +3 −6 core/src/main/java/hudson/model/User.java
@@ -579,12 +579,9 @@ public void doRssFailed(StaplerRequest req, StaplerResponse rsp) throws IOExcept

public void doRssLatest(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException {
final List<Run> lastBuilds = new ArrayList<Run>();
for (final TopLevelItem item : Jenkins.getInstance().getItems()) {
if (!(item instanceof Job)) continue;
for (Run r = ((Job) item).getLastBuild(); r != null; r = r.getPreviousBuild()) {
if (!(r instanceof AbstractBuild)) continue;
final AbstractBuild b = (AbstractBuild) r;
if (b.hasParticipant(this)) {
for (AbstractProject<?,?> p : Jenkins.getInstance().getAllItems(AbstractProject.class)) {
for (AbstractBuild<?,?> b = p.getLastBuild(); b != null; b = b.getPreviousBuild()) {
if (b.hasParticipant(this)) { // TODO or check UserIdCause
lastBuilds.add(b);
break;
}

0 comments on commit 46d4a63

Please sign in to comment.
You can’t perform that action at this time.