From aca3191df199c30cb76205f693f67a337ffff882 Mon Sep 17 00:00:00 2001 From: Carlos Treminio Date: Wed, 14 Sep 2022 10:19:47 -0600 Subject: [PATCH] :building_construction: jira_issue_*.go edited 1. Mapped the Parent customfield struct --- pkg/infra/models/jira_issue_v2.go | 13 +++++++++++++ pkg/infra/models/jira_issue_v3.go | 1 + 2 files changed, 14 insertions(+) diff --git a/pkg/infra/models/jira_issue_v2.go b/pkg/infra/models/jira_issue_v2.go index 9857ae96..f0b2219b 100644 --- a/pkg/infra/models/jira_issue_v2.go +++ b/pkg/infra/models/jira_issue_v2.go @@ -75,6 +75,7 @@ func (i *IssueSchemeV2) ToMap() (result map[string]interface{}, err error) { } type IssueFieldsSchemeV2 struct { + Parent *ParentScheme `json:"parent,omitempty"` IssueType *IssueTypeScheme `json:"issuetype,omitempty"` IssueLinks []*IssueLinkScheme `json:"issuelinks,omitempty"` Watcher *IssueWatcherScheme `json:"watches,omitempty"` @@ -103,6 +104,18 @@ type IssueFieldsSchemeV2 struct { Security *SecurityScheme `json:"security,omitempty"` } +type ParentScheme struct { + ID string `json:"id,omitempty"` + Key string `json:"key,omitempty"` + Self string `json:"self,omitempty"` + Fields *ParentFieldsScheme `json:"fields,omitempty"` +} + +type ParentFieldsScheme struct { + Summary string `json:"summary,omitempty"` + Status *StatusScheme `json:"status,omitempty"` +} + type IssueResponseScheme struct { ID string `json:"id,omitempty"` Key string `json:"key,omitempty"` diff --git a/pkg/infra/models/jira_issue_v3.go b/pkg/infra/models/jira_issue_v3.go index 1c14bd52..73f5a4be 100644 --- a/pkg/infra/models/jira_issue_v3.go +++ b/pkg/infra/models/jira_issue_v3.go @@ -75,6 +75,7 @@ func (i *IssueScheme) ToMap() (result map[string]interface{}, err error) { } type IssueFieldsScheme struct { + Parent *ParentScheme `json:"parent,omitempty"` IssueType *IssueTypeScheme `json:"issuetype,omitempty"` IssueLinks []*IssueLinkScheme `json:"issuelinks,omitempty"` Watcher *IssueWatcherScheme `json:"watches,omitempty"`