-
Notifications
You must be signed in to change notification settings - Fork 232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
develop to master #1799
develop to master #1799
Conversation
AgentTicket Detail redesign
Agent communication area
fix: only show agents in ticket assignment modal
fix: show remaining history activities
@@ -14,6 +14,7 @@ def get_ticket_obj(): | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[black-format] reported by reviewdog 🐶
@@ -14,6 +14,7 @@ def get_ticket_obj(): | |||
|
|||
non_agent = "[email protected]" | |||
agent = "[email protected]" | |||
agent2 = "[email protected]" | |||
class TestHDTicket(FrappeTestCase): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[black-format] reported by reviewdog 🐶
class TestHDTicket(FrappeTestCase): | |
class TestHDTicket(FrappeTestCase): |
frappe.get_doc({ | ||
"doctype": "User", | ||
"first_name": "Agent2", | ||
"email": agent2 | ||
}).insert() | ||
frappe.get_doc({ | ||
"doctype": "HD Agent", | ||
"user": agent2 | ||
}).insert() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[black-format] reported by reviewdog 🐶
frappe.get_doc({ | |
"doctype": "User", | |
"first_name": "Agent2", | |
"email": agent2 | |
}).insert() | |
frappe.get_doc({ | |
"doctype": "HD Agent", | |
"user": agent2 | |
}).insert() | |
frappe.get_doc( | |
{"doctype": "User", "first_name": "Agent2", "email": agent2} | |
).insert() | |
frappe.get_doc({"doctype": "HD Agent", "user": agent2}).insert() |
notification = frappe.get_all("HD Notification", filters={"reference_ticket": ticket.name, "notification_type": "Assignment", "user_to": agent, "user_from": "Administrator"}) | ||
self.assertEqual(len(notification), 1) | ||
ticket.assign_agent(agent2) | ||
notification = frappe.get_all("HD Notification", filters={"reference_ticket": ticket.name, "notification_type": "Assignment", "user_to": ["in", [agent, agent2]], "user_from": "Administrator"}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[black-format] reported by reviewdog 🐶
notification = frappe.get_all("HD Notification", filters={"reference_ticket": ticket.name, "notification_type": "Assignment", "user_to": ["in", [agent, agent2]], "user_from": "Administrator"}) | |
notification = frappe.get_all( | |
"HD Notification", | |
filters={ | |
"reference_ticket": ticket.name, | |
"notification_type": "Assignment", | |
"user_to": ["in", [agent, agent2]], | |
"user_from": "Administrator", | |
}, | |
) |
self.assertEqual(len(notification), 1) | ||
ticket.assign_agent(agent2) | ||
notification = frappe.get_all("HD Notification", filters={"reference_ticket": ticket.name, "notification_type": "Assignment", "user_to": ["in", [agent, agent2]], "user_from": "Administrator"}) | ||
self.assertEqual(len(notification), 2) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[black-format] reported by reviewdog 🐶
@@ -193,9 +194,10 @@ def on_update(self): | |||
if self.status == "Open": | |||
if self.get_doc_before_save() and self.get_doc_before_save().status != "Open": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[black-format] reported by reviewdog 🐶
if self.get_doc_before_save() and self.get_doc_before_save().status != "Open": | |
if ( | |
self.get_doc_before_save() | |
and self.get_doc_before_save().status != "Open" | |
): |
agents = self.get_assigned_agents() | ||
if agents: | ||
for agent in agents: | ||
self.notify_agent(agent.name, "Reaction") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[black-format] reported by reviewdog 🐶
# the agent is already set as an assignee | ||
return | ||
|
||
clear_all_assignments("HD Ticket", self.name) | ||
assign({"assign_to": [agent], "doctype": "HD Ticket", "name": self.name}) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[black-format] reported by reviewdog 🐶
# the agent is already set as an assignee | ||
return | ||
|
||
clear_all_assignments("HD Ticket", self.name) | ||
assign({"assign_to": [agent], "doctype": "HD Ticket", "name": self.name}) | ||
|
||
if frappe.session.user != agent: | ||
self.notify_agent(agent, "Assignment") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[black-format] reported by reviewdog 🐶
@@ -467,13 +463,13 @@ def new_comment(self, content: str): | |||
|
|||
@frappe.whitelist() | |||
def reply_via_agent( | |||
self, message: str, cc: str = None, bcc: str = None, attachments: List[str] = [] | |||
self, message: str, to: str = None, cc: str = None, bcc: str = None, attachments: List[str] = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[black-format] reported by reviewdog 🐶
self, message: str, to: str = None, cc: str = None, bcc: str = None, attachments: List[str] = [] | |
self, | |
message: str, | |
to: str = None, | |
cc: str = None, | |
bcc: str = None, | |
attachments: List[str] = [], |
No description provided.