tasks

package
v0.14.3-alpha1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2022 License: Apache-2.0 Imports: 23 Imported by: 2

Documentation

Index

Constants

View Source
const RAW_BOARD_TABLE = "jira_api_boards"
View Source
const RAW_CHANGELOG_TABLE = "jira_api_issue_changelogs"
View Source
const RAW_EPIC_TABLE = "jira_api_epics"
View Source
const RAW_ISSUE_TABLE = "jira_api_issues"
View Source
const RAW_ISSUE_TYPE_TABLE = "jira_api_issue_types"
View Source
const RAW_PROJECT_TABLE = "jira_api_projects"
View Source
const RAW_REMOTELINK_TABLE = "jira_api_remotelinks"
View Source
const RAW_SPRINT_TABLE = "jira_api_sprints"
View Source
const RAW_STATUS_TABLE = "jira_api_status"
View Source
const RAW_USERS_TABLE = "jira_api_users"
View Source
const RAW_WORKLOGS_TABLE = "jira_api_worklogs"

Variables

View Source
var CollectAccountsMeta = core.SubTaskMeta{
	Name:             "collectAccounts",
	EntryPoint:       CollectAccounts,
	EnabledByDefault: true,
	Description:      "collect Jira accounts",
	DomainTypes:      []string{core.DOMAIN_TYPE_CROSS},
}
View Source
var CollectBoardMeta = core.SubTaskMeta{
	Name:             "collectBoard",
	EntryPoint:       CollectBoard,
	EnabledByDefault: true,
	Description:      "collect Jira board",
	DomainTypes:      []string{core.DOMAIN_TYPE_TICKET},
}
View Source
var CollectEpicsMeta = core.SubTaskMeta{
	Name:             "collectEpics",
	EntryPoint:       CollectEpics,
	EnabledByDefault: true,
	Description:      "collect Jira epics from all boards",
	DomainTypes:      []string{core.DOMAIN_TYPE_TICKET, core.DOMAIN_TYPE_CROSS},
}
View Source
var CollectIssueChangelogsMeta = core.SubTaskMeta{
	Name:             "collectIssueChangelogs",
	EntryPoint:       CollectIssueChangelogs,
	EnabledByDefault: true,
	Description:      "collect Jira Issue change logs",
	DomainTypes:      []string{core.DOMAIN_TYPE_TICKET, core.DOMAIN_TYPE_CROSS},
}
View Source
var CollectIssueTypesMeta = core.SubTaskMeta{
	Name:             "collectIssueTypes",
	EntryPoint:       CollectIssueTypes,
	EnabledByDefault: true,
	Description:      "collect Jira issue_types",
	DomainTypes:      []string{core.DOMAIN_TYPE_TICKET},
}
View Source
var CollectIssuesMeta = core.SubTaskMeta{
	Name:             "collectIssues",
	EntryPoint:       CollectIssues,
	EnabledByDefault: true,
	Description:      "collect Jira issues",
	DomainTypes:      []string{core.DOMAIN_TYPE_TICKET, core.DOMAIN_TYPE_CROSS},
}
View Source
var CollectProjectsMeta = core.SubTaskMeta{
	Name:             "collectProjects",
	EntryPoint:       CollectProjects,
	EnabledByDefault: true,
	Description:      "collect Jira projects",
	DomainTypes:      []string{core.DOMAIN_TYPE_TICKET},
}
View Source
var CollectRemotelinksMeta = core.SubTaskMeta{
	Name:             "collectRemotelinks",
	EntryPoint:       CollectRemotelinks,
	EnabledByDefault: true,
	Description:      "collect Jira remote links",
	DomainTypes:      []string{core.DOMAIN_TYPE_TICKET},
}
View Source
var CollectSprintsMeta = core.SubTaskMeta{
	Name:             "collectSprints",
	EntryPoint:       CollectSprints,
	EnabledByDefault: true,
	Description:      "collect Jira sprints",
	DomainTypes:      []string{core.DOMAIN_TYPE_TICKET},
}
View Source
var CollectStatusMeta = core.SubTaskMeta{
	Name:             "collectStatus",
	EntryPoint:       CollectStatus,
	EnabledByDefault: true,
	Description:      "collect Jira status",
	DomainTypes:      []string{core.DOMAIN_TYPE_TICKET},
}
View Source
var CollectWorklogsMeta = core.SubTaskMeta{
	Name:             "collectWorklogs",
	EntryPoint:       CollectWorklogs,
	EnabledByDefault: true,
	Description:      "collect Jira work logs",
	DomainTypes:      []string{core.DOMAIN_TYPE_TICKET},
}
View Source
var ConvertAccountsMeta = core.SubTaskMeta{
	Name:             "convertAccounts",
	EntryPoint:       ConvertAccounts,
	EnabledByDefault: true,
	Description:      "convert Jira accounts",
	DomainTypes:      []string{core.DOMAIN_TYPE_CROSS},
}
View Source
var ConvertBoardMeta = core.SubTaskMeta{
	Name:             "convertBoard",
	EntryPoint:       ConvertBoard,
	EnabledByDefault: true,
	Description:      "convert Jira board",
	DomainTypes:      []string{core.DOMAIN_TYPE_TICKET},
}
View Source
var ConvertIssueChangelogsMeta = core.SubTaskMeta{
	Name:             "convertIssueChangelogs",
	EntryPoint:       ConvertIssueChangelogs,
	EnabledByDefault: true,
	Description:      "convert Jira Issue change logs",
	DomainTypes:      []string{core.DOMAIN_TYPE_TICKET, core.DOMAIN_TYPE_CROSS},
}
View Source
var ConvertIssueCommitsMeta = core.SubTaskMeta{
	Name:             "convertIssueCommits",
	EntryPoint:       ConvertIssueCommits,
	EnabledByDefault: true,
	Description:      "convert Jira issue commits",
	DomainTypes:      []string{core.DOMAIN_TYPE_CROSS},
}
View Source
var ConvertIssueRepoCommitsMeta = core.SubTaskMeta{
	Name:             "convertIssueRepoCommits",
	EntryPoint:       ConvertIssueRepoCommits,
	EnabledByDefault: false,
	Description:      "convert Jira issue repo commits",
	DomainTypes:      []string{core.DOMAIN_TYPE_CROSS},
}
View Source
var ConvertIssuesMeta = core.SubTaskMeta{
	Name:             "convertIssues",
	EntryPoint:       ConvertIssues,
	EnabledByDefault: true,
	Description:      "convert Jira issues",
	DomainTypes:      []string{core.DOMAIN_TYPE_TICKET},
}
View Source
var ConvertSprintIssuesMeta = core.SubTaskMeta{
	Name:             "convertSprintIssues",
	EntryPoint:       ConvertSprintIssues,
	EnabledByDefault: true,
	Description:      "convert Jira sprint_issues",
	DomainTypes:      []string{core.DOMAIN_TYPE_TICKET},
}
View Source
var ConvertSprintsMeta = core.SubTaskMeta{
	Name:             "convertSprints",
	EntryPoint:       ConvertSprints,
	EnabledByDefault: true,
	Description:      "convert Jira sprints",
	DomainTypes:      []string{core.DOMAIN_TYPE_TICKET},
}
View Source
var ConvertWorklogsMeta = core.SubTaskMeta{
	Name:             "convertWorklogs",
	EntryPoint:       ConvertWorklogs,
	EnabledByDefault: true,
	Description:      "convert Jira work logs",
	DomainTypes:      []string{core.DOMAIN_TYPE_TICKET},
}
View Source
var ExtractAccountsMeta = core.SubTaskMeta{
	Name:             "extractAccounts",
	EntryPoint:       ExtractAccounts,
	EnabledByDefault: true,
	Description:      "extract Jira users",
	DomainTypes:      []string{core.DOMAIN_TYPE_CROSS},
}
View Source
var ExtractBoardMeta = core.SubTaskMeta{Name: "extractBoard",
	EntryPoint:       ExtractBoard,
	EnabledByDefault: true,
	Description:      "extract Jira board",
	DomainTypes:      []string{core.DOMAIN_TYPE_TICKET},
}
View Source
var ExtractEpicsMeta = core.SubTaskMeta{
	Name:             "extractEpics",
	EntryPoint:       ExtractEpics,
	EnabledByDefault: true,
	Description:      "extract Jira epics from all boards",
	DomainTypes:      []string{core.DOMAIN_TYPE_TICKET, core.DOMAIN_TYPE_CROSS},
}
View Source
var ExtractIssueChangelogsMeta = core.SubTaskMeta{
	Name:             "extractIssueChangelogs",
	EntryPoint:       ExtractIssueChangelogs,
	EnabledByDefault: true,
	Description:      "extract Jira Issue change logs",
	DomainTypes:      []string{core.DOMAIN_TYPE_TICKET, core.DOMAIN_TYPE_CROSS},
}
View Source
var ExtractIssueTypesMeta = core.SubTaskMeta{
	Name:             "extractIssueType",
	EntryPoint:       ExtractIssueType,
	EnabledByDefault: true,
	Description:      "extract Jira issueType",
	DomainTypes:      []string{core.DOMAIN_TYPE_TICKET},
}
View Source
var ExtractIssuesMeta = core.SubTaskMeta{
	Name:             "extractIssues",
	EntryPoint:       ExtractIssues,
	EnabledByDefault: true,
	Description:      "extract Jira issues",
	DomainTypes:      []string{core.DOMAIN_TYPE_TICKET, core.DOMAIN_TYPE_CROSS},
}
View Source
var ExtractProjectsMeta = core.SubTaskMeta{
	Name:             "extractProjects",
	EntryPoint:       ExtractProjects,
	EnabledByDefault: true,
	Description:      "extract Jira projects",
	DomainTypes:      []string{core.DOMAIN_TYPE_TICKET},
}
View Source
var ExtractRemotelinksMeta = core.SubTaskMeta{
	Name:             "extractRemotelinks",
	EntryPoint:       ExtractRemotelinks,
	EnabledByDefault: true,
	Description:      "extract Jira remote links",
	DomainTypes:      []string{core.DOMAIN_TYPE_TICKET},
}
View Source
var ExtractSprintsMeta = core.SubTaskMeta{
	Name:             "extractSprints",
	EntryPoint:       ExtractSprints,
	EnabledByDefault: true,
	Description:      "extract Jira sprints",
	DomainTypes:      []string{core.DOMAIN_TYPE_TICKET},
}
View Source
var ExtractStatusMeta = core.SubTaskMeta{
	Name:             "extractStatus",
	EntryPoint:       ExtractStatus,
	EnabledByDefault: true,
	Description:      "extract Jira status",
	DomainTypes:      []string{core.DOMAIN_TYPE_TICKET},
}
View Source
var ExtractWorklogsMeta = core.SubTaskMeta{
	Name:             "extractWorklogs",
	EntryPoint:       ExtractWorklogs,
	EnabledByDefault: true,
	Description:      "extract Jira work logs",
	DomainTypes:      []string{core.DOMAIN_TYPE_TICKET},
}

