Skip to content

Commit

Permalink
Merge pull request #369 from Security-Onion-Solutions/cogburn/detecti…
Browse files Browse the repository at this point in the history
…on-comment-history

Include Comments in Detection History
  • Loading branch information
coreyogburn authored Mar 5, 2024
2 parents 0638c0c + f36614f commit 794b6a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/modules/elastic/elasticdetectionstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ func (store *ElasticDetectionstore) GetAllCommunitySIDs(ctx context.Context, eng
}

func (store *ElasticDetectionstore) GetDetectionHistory(ctx context.Context, detectID string) ([]interface{}, error) {
query := fmt.Sprintf(`_index:"%s" AND %s%s:"%s" | sortby @timestamp^`, store.auditIndex, store.schemaPrefix, AUDIT_DOC_ID, detectID)
query := fmt.Sprintf(`_index:"%s" AND (%s%s:"%s" OR %sdetectioncomment.detectionId:"%s") | sortby @timestamp^`, store.auditIndex, store.schemaPrefix, AUDIT_DOC_ID, detectID, store.schemaPrefix, detectID)
history, err := store.Query(ctx, query, store.maxAssociations)

return history, err
Expand Down

0 comments on commit 794b6a0

Please sign in to comment.