From fce7f4a2fd9ab6ef7e2273b3f10c6ddd56d4da24 Mon Sep 17 00:00:00 2001 From: To-om Date: Thu, 12 Nov 2020 12:18:10 +0100 Subject: [PATCH] #1552 Fix order when a new custom field is added --- thehive/app/org/thp/thehive/services/CaseSrv.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/thehive/app/org/thp/thehive/services/CaseSrv.scala b/thehive/app/org/thp/thehive/services/CaseSrv.scala index dade050113..d2e2e0c88f 100644 --- a/thehive/app/org/thp/thehive/services/CaseSrv.scala +++ b/thehive/app/org/thp/thehive/services/CaseSrv.scala @@ -249,7 +249,7 @@ class CaseSrv @Inject() ( )(implicit graph: Graph, authContext: AuthContext): Try[RichCustomField] = for { cf <- customFieldSrv.getOrFail(customFieldIdOrName) - ccf <- CustomFieldType.map(cf.`type`).setValue(CaseCustomField(), customFieldValue).map(_.order_=(order)) + ccf <- CustomFieldType.map(cf.`type`).setValue(CaseCustomField().order_=(order), customFieldValue) ccfe <- caseCustomFieldSrv.create(ccf, `case`, cf) } yield RichCustomField(cf, ccfe)