Skip to content

Commit

Permalink
🎨 Added the issue worklog structs on the IssueScheme(v2/v3).
Browse files Browse the repository at this point in the history
  • Loading branch information
ctreminiom committed May 17, 2023
1 parent 61c430b commit 74fc408
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 55 deletions.
55 changes: 28 additions & 27 deletions pkg/infra/models/jira_issue_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,33 +85,34 @@ func (i *IssueSchemeV2) ToMap() (map[string]interface{}, error) {
}

type IssueFieldsSchemeV2 struct {
Parent *ParentScheme `json:"parent,omitempty"`
IssueType *IssueTypeScheme `json:"issuetype,omitempty"`
IssueLinks []*IssueLinkScheme `json:"issuelinks,omitempty"`
Watcher *IssueWatcherScheme `json:"watches,omitempty"`
Votes *IssueVoteScheme `json:"votes,omitempty"`
Versions []*VersionScheme `json:"versions,omitempty"`
Project *ProjectScheme `json:"project,omitempty"`
FixVersions []*VersionScheme `json:"fixVersions,omitempty"`
Priority *PriorityScheme `json:"priority,omitempty"`
Components []*ComponentScheme `json:"components,omitempty"`
Creator *UserScheme `json:"creator,omitempty"`
Reporter *UserScheme `json:"reporter,omitempty"`
Assignee *UserScheme `json:"assignee,omitempty"`
Resolution *ResolutionScheme `json:"resolution,omitempty"`
Resolutiondate string `json:"resolutiondate,omitempty"`
Workratio int `json:"workratio,omitempty"`
StatusCategoryChangeDate string `json:"statuscategorychangedate,omitempty"`
LastViewed string `json:"lastViewed,omitempty"`
Summary string `json:"summary,omitempty"`
Created string `json:"created,omitempty"`
Updated string `json:"updated,omitempty"`
Labels []string `json:"labels,omitempty"`
Status *StatusScheme `json:"status,omitempty"`
Description string `json:"description,omitempty"`
Comment *IssueCommentPageSchemeV2 `json:"comment,omitempty"`
Subtasks []*IssueScheme `json:"subtasks,omitempty"`
Security *SecurityScheme `json:"security,omitempty"`
Parent *ParentScheme `json:"parent,omitempty"`
IssueType *IssueTypeScheme `json:"issuetype,omitempty"`
IssueLinks []*IssueLinkScheme `json:"issuelinks,omitempty"`
Watcher *IssueWatcherScheme `json:"watches,omitempty"`
Votes *IssueVoteScheme `json:"votes,omitempty"`
Versions []*VersionScheme `json:"versions,omitempty"`
Project *ProjectScheme `json:"project,omitempty"`
FixVersions []*VersionScheme `json:"fixVersions,omitempty"`
Priority *PriorityScheme `json:"priority,omitempty"`
Components []*ComponentScheme `json:"components,omitempty"`
Creator *UserScheme `json:"creator,omitempty"`
Reporter *UserScheme `json:"reporter,omitempty"`
Assignee *UserScheme `json:"assignee,omitempty"`
Resolution *ResolutionScheme `json:"resolution,omitempty"`
Resolutiondate string `json:"resolutiondate,omitempty"`
Workratio int `json:"workratio,omitempty"`
StatusCategoryChangeDate string `json:"statuscategorychangedate,omitempty"`
LastViewed string `json:"lastViewed,omitempty"`
Summary string `json:"summary,omitempty"`
Created string `json:"created,omitempty"`
Updated string `json:"updated,omitempty"`
Labels []string `json:"labels,omitempty"`
Status *StatusScheme `json:"status,omitempty"`
Description string `json:"description,omitempty"`
Comment *IssueCommentPageSchemeV2 `json:"comment,omitempty"`
Subtasks []*IssueScheme `json:"subtasks,omitempty"`
Security *SecurityScheme `json:"security,omitempty"`
Worklog *IssueWorklogRichTextPageScheme `json:"worklog,omitempty"`
}

