462 subject = http.param("subject") ?: "" |
462 subject = http.param("subject") ?: "" |
463 description = http.param("description") ?: "" |
463 description = http.param("description") ?: "" |
464 assignee = http.param("assignee")?.toIntOrNull()?.let { |
464 assignee = http.param("assignee")?.toIntOrNull()?.let { |
465 when (it) { |
465 when (it) { |
466 -1 -> null |
466 -1 -> null |
467 -2 -> component?.lead |
467 -2 -> (component?.lead ?: projectInfo.project.owner) |
468 else -> dao.findUser(it) |
468 else -> dao.findUser(it) |
469 } |
469 } |
470 } |
470 } |
471 // TODO: process error messages |
471 // TODO: process error messages |
472 eta = http.param("eta", ::dateOptValidator, null, mutableListOf()) |
472 eta = http.param("eta", ::dateOptValidator, null, mutableListOf()) |