CopyLinkedAnalystNotes

Copies the anaylst notes from the integrations and incidents grid. This automation runs using the default Limited User role, unless you explicitly change the permissions. For more information, see the section about permissions here: - For Cortex XSOAR 6 see https://docs-cortex.paloaltonetworks.com/r/Cortex-XSOAR/6.x/Cortex-XSOAR-Playbook-Design-Guide/Automations - For Cortex XSOAR 8 Cloud see https://docs-cortex.paloaltonetworks.com/r/Cortex-XSOAR/8/Cortex-XSOAR-Cloud-Documentation/Create-a-script - For Cortex XSOAR 8.7 On-prem see https://docs-cortex.paloaltonetworks.com/r/Cortex-XSOAR/8.7/Cortex-XSOAR-On-prem-Documentation/Create-a-script

python · Integrations & Incidents Health Check

Details

IDCopyLinkedAnalystNotes
Languagepython
From Version6.0.0
Docker Imagedemisto/python3:3.12.13.10116658
TagsfailedIncidents failedInstances

README

Copies the anaylst notes from the integrations and incidents grid.

Permissions


This automation runs using the default Limited User role, unless you explicitly change the permissions.
For more information, see the section about permissions here: For Cortex XSOAR 6, see the https://docs-cortex.paloaltonetworks.com/r/Cortex-XSOAR/6.x/Cortex-XSOAR-Playbook-Design-Guide/Automations for Cortex XSOAR 8 Cloud, see the https://docs-cortex.paloaltonetworks.com/r/Cortex-XSOAR/8/Cortex-XSOAR-Cloud-Documentation/Create-a-script for Cortex XSOAR 8 On-prem, see the https://docs-cortex.paloaltonetworks.com/r/Cortex-XSOAR/8.7/Cortex-XSOAR-On-prem-Documentation/Create-a-script.

Script Data


Name Description
Script Type python3
Tags failedIncidents, failedInstances
Cortex XSOAR Version 6.0.0

Used In


This script is used in the following playbooks and scripts.

  • JOB - Integrations and Playbooks Health Check

Inputs


There are no inputs for this script.

Outputs


There are no outputs for this script.

import demistomock as demisto
from CopyLinkedAnalystNotes import create_grids
from test_data.constants import CURRENT_INCIDENT, LINKED_INCIDENTS, MAIN_INTEGRATION_GRID, MAIN_INCIDENT_GRID


def test_create_grids(mocker):
    mocker.patch.object(demisto, "executeCommand", return_value=LINKED_INCIDENTS)
    mocker.patch.object(demisto, "incidents", return_value=CURRENT_INCIDENT)
    mocker.patch.object(demisto, "results")

    custom_fields = CURRENT_INCIDENT[0].get("CustomFields")
    linked_incident = custom_fields.get("similarincident")

    integration_grid, incident_grid = create_grids(custom_fields, linked_incident)

    assert integration_grid == MAIN_INTEGRATION_GRID
    assert incident_grid == MAIN_INCIDENT_GRID