type ParentScheme struct {
Expand Down
57 changes: 29 additions & 28 deletions pkg/infra/models/jira_issue_v3.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,34 +85,35 @@ func (i *IssueScheme) ToMap() (map[string]interface{}, error) {
}

type IssueFieldsScheme struct {
Parent *ParentScheme `json:"parent,omitempty"`
IssueType *IssueTypeScheme `json:"issuetype,omitempty"`
IssueLinks []*IssueLinkScheme `json:"issuelinks,omitempty"`
Watcher *IssueWatcherScheme `json:"watches,omitempty"`
Votes *IssueVoteScheme `json:"votes,omitempty"`
Versions []*VersionScheme `json:"versions,omitempty"`
Project *ProjectScheme `json:"project,omitempty"`
FixVersions []*VersionScheme `json:"fixVersions,omitempty"`
Priority *PriorityScheme `json:"priority,omitempty"`
Components []*ComponentScheme `json:"components,omitempty"`
Creator *UserScheme `json:"creator,omitempty"`
Reporter *UserScheme `json:"reporter,omitempty"`
Assignee *UserScheme `json:"assignee,omitempty"`
Resolution *ResolutionScheme `json:"resolution,omitempty"`
Resolutiondate string `json:"resolutiondate,omitempty"`
Workratio int `json:"workratio,omitempty"`
StatusCategoryChangeDate string `json:"statuscategorychangedate,omitempty"`
LastViewed string `json:"lastViewed,omitempty"`
Summary string `json:"summary,omitempty"`
Created string `json:"created,omitempty"`
Updated string `json:"updated,omitempty"`
Labels []string `json:"labels,omitempty"`
Status *StatusScheme `json:"status,omitempty"`
Description *CommentNodeScheme `json:"description,omitempty"`
Comment *IssueCommentPageScheme `json:"comment,omitempty"`
Subtasks []*IssueScheme `json:"subtasks,omitempty"`
Security *SecurityScheme `json:"security,omitempty"`
Attachment []*AttachmentScheme `json:"attachment,omitempty"`
Parent *ParentScheme `json:"parent,omitempty"`
IssueType *IssueTypeScheme `json:"issuetype,omitempty"`
IssueLinks []*IssueLinkScheme `json:"issuelinks,omitempty"`
Watcher *IssueWatcherScheme `json:"watches,omitempty"`
Votes *IssueVoteScheme `json:"votes,omitempty"`
Versions []*VersionScheme `json:"versions,omitempty"`
Project *ProjectScheme `json:"project,omitempty"`
FixVersions []*VersionScheme `json:"fixVersions,omitempty"`
Priority *PriorityScheme `json:"priority,omitempty"`
Components []*ComponentScheme `json:"components,omitempty"`
Creator *UserScheme `json:"creator,omitempty"`
Reporter *UserScheme `json:"reporter,omitempty"`
Assignee *UserScheme `json:"assignee,omitempty"`
Resolution *ResolutionScheme `json:"resolution,omitempty"`
Resolutiondate string `json:"resolutiondate,omitempty"`
Workratio int `json:"workratio,omitempty"`
StatusCategoryChangeDate string `json:"statuscategorychangedate,omitempty"`
LastViewed string `json:"lastViewed,omitempty"`
Summary string `json:"summary,omitempty"`
Created string `json:"created,omitempty"`
Updated string `json:"updated,omitempty"`
Labels []string `json:"labels,omitempty"`
Status *StatusScheme `json:"status,omitempty"`
Description *CommentNodeScheme `json:"description,omitempty"`
Comment *IssueCommentPageScheme `json:"comment,omitempty"`
Subtasks []*IssueScheme `json:"subtasks,omitempty"`
Security *SecurityScheme `json:"security,omitempty"`
Attachment []*AttachmentScheme `json:"attachment,omitempty"`
Worklog *IssueWorklogADFPageScheme `json:"worklog,omitempty"`
}

type IssueTransitionScheme struct {
Expand Down

0 comments on commit 74fc408

Please sign in to comment.