IbmAddTask
Use this script to add a task to an IBM QRadar SOAR incident.
python · IBM Security QRadar SOAR
Source
import demistomock as demisto # noqa: F401 from CommonServerPython import * # noqa: F401 def add_task(args: Dict[str, Any]) -> CommandResults: remote_incident_id = demisto.incident()["dbotMirrorId"] demisto.debug(f"add_task {args=} | {remote_incident_id=}") # Updating arguments according to expected command arguments. tags = argToList(args.pop("tags", "")) args["incident_id"] = remote_incident_id response = demisto.executeCommand("rs-add-custom-task", args) demisto.debug(f"add_task {response=}") table_name = ( response[0]["HumanReadable"] if (isinstance(response, list) and len(response) > 0 and response[0]["HumanReadable"]) else "New task created" ) readable_output = tableToMarkdown( table_name, { "Name": args.get("name"), "Phase": args.get("phase"), "Due date": args.get("due_date"), "Description": args.get("description"), "Instructions": args.get("instructions"), }, ) return CommandResults(readable_output=readable_output, mark_as_note=False, tags=tags or None) def main(): # pragma: no cover try: res = add_task(demisto.args()) return_results(res) except Exception as ex: return_error(f"Failed to execute IbmAddTask. Error: {ex!s}") if __name__ in ["__builtin__", "builtins", "__main__"]: main()
README
Use this script to add a task to an IBM QRadar SOAR incident.
Script Data
| Name | Description |
|---|---|
| Script Type | python3 |
| Cortex XSOAR Version | 6.8.0 |
Dependencies
This script uses the following commands and scripts.
- IBM Resilient Systems
- rs-add-custom-task
Inputs
| Argument Name | Description |
|---|---|
| name | Task name. |
| description | Task description. |
| instructions | Textual instructions for the task. This will override the default instructions for the task. |
| due_date | Task due date in ISO format e.g., “2020-02-02T19:00:00Z. Empty date indicates that the task has no assigned due date. |
| owner_id | The owner of the task (ID or name as appears in IBM QRadar SOAR). Leave empty if the task has no owner. |
| phase | Task to be added to the IBM QRadar incident. |
Outputs
There are no outputs for this script.