Functions

func CollectAccounts added in v0.12.0

func CollectAccounts(taskCtx core.SubTaskContext) errors.Error

func CollectBoard

func CollectBoard(taskCtx core.SubTaskContext) errors.Error

func CollectEpics added in v0.13.0

func CollectEpics(taskCtx core.SubTaskContext) errors.Error

func CollectIssueChangelogs added in v0.12.0

func CollectIssueChangelogs(taskCtx core.SubTaskContext) errors.Error

func CollectIssueTypes added in v0.12.0

func CollectIssueTypes(taskCtx core.SubTaskContext) errors.Error

func CollectIssues

func CollectIssues(taskCtx core.SubTaskContext) errors.Error

func CollectProjects

func CollectProjects(taskCtx core.SubTaskContext) errors.Error
func CollectRemotelinks(taskCtx core.SubTaskContext) errors.Error

func CollectSprints

func CollectSprints(taskCtx core.SubTaskContext) errors.Error

func CollectStatus

func CollectStatus(taskCtx core.SubTaskContext) errors.Error

func CollectWorklogs

func CollectWorklogs(taskCtx core.SubTaskContext) errors.Error

func ConvertAccounts added in v0.12.0

func ConvertAccounts(taskCtx core.SubTaskContext) errors.Error

func ConvertBoard

