# HG changeset patch # User Mike Becker # Date 1628518976 -7200 # Node ID 69647ddb57f213105ee0677964a3671b5dc2ebe6 # Parent 5b55a5318a835f605bd38daa2ceaf121ce01b71e #153 adds comment box to issues form diff -r 5b55a5318a83 -r 69647ddb57f2 src/main/kotlin/de/uapcore/lightpit/servlet/ProjectServlet.kt --- 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 } diff -r 5b55a5318a83 -r 69647ddb57f2 src/main/resources/localization/strings.properties --- a/src/main/resources/localization/strings.properties Mon Aug 09 15:50:37 2021 +0200 +++ b/src/main/resources/localization/strings.properties Mon Aug 09 16:22:56 2021 +0200 @@ -71,6 +71,7 @@ issue.category.Task=Task issue.category.Test=Test issue.category=Category +issue.comment=Comment issue.comments.anonauthor=Anonymous Author issue.comments.lastupdate=Last edited: issue.comments.updateCount=total edits diff -r 5b55a5318a83 -r 69647ddb57f2 src/main/resources/localization/strings_de.properties --- a/src/main/resources/localization/strings_de.properties Mon Aug 09 15:50:37 2021 +0200 +++ b/src/main/resources/localization/strings_de.properties Mon Aug 09 16:22:56 2021 +0200 @@ -70,6 +70,7 @@ issue.category.Task=Aufgabe issue.category.Test=Test issue.category=Kategorie +issue.comment=Kommentar issue.comments.anonauthor=Anonymer Autor issue.comments.lastupdate=Zuletzt bearbeitet: issue.comments.updateCount=mal bearbeitet diff -r 5b55a5318a83 -r 69647ddb57f2 src/main/webapp/WEB-INF/jsp/issue-form.jsp --- a/src/main/webapp/WEB-INF/jsp/issue-form.jsp Mon Aug 09 15:50:37 2021 +0200 +++ b/src/main/webapp/WEB-INF/jsp/issue-form.jsp Mon Aug 09 16:22:56 2021 +0200 @@ -52,9 +52,9 @@ - + -