Skip to content

Commit 301f051

Browse files
committed
fixed bug in closing complete update history feature
1 parent 4b8f9c7 commit 301f051

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cvecase.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -834,7 +834,8 @@ func AddComment(db *sqlx.DB, cveComment CveCaseComment) error {
834834
}
835835

836836
if cveComment.NewStatus == "CLOSED" {
837-
_, err = db.Exec(db.Rebind("UPDATE case_status SET status = ? WHERE filter_id = ? AND case_id IN (SELECT id FROM cases WHERE cases.orig_refnum IN (SELECT cases.orig_refnum FROM cases WHERE cases.id = ?))"), cveComment.NewStatus, cveComment.FilterId, cveComment.CaseId)
837+
_, err = db.Exec(db.Rebind("UPDATE case_status SET status = ? WHERE filter_id = ? AND "+
838+
"case_id IN (SELECT id FROM cases WHERE cases.orig_refnum IN (SELECT cases.orig_refnum FROM cases WHERE cases.id = ?) AND id <= ?)"), cveComment.NewStatus, cveComment.FilterId, cveComment.CaseId)
838839
if err != nil {
839840
log.Error().
840841
AnErr("Error", err).

0 commit comments

Comments
 (0)