func ConvertBoard(taskCtx core.SubTaskContext) errors.Error

func ConvertIssueChangelogs added in v0.12.0

func ConvertIssueChangelogs(taskCtx core.SubTaskContext) errors.Error

func ConvertIssueCommits

func ConvertIssueCommits(taskCtx core.SubTaskContext) errors.Error

func ConvertIssueRepoCommits

func ConvertIssueRepoCommits(taskCtx core.SubTaskContext) errors.Error

ConvertIssueRepoCommits is to extract issue_repo_commits from jira_issue_commits, nothing difference with issue_commits but added a RepoUrl. This task is needed by EE group.

func ConvertIssues

func ConvertIssues(taskCtx core.SubTaskContext) errors.Error

func ConvertSprintIssues

func ConvertSprintIssues(taskCtx core.SubTaskContext) errors.Error

func ConvertSprints

func ConvertSprints(taskCtx core.SubTaskContext) errors.Error

func ConvertWorklogs

func ConvertWorklogs(taskCtx core.SubTaskContext) errors.Error

func ExtractAccounts added in v0.12.0

func ExtractAccounts(taskCtx core.SubTaskContext) errors.Error

func ExtractBoard

func ExtractBoard(taskCtx core.SubTaskContext) errors.Error

func ExtractEpics added in v0.13.0

