Incident operations
The incident operations can be used with any Object Type for the script.
The object contains the incident data and additional helper methods. The incident data contains only data from incident fields; it does not contain its notes, task, milestones, artifacts, or attachments.
Type incident. to access data from a specific incident field or execute a helper method. The field names and helper methods appear in a type-ahead box as you type.
"incident.plan_status = 'C'"
instead
of "incident.plan_status = 'Closed'"
The following table describes the helper methods.
Operation | Description |
---|---|
|
Adds an artifact to the incident with the given type, value, and description. Returns an Artifact script object for further customization. |
|
Attaches the email attachment to the incident and returns the attachment object to the incident. The returned attachment object can then be acted on by other script operations. Refer to the end of this table for more information. |
|
Adds a milestone to the incident with the given title, description, and date. Returns a Milestone script object for further customization. |
|
Adds a note to the incident with the given text. Returns a Note script object for further customization. |
|
Adds a row to the named data table on the incident. Returns a Row script object for further customization. |
|
Adds an adhoc task to the incident with the given name, phase, and instructions. Returns a Task script object for further customization. |
The attachment object returned by addEmailAttachment(id)
and
addEmailAttachment(id, filename, content_type)
defines two modifiable fields:
filename
and content_type
. The
addEmailAttachment(id)
uses the email message's suggested_filename
and suggested_content_type
field values for the filename and content type values,
respectively, when creating the incident attachment. The addEmailAttachment(id, filename,
content_type)
allows you to specify the filename and content_type
values.
For example, if the presented_filename
and presented_content_type
values were to be used instead, they could be specified using this function signature variation.
oldId = int(row.system_id)
newRow = incident.addRow("infected_systems")
newRow.updated(row)
newRow["system_id"] = str(oldId + 1)
newRow["owner_group"] = "HR"