<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic closing duplicated tickets in XSOAR &amp;amp; Splunk automatically in Cortex XSOAR Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/closing-duplicated-tickets-in-xsoar-amp-splunk-automatically/m-p/529152#M1743</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i am trying to close duplicated tickets on XSOAR and Splunk automatically using pre processing rules (for closing on XSOAR) and post processing rule (for closing on Splunk) which i wrote a script for&lt;/P&gt;
&lt;P&gt;However i cannot test the post processing scripts because the pre processing script closes the tickets and i cannot reopen them or access the ticket to run the script to test it before applying the post process rule.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;try:&lt;BR /&gt;close_reason = str(demisto.args().get('closeReason'))&lt;BR /&gt;closing_user = str(demisto.args().get('closingUserId'))&lt;BR /&gt;if close_reason == "Duplicate" and closing_user == 'DBot':&lt;BR /&gt;EVID = str(demisto.incident()['CustomFields']['splunkeventid'])&lt;BR /&gt;user_auto = demisto.executeCommand("setIncident", {'owner' : 'admin'})&lt;BR /&gt;demisto.executeCommand("splunk-notable-event-edit", {"eventIDs": EVID ,'owner': user_auto, "comment": "Auto closing this Duplicate Alarm" ,"status":"5" })&lt;BR /&gt;else:&lt;BR /&gt;&lt;BR /&gt;EID = str(demisto.incident()['CustomFields']['splunkeventid'])&lt;BR /&gt;nota = str(demisto.incident()['CustomFields']['closernote'])&lt;BR /&gt;user = str(demisto.incident()['owner'])&lt;BR /&gt;demisto.executeCommand("splunk-notable-event-edit", {"eventIDs": EID,'owner': user, "comment": nota ,"status":"5" })&lt;/P&gt;
&lt;P&gt;except:&lt;BR /&gt;print("you are trying to close a manual ticket")&lt;/P&gt;</description>
    <pubDate>Mon, 30 Jan 2023 14:29:22 GMT</pubDate>
    <dc:creator>abdulazizh</dc:creator>
    <dc:date>2023-01-30T14:29:22Z</dc:date>
    <item>
      <title>closing duplicated tickets in XSOAR &amp; Splunk automatically</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/closing-duplicated-tickets-in-xsoar-amp-splunk-automatically/m-p/529152#M1743</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i am trying to close duplicated tickets on XSOAR and Splunk automatically using pre processing rules (for closing on XSOAR) and post processing rule (for closing on Splunk) which i wrote a script for&lt;/P&gt;
&lt;P&gt;However i cannot test the post processing scripts because the pre processing script closes the tickets and i cannot reopen them or access the ticket to run the script to test it before applying the post process rule.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;try:&lt;BR /&gt;close_reason = str(demisto.args().get('closeReason'))&lt;BR /&gt;closing_user = str(demisto.args().get('closingUserId'))&lt;BR /&gt;if close_reason == "Duplicate" and closing_user == 'DBot':&lt;BR /&gt;EVID = str(demisto.incident()['CustomFields']['splunkeventid'])&lt;BR /&gt;user_auto = demisto.executeCommand("setIncident", {'owner' : 'admin'})&lt;BR /&gt;demisto.executeCommand("splunk-notable-event-edit", {"eventIDs": EVID ,'owner': user_auto, "comment": "Auto closing this Duplicate Alarm" ,"status":"5" })&lt;BR /&gt;else:&lt;BR /&gt;&lt;BR /&gt;EID = str(demisto.incident()['CustomFields']['splunkeventid'])&lt;BR /&gt;nota = str(demisto.incident()['CustomFields']['closernote'])&lt;BR /&gt;user = str(demisto.incident()['owner'])&lt;BR /&gt;demisto.executeCommand("splunk-notable-event-edit", {"eventIDs": EID,'owner': user, "comment": nota ,"status":"5" })&lt;/P&gt;
&lt;P&gt;except:&lt;BR /&gt;print("you are trying to close a manual ticket")&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2023 14:29:22 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/closing-duplicated-tickets-in-xsoar-amp-splunk-automatically/m-p/529152#M1743</guid>
      <dc:creator>abdulazizh</dc:creator>
      <dc:date>2023-01-30T14:29:22Z</dc:date>
    </item>
    <item>
      <title>Re: closing duplicated tickets in XSOAR &amp; Splunk automatically</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/closing-duplicated-tickets-in-xsoar-amp-splunk-automatically/m-p/540196#M2049</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/226010"&gt;@abdulazizh&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If your script works as expected, post-processing should work as well. You cannot run any command on the closed incidents. If you want to test before implementing it, I would recommend having another pre-process rule for fake alerts and doing the testing on those ones by triggering some fake alerts on Splunk. I could not reproduce the issue due to the lack of Splunk integration, but Slack notification with incident details worked. So, you need to make sure the below command works as expected.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;demisto.executeCommand("splunk-notable-event-edit", {"eventIDs": EID,'owner': user, "comment": nota ,"status":"5" })&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2023 13:19:42 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/closing-duplicated-tickets-in-xsoar-amp-splunk-automatically/m-p/540196#M2049</guid>
      <dc:creator>gyldz</dc:creator>
      <dc:date>2023-04-26T13:19:42Z</dc:date>
    </item>
  </channel>
</rss>

