Skip to content

Commit

Permalink
#1625 Fix case link with ignoreSimilarity
Browse files Browse the repository at this point in the history
  • Loading branch information
To-om committed Nov 9, 2020
1 parent 85908d4 commit 8d5e145
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions thehive/app/org/thp/thehive/services/CaseSrv.scala
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,10 @@ class CaseSrv @Inject() (
}
_ <- createdTasks.toTry(t => shareSrv.shareTask(t, createdCase, organisation))

caseTemplateCf = caseTemplate
.fold[Seq[RichCustomField]](Seq())(_.customFields)
.map(cf => InputCustomFieldValue(cf.name, cf.value, cf.order))
caseTemplateCf =
caseTemplate
.fold[Seq[RichCustomField]](Seq())(_.customFields)
.map(cf => InputCustomFieldValue(cf.name, cf.value, cf.order))
cfs <- cleanCustomFields(caseTemplateCf, customFields).toTry {
case InputCustomFieldValue(name, value, order) => createCustomField(createdCase, EntityIdOrName(name), value, order)
}
Expand Down Expand Up @@ -470,9 +471,11 @@ object CaseOps {
traversal
.as(originCaseLabel)
.observables
.hasNot(_.ignoreSimilarity, true)
.as(observableLabel)
.data
.observables
.hasNot(_.ignoreSimilarity, true)
.shares
.filter(_.organisation.current)
.`case`
Expand Down

0 comments on commit 8d5e145

Please sign in to comment.