src/main/kotlin/de/uapcore/lightpit/dao/postgres/PGIssueDao.kt

changeset 164
003b08bb3f25
parent 159
86b5d8a1662f
     1.1 --- a/src/main/kotlin/de/uapcore/lightpit/dao/postgres/PGIssueDao.kt	Fri Dec 18 15:54:39 2020 +0100
     1.2 +++ b/src/main/kotlin/de/uapcore/lightpit/dao/postgres/PGIssueDao.kt	Fri Dec 18 16:09:20 2020 +0100
     1.3 @@ -93,6 +93,10 @@
     1.4              "select * from lpit_issue_comment left join lpit_user using (userid) where issueid = ? order by created"
     1.5      )
     1.6  
     1.7 +    private val updateIssueLastModified = connection.prepareStatement(
     1.8 +        "update lpit_issue set updated = now() where issueid = ?"
     1.9 +    );
    1.10 +
    1.11      override fun mapResult(rs: ResultSet): Issue {
    1.12          val project = Project(rs.getInt("project"))
    1.13          project.name = rs.getString("projectname")
    1.14 @@ -245,5 +249,7 @@
    1.15              setForeignKeyOrNull(insertComment, 3, comment.author, User::id)
    1.16              insertComment.execute()
    1.17          }
    1.18 +        updateIssueLastModified.setInt(1, issue.id);
    1.19 +        updateIssueLastModified.execute();
    1.20      }
    1.21  }
    1.22 \ No newline at end of file

mercurial