1.1 --- a/src/main/kotlin/de/uapcore/lightpit/servlet/ProjectServlet.kt Sat Jun 04 18:02:25 2022 +0200 1.2 +++ b/src/main/kotlin/de/uapcore/lightpit/servlet/ProjectServlet.kt Sat Jun 04 18:29:58 2022 +0200 1.3 @@ -35,7 +35,6 @@ 1.4 import de.uapcore.lightpit.types.IssueStatus 1.5 import de.uapcore.lightpit.types.VersionStatus 1.6 import de.uapcore.lightpit.types.WebColor 1.7 -import de.uapcore.lightpit.util.IssueSorter.Companion.DEFAULT_ISSUE_SORTER 1.8 import de.uapcore.lightpit.viewmodel.* 1.9 import java.sql.Date 1.10 import javax.servlet.annotation.WebServlet 1.11 @@ -187,7 +186,13 @@ 1.12 withPathInfo(http, dao)?.run { 1.13 1.14 val issues = dao.listIssues(project, version, component) 1.15 - .sortedWith(DEFAULT_ISSUE_SORTER) 1.16 + .sortedWith( 1.17 + IssueSorter( 1.18 + IssueSorter.Criteria(IssueSorter.Field.DONE), 1.19 + IssueSorter.Criteria(IssueSorter.Field.ETA), 1.20 + IssueSorter.Criteria(IssueSorter.Field.UPDATED, false) 1.21 + ) 1.22 + ) 1.23 1.24 with(http) { 1.25 pageTitle = project.name 1.26 @@ -304,7 +309,7 @@ 1.27 } 1.28 } 1.29 1.30 - private fun obtainIdAndProject(http: HttpRequest, dao:DataAccessObject): Pair<Int, Project>? { 1.31 + private fun obtainIdAndProject(http: HttpRequest, dao: DataAccessObject): Pair<Int, Project>? { 1.32 val id = http.param("id")?.toIntOrNull() 1.33 val projectid = http.param("projectid")?.toIntOrNull() ?: -1 1.34 val project = dao.findProject(projectid) 1.35 @@ -326,8 +331,8 @@ 1.36 ordinal = http.param("ordinal")?.toIntOrNull() ?: 0 1.37 status = http.param("status")?.let(VersionStatus::valueOf) ?: VersionStatus.Future 1.38 // TODO: process error messages 1.39 - eol = http.param("eol", ::dateOptValidator, null, mutableListOf()) 1.40 - release = http.param("release", ::dateOptValidator, null, mutableListOf()) 1.41 + eol = http.param("eol", ::dateOptValidator, null, mutableListOf()) 1.42 + release = http.param("release", ::dateOptValidator, null, mutableListOf()) 1.43 // intentional defaults 1.44 if (node.isBlank()) node = name 1.45 // sanitizing