func ExtractEpics(taskCtx core.SubTaskContext) errors.Error

func ExtractIssueChangelogs added in v0.12.0

func ExtractIssueChangelogs(taskCtx core.SubTaskContext) errors.Error

func ExtractIssueType added in v0.12.0

func ExtractIssueType(taskCtx core.SubTaskContext) errors.Error

func ExtractIssues

func ExtractIssues(taskCtx core.SubTaskContext) errors.Error

func ExtractProjects

func ExtractProjects(taskCtx core.SubTaskContext) errors.Error
func ExtractRemotelinks(taskCtx core.SubTaskContext) errors.Error

func ExtractSprints

func ExtractSprints(taskCtx core.SubTaskContext) errors.Error

func ExtractStatus

func ExtractStatus(taskCtx core.SubTaskContext) errors.Error

func ExtractWorklogs

func ExtractWorklogs(taskCtx core.SubTaskContext) errors.Error

func GetEpicKeysIterator added in v0.13.0

func GetEpicKeysIterator(db dal.Dal, data *JiraTaskData, batchSize int) (helper.Iterator, errors.Error)

func GetJiraServerInfo

func GetJiraServerInfo(client *helper.ApiAsyncClient) (*models.JiraServerInfo, int, errors.Error)

func GetTotalPagesFromResponse

func GetTotalPagesFromResponse(res *http.Response, args *helper.ApiCollectorArgs) (int, errors.Error)

func NewJiraApiClient

func NewJiraApiClient(taskCtx core.TaskContext, connection *models.JiraConnection) (*helper.ApiAsyncClient, errors.Error)

Types

type IssueChangelogItemResult added in v0.12.0

type IssueChangelogItemResult struct {
	models.JiraIssueChangelogItems
	IssueId           uint64 `gorm:"index"`
	AuthorAccountId   string
	AuthorDisplayName string
	Created           time.Time
}

type JiraApiParams

type JiraApiParams struct {
	ConnectionId uint64
	BoardId      uint64
}

this struct should be moved to `jira_api_common.go`

type JiraOptions

type JiraOptions struct {
	ConnectionId        uint64 `json:"connectionId"`
	BoardId             uint64 `json:"boardId"`
	Since               string
	TransformationRules TransformationRules `json:"transformationRules"`
}

func DecodeAndValidateTaskOptions added in v0.12.0

func DecodeAndValidateTaskOptions(options map[string]interface{}) (*JiraOptions, errors.Error)

type JiraPagination

type JiraPagination struct {
	StartAt    int `json:"startAt"`
	MaxResults int `json:"maxResults"`
	Total      int `json:"total"`
}

type JiraTaskData

type JiraTaskData struct {
	Options        *JiraOptions
	ApiClient      *helper.ApiAsyncClient
	Since          *time.Time
	JiraServerInfo models.JiraServerInfo
}

type StatusMapping added in v0.14.0

type StatusMapping struct {
	StandardStatus string `json:"standardStatus"`
}

type StatusMappings added in v0.14.0

type StatusMappings map[string]StatusMapping

type TransformationRules added in v0.12.0

type TransformationRules struct {
	EpicKeyField               string       `json:"epicKeyField"`
	StoryPointField            string       `json:"storyPointField"`
	RemotelinkCommitShaPattern string       `json:"remotelinkCommitShaPattern"`
	TypeMappings               TypeMappings `json:"typeMappings"`
}

type TypeMapping added in v0.14.0

type TypeMapping struct {
	StandardType   string         `json:"standardType"`
	StatusMappings StatusMappings `json:"statusMappings"`
}

type TypeMappings added in v0.14.0

type TypeMappings map[string]TypeMapping

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL