# HG changeset patch # User Mike Becker # Date 1736796511 -3600 # Node ID 354c4498437cfe87e572c39dece18dbd2d8b48f7 # Parent 7214dd755ded6431213c3b499d125e5a789512f8 fix missing version names in issue history - fixes #572 diff -r 7214dd755ded -r 354c4498437c src/main/kotlin/de/uapcore/lightpit/logic/IssueLogic.kt --- a/src/main/kotlin/de/uapcore/lightpit/logic/IssueLogic.kt Mon Jan 13 20:12:50 2025 +0100 +++ b/src/main/kotlin/de/uapcore/lightpit/logic/IssueLogic.kt Mon Jan 13 20:28:31 2025 +0100 @@ -6,7 +6,6 @@ import de.uapcore.lightpit.entities.Issue import de.uapcore.lightpit.entities.IssueComment import de.uapcore.lightpit.entities.IssueRelation -import de.uapcore.lightpit.entities.Version import de.uapcore.lightpit.types.IssueCategory import de.uapcore.lightpit.types.IssueStatus import de.uapcore.lightpit.types.RelationType @@ -50,8 +49,10 @@ // TODO: process error messages eta = http.param("eta", ::dateOptValidator, null, mutableListOf()) - affected = http.param("affected")?.toIntOrNull()?.takeIf { it > 0 }?.let { Version(it, project.id) } - resolved = http.param("resolved")?.toIntOrNull()?.takeIf { it > 0 }?.let { Version(it, project.id) } + // we must resolve the versions with the DAO, otherwise we do not get the names for the history + val vlookup = {paramKey: String -> http.param(paramKey)?.toIntOrNull()?.takeIf { it > 0 }?.let { dao.findVersion(it) }} + affected = vlookup("affected") + resolved = vlookup("resolved") } fun processIssueForm(issue: Issue, reference: Issue, http: HttpRequest, dao: DataAccessObject) { diff -r 7214dd755ded -r 354c4498437c src/main/webapp/WEB-INF/changelogs/changelog-de.jspf --- a/src/main/webapp/WEB-INF/changelogs/changelog-de.jspf Mon Jan 13 20:12:50 2025 +0100 +++ b/src/main/webapp/WEB-INF/changelogs/changelog-de.jspf Mon Jan 13 20:28:31 2025 +0100 @@ -27,6 +27,7 @@

Version 1.5.0 (Vorschau)