Fix for notifications: When a vulnerability reappears, it should not try to recreate a ticket for it

This commit is contained in:
Šesták Vít
2017-04-05 13:14:49 +02:00
parent 1a1fb0b9f5
commit ef1d434871
2 changed files with 9 additions and 2 deletions

View File

@@ -68,6 +68,10 @@ class VulnerabilityNotificationService @Inject() (protected val dbConfigProvider
ept.tickets.filter(_.done === false).result
)
def loadAllTickets(): Future[Seq[(Int, ExportedVulnerability[T])]] = db.run(
ept.tickets.result
)
def changeProjects(ticketId: Int, diff: SetDiff[String], projects: ProjectsWithReports): Future[Unit] = db.run(
DBIO.seq(
ept.tickets.filter(_.id === ticketId).map(_.done).update(diff.newSet.isEmpty),