diff --git a/client/src/components/Tickets/TicketCreateForm.jsx b/client/src/components/Tickets/TicketCreateForm.jsx index 2d392f573..78af4a0ac 100644 --- a/client/src/components/Tickets/TicketCreateForm.jsx +++ b/client/src/components/Tickets/TicketCreateForm.jsx @@ -197,7 +197,7 @@ function TicketCreateForm({ diff --git a/server/portal/apps/onboarding/steps/project_membership.py b/server/portal/apps/onboarding/steps/project_membership.py index 8833277de..0e0c4f126 100644 --- a/server/portal/apps/onboarding/steps/project_membership.py +++ b/server/portal/apps/onboarding/steps/project_membership.py @@ -89,7 +89,7 @@ def send_project_request(self, request): username=self.user.username ), Text=ticket_text, - Requestors=self.user.email, + Requestor=self.user.email, CF_resource=settings.RT_TAG ) tracker.logout() diff --git a/server/portal/apps/tickets/api/views.py b/server/portal/apps/tickets/api/views.py index 0d42583ed..f276669b9 100644 --- a/server/portal/apps/tickets/api/views.py +++ b/server/portal/apps/tickets/api/views.py @@ -46,7 +46,7 @@ def post(self, request): data = request.POST.copy() subject = data.get('subject') problem_description = data.get('problem_description') - cc = data.get('cc', '') + cc = data.get('cc', ['']) attachments = [(f.name, ContentFile(f.read()), f.content_type) for f in request.FILES.getlist('attachments')] info = request.GET.get('info', "None") diff --git a/server/portal/apps/tickets/rtUtil.py b/server/portal/apps/tickets/rtUtil.py index 13467d466..9f58980b1 100644 --- a/server/portal/apps/tickets/rtUtil.py +++ b/server/portal/apps/tickets/rtUtil.py @@ -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, 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