Skip to content
This repository was archived by the owner on Dec 5, 2025. It is now read-only.

Commit 4de8482

Browse files
committed
[client] Add assignee at case creation in STIX
1 parent 7ca2dd2 commit 4de8482

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

pycti/entities/opencti_case_incident.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,7 @@ def create(self, **kwargs):
468468
severity = kwargs.get("severity", None)
469469
priority = kwargs.get("priority", None)
470470
x_opencti_stix_ids = kwargs.get("x_opencti_stix_ids", None)
471+
object_assignee = kwargs.get("objectAssignee", None)
471472
granted_refs = kwargs.get("objectOrganization", None)
472473
update = kwargs.get("update", False)
473474
response_types = kwargs.get("response_types", None)
@@ -494,6 +495,7 @@ def create(self, **kwargs):
494495
"objectMarking": object_marking,
495496
"objectLabel": object_label,
496497
"objectOrganization": granted_refs,
498+
"objectAssignee": object_assignee,
497499
"objects": objects,
498500
"externalReferences": external_references,
499501
"revoked": revoked,
@@ -644,6 +646,10 @@ def import_from_stix2(self, **kwargs):
644646
] = self.opencti.get_attribute_in_extension(
645647
"x_opencti_workflow_id", stix_object
646648
)
649+
if "x_opencti_assignee_ids" not in stix_object:
650+
stix_object[
651+
"x_opencti_assignee_ids"
652+
] = self.opencti.get_attribute_in_extension("assignee_ids", stix_object)
647653

648654
return self.create(
649655
stix_id=stix_object["id"],
@@ -684,6 +690,9 @@ def import_from_stix2(self, **kwargs):
684690
objectOrganization=stix_object["x_opencti_granted_refs"]
685691
if "x_opencti_granted_refs" in stix_object
686692
else None,
693+
objectAssignee=stix_object["x_opencti_assignee_ids"]
694+
if "x_opencti_assignee_ids" in stix_object
695+
else None,
687696
x_opencti_workflow_id=stix_object["x_opencti_workflow_id"]
688697
if "x_opencti_workflow_id" in stix_object
689698
else None,

0 commit comments

Comments
 (0)