555 |
555 |
556 val openId = if (issue.id < 0) { |
556 val openId = if (issue.id < 0) { |
557 dao.insertIssue(issue) |
557 dao.insertIssue(issue) |
558 } else { |
558 } else { |
559 dao.updateIssue(issue) |
559 dao.updateIssue(issue) |
|
560 val newComment = http.param("comment") |
|
561 if (!newComment.isNullOrBlank()) { |
|
562 dao.insertComment(IssueComment(-1, issue.id).apply { |
|
563 author = http.remoteUser?.let { dao.findUserByName(it) } |
|
564 comment = newComment |
|
565 }) |
|
566 } |
560 issue.id |
567 issue.id |
561 } |
568 } |
562 |
569 |
563 if (http.param("more") != null) { |
570 if (http.param("more") != null) { |
564 http.renderCommit("${issuesHref}-/create") |
571 http.renderCommit("${issuesHref}-/create") |