Skip to content
Permalink
Browse files
JENKINS-47527 Run regex filter on full name rather than on job name only
  • Loading branch information
Andrey Shevtsov authored and a-shevtsov committed Oct 24, 2017
1 parent 201ee2a commit 94f9d9ebe0fa8afdb870097a1d91ce1ce33213c9
Showing with 9 additions and 9 deletions.
  1. +9 −9 src/main/java/tech/andrey/jenkins/missioncontrol/MissionControlView.java
@@ -361,8 +361,16 @@ public Collection<JobStatus> getAllJobsStatuses() {
|| j.getClass().getName().equals("hudson.maven.MavenModule"))
continue;

// Decode pipeline branch names
String fullName = j.getFullName();
try {
fullName = URLDecoder.decode(j.getFullName(), "UTF-8");
} catch (java.io.UnsupportedEncodingException e) {
e.printStackTrace();
}

// If filtering is enabled, skip jobs not matching the filter
if (r != null && !r.matcher(j.getName()).find())
if (r != null && !r.matcher(fullName).find())
continue;

if (j.isBuilding()) {
@@ -379,14 +387,6 @@ public Collection<JobStatus> getAllJobsStatuses() {
}
}

// Decode pipeline branch names
String fullName = j.getFullName();
try {
fullName = URLDecoder.decode(j.getFullName(), "UTF-8");
} catch (java.io.UnsupportedEncodingException e) {
e.printStackTrace();
}

statuses.add(new JobStatus(fullName, status));
}

0 comments on commit 94f9d9e

Please sign in to comment.