-
Notifications
You must be signed in to change notification settings - Fork 0
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
Bug/WP-364: Ticket creation emails are not sent to 'cc' emails #1017
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,10 +16,10 @@ def __init__(self): | |
|
||
def getUserTickets(self, userEmail, status="ALL"): | ||
if not status == "ALL": | ||
ticket_list = self.tracker.search(Queue=rt.ALL_QUEUES, Requestors__exact=userEmail, Status__exact=status, | ||
ticket_list = self.tracker.search(Queue=rt.ALL_QUEUES, Requestor__exact=userEmail, Status__exact=status, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this a confirmed needed change as well? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, but this is a different endpoint, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The results appear to be the same regardless of whether that line says There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If the results are the same, then we do not need to change, since nothing is broken. The issue from PR above is in create_ticket endpoint and not search endpoint. The parameter to |
||
order='-LastUpdated') | ||
else: | ||
ticket_list = self.tracker.search(Queue=rt.ALL_QUEUES, Requestors__exact=userEmail, order='-LastUpdated') | ||
ticket_list = self.tracker.search(Queue=rt.ALL_QUEUES, Requestor__exact=userEmail, order='-LastUpdated') | ||
|
||
for ticket in ticket_list: | ||
ticket['id'] = ticket['id'].replace('ticket/', '') | ||
|
@@ -42,7 +42,7 @@ def getTicketHistory(self, ticket_id): | |
|
||
return ticketHistory | ||
|
||
def create_ticket(self, attachments, subject, problem_description, requestor, cc): | ||
def create_ticket(self, attachments, subject, problem_description, requestor, cc=[]): | ||
return self.tracker.create_ticket(Queue=self.rtQueue, | ||
files=attachments, | ||
Subject=subject, | ||
|
@@ -60,7 +60,7 @@ def replyToTicket(self, ticket_id, reply_text, files=[]): | |
def hasAccess(self, ticket_id, user=None): | ||
if user and ticket_id: | ||
ticket = self.tracker.get_ticket(ticket_id) | ||
if DjangoRt.contains_user(ticket.get('Requestors', ''), user) or DjangoRt.contains_user(ticket.get('Cc', ''), user): | ||
if DjangoRt.contains_user(ticket.get('Requestor', ''), user) or DjangoRt.contains_user(ticket.get('Cc', ''), user): | ||
return True | ||
|
||
return False | ||
|
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.
should this be
['']
or[]
? In another change in this PR, the default is[]