- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
Enhanced Security Measures in Place: To ensure a safer experience, we’ve implemented additional, temporary security measures for all users.
03-04-2021 07:08 PM
I have a trigger script automation that updates the linked incidents of an incident. The update works, but then it produces the following error and refuses to update the field that triggered the automation.
The script works fine if I run it from the command line. It's only when a triggered script runs that there's a problem.
Here's a sample that causes a problem. If I comment this line out, the field updates just fine.
demisto.executeCommand("setIncident", {'id':child_case_id, "customFields":"{\"False Positive\":\"True\"}"})
Anyone know what's going on and to fix this?
03-23-2021 05:25 PM
Yes, I created a new button for the "Create new parent" thing. I tried to do it via the triggered script. I could get it to link to create the new incident and to link to it (using demisto.investigation()['id']). However, that would require updating the field that just got changed from "Create new..." to the name of the new parent, and I couldn't get that to work. That's when I gave up and made the button.
You suggest a delay. I'm not sure where you want me to put it. Here's the current sequence. Where should I put it?
If steps 1-4 are replaced by a user clicking on the falsepositiveparent field to update it, everything works perfectly. So, this smells like a deadly embrace bug where the button and the trigger script are waiting for each other.
Note that there are no loops.
The workaround is just to stop trying to update the falsepositive field and make the user do it manually. That's not a huge problem, so don't break your back trying to figure this out in a rush. It's worth figuring out eventually, though, as the documentation for the restrictions on trigger scripts should be more complete, and also this might be an actual bug.
03-23-2021 05:38 PM
Also, I'm very impressed that your triggered script in the video managed to close the incident. On reading the documentation for trigger scripts, I see that "Trigger scripts cannot close incidents.".
03-24-2021 05:05 AM
Sorry, I did not meana delay in the script iteself. I meant the timeout of the script:
If there is something "locking up" the incident in the script, then it will unlock after (for example) 5 seconds.
03-24-2021 05:05 AM
Ha, I did not notice that in the documentation. I have informed our technical writers about it and they will check with engineering before updating the docs. Well spotted!
03-24-2021 04:55 PM
The timeouts for all the scripts are set to the default, 180 seconds. The lockup seems to be forever.
I've asked our admin to file a support ticket to get help closing the broken incidents.
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!