fixes #134 - automatic version selection

Tue, 11 May 2021 17:36:00 +0200

author
Mike Becker <universe@uap-core.de>
date
Tue, 11 May 2021 17:36:00 +0200
changeset 191
193ee4828767
parent 190
a83f1ab56898
child 192
997e2c97ba34

fixes #134 - automatic version selection

src/main/kotlin/de/uapcore/lightpit/servlet/ProjectServlet.kt file | annotate | diff | comparison | revisions
--- a/src/main/kotlin/de/uapcore/lightpit/servlet/ProjectServlet.kt	Tue May 11 17:30:36 2021 +0200
+++ b/src/main/kotlin/de/uapcore/lightpit/servlet/ProjectServlet.kt	Tue May 11 17:36:00 2021 +0200
@@ -447,6 +447,15 @@
             // pre-select component, if available in the path info
             issue.component = component
 
+            // pre-select version, if available in the path info
+            if (version != null) {
+                if (version.status.isReleased) {
+                    issue.affectedVersions = listOf(version)
+                } else {
+                    issue.resolvedVersions = listOf(version)
+                }
+            }
+
             with(http) {
                 view = IssueEditView(
                     issue,

mercurial