From b2353db1854b0c43103925040a75c8cd01a07517 Mon Sep 17 00:00:00 2001 From: Rowan Seymour Date: Thu, 8 Aug 2024 18:53:01 +0000 Subject: [PATCH] Remove old body field on ticket modifier --- flows/modifiers/testdata/ticket.json | 6 ++---- flows/modifiers/ticket.go | 7 ------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/flows/modifiers/testdata/ticket.json b/flows/modifiers/testdata/ticket.json index 85ea96536..9ea59ce60 100644 --- a/flows/modifiers/testdata/ticket.json +++ b/flows/modifiers/testdata/ticket.json @@ -18,8 +18,7 @@ "email": "bob@nyaruka.com", "name": "Bob" }, - "note": "this is a note", - "body": "this is a note" + "note": "this is a note" }, "contact_after": { "uuid": "5d76d86b-3bb9-4d5a-b822-c9d86f5d8e4f", @@ -85,8 +84,7 @@ "name": "Computers" }, "assignee": null, - "note": "Should fail", - "body": "Should fail" + "note": "Should fail" }, "contact_after": { "uuid": "5d76d86b-3bb9-4d5a-b822-c9d86f5d8e4f", diff --git a/flows/modifiers/ticket.go b/flows/modifiers/ticket.go index 1efbd7f02..235a0ef23 100644 --- a/flows/modifiers/ticket.go +++ b/flows/modifiers/ticket.go @@ -63,8 +63,6 @@ type ticketModifierEnvelope struct { Topic *assets.TopicReference `json:"topic" validate:"required"` Assignee *assets.UserReference `json:"assignee"` Note string `json:"note"` - - Body string `json:"body"` // deprecated } func readTicketModifier(assets flows.SessionAssets, data json.RawMessage, missing assets.MissingCallback) (flows.Modifier, error) { @@ -73,10 +71,6 @@ func readTicketModifier(assets flows.SessionAssets, data json.RawMessage, missin return nil, err } - if e.Note == "" && e.Body != "" { - e.Note = e.Body - } - topic := assets.Topics().Get(e.Topic.UUID) if topic == nil { missing(e.Topic, nil) @@ -100,6 +94,5 @@ func (m *TicketModifier) MarshalJSON() ([]byte, error) { Topic: m.topic.Reference(), Assignee: m.assignee.Reference(), Note: m.note, - Body: m.note, }) }