Replies: 1 comment 1 reply
-
Hi @nflatrea, you could use a reaction that triggers on a new ticket to set default values for it, similar to https://catalyst.security-brewery.com/docs/catalyst/engineer/reaction/examples/assign_ticket Example: import sys
import json
import datetime
import os
from pocketbase import PocketBase
# Parse the ticket from the input
ticket = json.loads(sys.argv[1])
# Connect to the PocketBase server
client = PocketBase('http://127.0.0.1:8090')
client.auth_store.save(token=os.environ["CATALYST_TOKEN"])
# Update the ticket severity to "Low" if it is an alert
if ticket["record"]["type"] == "alert":
client.collection("tickets").update(ticket["record"]["id"], {
"state": {
"severity": "Low",
}
})
# Create a timeline entry for the ticket
client.collection("timeline").create({
"ticket": ticket["record"]["id"],
"time": datetime.datetime.now().isoformat(),
"message": "Ticket was created",
}) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi !
To provide a complete playbook workflow, we might need to create Templates for recurrent tickets and alerts.
When used, all data stored like tasks, links, files, comment, title can be used and overwritten. Tickets could also be cloned from another one in a signle button for ease of use.
I'm tinkering to make it work, might need a little time.
Beta Was this translation helpful? Give feedback.
All reactions