src/main/kotlin/de/uapcore/lightpit/servlet/ProjectServlet.kt

changeset 214
69647ddb57f2
parent 210
37fbdcb422b7
child 215
028792eda9b7
--- a/src/main/kotlin/de/uapcore/lightpit/servlet/ProjectServlet.kt	Mon Aug 09 15:50:37 2021 +0200
+++ b/src/main/kotlin/de/uapcore/lightpit/servlet/ProjectServlet.kt	Mon Aug 09 16:22:56 2021 +0200
@@ -557,6 +557,13 @@
                 dao.insertIssue(issue)
             } else {
                 dao.updateIssue(issue)
+                val newComment = http.param("comment")
+                if (!newComment.isNullOrBlank()) {
+                    dao.insertComment(IssueComment(-1, issue.id).apply {
+                        author = http.remoteUser?.let { dao.findUserByName(it) }
+                        comment = newComment
+                    })
+                }
                 issue.id
             }
 

mercurial