MCPcopy Create free account
hub / github.com/bcefghj/smart-cs-multi-agent / create

Method create

python-impl/agents/ticket_handler.py:75–89  ·  view source on GitHub ↗
(self, ticket_type: str, priority: str, summary: str, details: str, user_id: str)

Source from the content-addressed store, hash-verified

73 self._tickets: dict[str, dict] = {}
74
75 def create(self, ticket_type: str, priority: str, summary: str, details: str, user_id: str) -> dict:
76 ticket_id = f"TK-{datetime.now().strftime('%Y%m%d')}-{uuid.uuid4().hex[:6].upper()}"
77 ticket = {
78 "ticket_id": ticket_id,
79 "type": ticket_type,
80 "priority": priority,
81 "status": TicketStatus.CREATED.value,
82 "summary": summary,
83 "details": details,
84 "user_id": user_id,
85 "created_at": datetime.now().isoformat(),
86 "updated_at": datetime.now().isoformat(),
87 }
88 self._tickets[ticket_id] = ticket
89 return ticket
90
91 def query(self, ticket_id: str) -> dict | None:
92 return self._tickets.get(ticket_id)

Callers 2

create_ticketMethod · 0.80
init_tracerFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected