Fixed bug in filtering by team. If a team has assigned a project with all subprojects and the project has more than one subproject, only one subproject used to be shown when filtering by team.

This is a trivial fix (two/three lines changed), but other additions are in tests.
This commit is contained in:
Šesták Vít
2017-01-04 17:07:38 +01:00
parent a85a944088
commit 4bd78c3ed9
6 changed files with 173 additions and 7 deletions
+1 -1
View File
@@ -59,7 +59,7 @@ class ProjectsWithReports (val projects: Projects, val reports: Set[String]) {
private def parseUnfriendlyName(unfriendlyName: String, missingProject: String => String): ReportInfo = {
val (baseName, theRest) = unfriendlyName.span(_ != '/')
val removeLeadingMess = RestMessBeginRegexp.replaceAllIn(_: String, "")
val removeLeadingMess = RestMessBeginRegexp.replaceAllIn(_: String, "").dropWhile(_=='/')
val removeTrailingMess = RestMessEndRegexp.replaceAllIn(_: String, "")
val removeMess = removeLeadingMess andThen removeTrailingMess
val subProjectOption = Some(removeMess(theRest)).filter(_ != "")