From 737302adec0eca8ca9d1397a6c560791fa78a5b0 Mon Sep 17 00:00:00 2001 From: Robi9 Date: Wed, 7 Jun 2023 16:13:22 -0300 Subject: [PATCH 1/2] Remove ticket return in case of reopening --- services/tickets/zendesk/service.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/tickets/zendesk/service.go b/services/tickets/zendesk/service.go index 57a42123e..8826f3b0c 100644 --- a/services/tickets/zendesk/service.go +++ b/services/tickets/zendesk/service.go @@ -118,7 +118,7 @@ func (s *service) Open(session flows.Session, topic *flows.Topic, body string, a _, trace, _ := s.restClient.UpdateManyTickets(ids, statusOpen) if trace != nil { logHTTP(flows.NewHTTPLog(trace, flows.HTTPStatusFromCode, s.redactor)) - return ticket, nil + return nil, nil } } From 0c4e5dc513de89ea82c018cc44bab4e6f38466af Mon Sep 17 00:00:00 2001 From: Robi9 Date: Wed, 7 Jun 2023 17:40:25 -0300 Subject: [PATCH 2/2] Remove unnecessary tests --- services/tickets/zendesk/service_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/services/tickets/zendesk/service_test.go b/services/tickets/zendesk/service_test.go index 4758b225d..041678deb 100644 --- a/services/tickets/zendesk/service_test.go +++ b/services/tickets/zendesk/service_test.go @@ -145,9 +145,8 @@ func TestOpenAndForward(t *testing.T) { test.AssertSnapshot(t, "forward_message", logger.Logs[0].Request) logger = &flows.HTTPLogger{} - ticket1, err := svc.Open(session, defaultTopic, fieldTicket1, nil, logger.Log) + _, err = svc.Open(session, defaultTopic, fieldTicket1, nil, logger.Log) assert.NoError(t, err) - assert.Equal(t, fieldTicket1, ticket1.Body()) assert.Equal(t, 1, len(logger.Logs)) test.AssertSnapshot(t, "open", logger.Logs[0].Request) }