Documentation ¶
Overview ¶
Package issue 封装 事件 相关操作
Index ¶
- type Issue
- func (svc *Issue) AfterIssueChildrenUpdate(id uint64) error
- func (svc *Issue) BatchConvert(models []dao.Issue, issueTypes []apistructs.IssueType, ...) ([]apistructs.Issue, error)
- func (svc *Issue) BatchUpdateIssue(req *apistructs.IssueBatchUpdateRequest) error
- func (svc *Issue) BatchUpdateIssuesSubscriber(req apistructs.IssueSubscriberBatchUpdateRequest) error
- func (svc *Issue) Convert(model dao.Issue, identityInfo apistructs.IdentityInfo) (*apistructs.Issue, error)
- func (svc *Issue) ConvertWithoutButton(model dao.Issue, needQueryLabelRef bool, labelIDs []uint64, ...) *apistructs.Issue
- func (svc *Issue) Create(req *apistructs.IssueCreateRequest) (*dao.Issue, error)
- func (svc *Issue) CreateIssueStage(req *apistructs.IssueStageRequest) error
- func (svc *Issue) CreateStream(updateReq apistructs.IssueUpdateRequest, streamFields map[string][]interface{}) error
- func (svc *Issue) Delete(issueID uint64, identityInfo apistructs.IdentityInfo) error
- func (svc *Issue) ExportExcel(issues []apistructs.Issue, properties []apistructs.IssuePropertyIndex, ...) (io.Reader, string, error)
- func (svc *Issue) ExportExcel2(data [][]string, sheetName string) (string, error)
- func (svc *Issue) ExportFalseExcel(r io.Reader, falseIndex []int, falseReason []string, allNumber int) (*apistructs.IssueImportExcelResponse, error)
- func (svc *Issue) FilterByStateBelong(stateMap map[int64]dao.IssueState, req *apistructs.IssuePagingRequest) error
- func (svc *Issue) FilterByStateBelongForPros(stateMap map[int64]dao.IssueState, projectIDList []uint64, ...) error
- func (svc *Issue) GetAllIssuesByProject(req apistructs.IssueListRequest) ([]dao.IssueItem, error)
- func (svc *Issue) GetIssue(req apistructs.IssueGetRequest) (*apistructs.Issue, error)
- func (svc *Issue) GetIssueBugPercentage(req apistructs.IssuesStageRequest) (*apistructs.IssueBugPercentageResponse, error)
- func (svc *Issue) GetIssueBugSeverityPercentage(req apistructs.IssuesStageRequest) ([]apistructs.IssueBugSeverityPercentageResponse, error)
- func (svc *Issue) GetIssueBugStatusPercentage(req apistructs.IssuesStageRequest) ([]apistructs.IssueBugStatusPercentageResponse, error)
- func (svc *Issue) GetIssueChildren(id uint64, req apistructs.IssuePagingRequest) ([]dao.IssueItem, uint64, error)
- func (svc *Issue) GetIssueItem(id uint64) (*dao.IssueItem, error)
- func (svc *Issue) GetIssueLabelsByProjectID(projectID uint64) ([]dao.IssueLabel, error)
- func (svc *Issue) GetIssueManHourSum(req apistructs.IssuesStageRequest) (*apistructs.IssueManHourSumResponse, error)
- func (svc *Issue) GetIssueNumByPros(projectIDS []uint64, req apistructs.IssuePagingRequest) ([]apistructs.IssueNum, error)
- func (svc *Issue) GetIssueParents(issueID uint64, relationType []string) ([]dao.IssueItem, error)
- func (svc *Issue) GetIssueStage(req *apistructs.IssueStageRequest) ([]apistructs.IssueStage, error)
- func (svc *Issue) GetIssuesByIssueIDs(issueIDs []uint64, identityInfo apistructs.IdentityInfo) ([]apistructs.Issue, error)
- func (svc *Issue) GetIssuesByStates(req apistructs.WorkbenchRequest) (map[uint64]*apistructs.WorkbenchProjectItem, int, error)
- func (svc *Issue) GetIssuesStatesByProjectID(projectID uint64, issueType apistructs.IssueType) ([]dao.IssueState, error)
- func (svc *Issue) ImportExcel(req apistructs.IssueImportExcelRequest, r *http.Request, ...) (*apistructs.IssueImportExcelResponse, error)
- func (svc *Issue) IssueChildrenCount(issue *dao.IssueItem) error
- func (svc *Issue) ListStatesTransByProjectID(projectID uint64) ([]dao.IssueStateTransition, error)
- func (svc *Issue) Paging(req apistructs.IssuePagingRequest) ([]apistructs.Issue, uint64, error)
- func (svc *Issue) PagingForWorkbench(req apistructs.IssuePagingRequest) ([]apistructs.Issue, uint64, error)
- func (svc *Issue) RequirementPool() ([]apistructs.Issue, error)
- func (svc *Issue) SetIssueChildrenCount(issues []dao.IssueItem) error
- func (svc *Issue) StateCheckPermission(req *apistructs.PermissionCheckRequest, st int64, ed int64) (bool, error)
- func (svc *Issue) Subscribe(id int64, identityInfo apistructs.IdentityInfo) error
- func (svc *Issue) Unsubscribe(id int64, identityInfo apistructs.IdentityInfo) error
- func (svc *Issue) UpdateIssue(req apistructs.IssueUpdateRequest) error
- func (svc *Issue) UpdateIssueType(req *apistructs.IssueTypeUpdateRequest) (int64, error)
- type Option
- func WithBundle(bdl *bundle.Bundle) Option
- func WithDBClient(db *dao.DBClient) Option
- func WithIssueRelated(issueRelated *issuerelated.IssueRelated) Option
- func WithIssueStream(stream *issuestream.IssueStream) Option
- func WithTranslator(tran i18n.Translator) Option
- func WithUCClient(uc *ucauth.UCClient) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Issue ¶
type Issue struct {
// contains filtered or unexported fields
}
Issue 事件操作封装
func (*Issue) AfterIssueChildrenUpdate ¶ added in v1.5.0
func (*Issue) BatchConvert ¶
func (svc *Issue) BatchConvert(models []dao.Issue, issueTypes []apistructs.IssueType, identityInfo apistructs.IdentityInfo) ([]apistructs.Issue, error)
BatchConvert 批量转换
func (*Issue) BatchUpdateIssue ¶
func (svc *Issue) BatchUpdateIssue(req *apistructs.IssueBatchUpdateRequest) error
BatchUpdateIssue 批量更新 issue
func (*Issue) BatchUpdateIssuesSubscriber ¶
func (svc *Issue) BatchUpdateIssuesSubscriber(req apistructs.IssueSubscriberBatchUpdateRequest) error
BatchUpdateIssuesSubscriber batch update issue subscriber
func (*Issue) Convert ¶
func (svc *Issue) Convert(model dao.Issue, identityInfo apistructs.IdentityInfo) (*apistructs.Issue, error)
Convert: dao.Issue -> apistructs.Issue
func (*Issue) ConvertWithoutButton ¶
func (svc *Issue) ConvertWithoutButton(model dao.Issue, needQueryLabelRef bool, labelIDs []uint64, needQueryLabels bool, projectLabels map[uint64]apistructs.ProjectLabel, ) *apistructs.Issue
ConvertWithoutButton 不包括 button
func (*Issue) Create ¶
func (svc *Issue) Create(req *apistructs.IssueCreateRequest) (*dao.Issue, error)
Create 创建事件
func (*Issue) CreateIssueStage ¶
func (svc *Issue) CreateIssueStage(req *apistructs.IssueStageRequest) error
func (*Issue) CreateStream ¶
func (svc *Issue) CreateStream(updateReq apistructs.IssueUpdateRequest, streamFields map[string][]interface{}) error
CreateStream 创建事件流
func (*Issue) Delete ¶
func (svc *Issue) Delete(issueID uint64, identityInfo apistructs.IdentityInfo) error
Delete .
func (*Issue) ExportExcel ¶
func (svc *Issue) ExportExcel(issues []apistructs.Issue, properties []apistructs.IssuePropertyIndex, projectID uint64, isDownload bool, orgID int64, locale string) (io.Reader, string, error)
func (*Issue) ExportExcel2 ¶
func (*Issue) ExportFalseExcel ¶
func (svc *Issue) ExportFalseExcel(r io.Reader, falseIndex []int, falseReason []string, allNumber int) (*apistructs.IssueImportExcelResponse, error)
func (*Issue) FilterByStateBelong ¶
func (svc *Issue) FilterByStateBelong(stateMap map[int64]dao.IssueState, req *apistructs.IssuePagingRequest) error
FilterByStateBelong 根据主状态过滤
func (*Issue) FilterByStateBelongForPros ¶
func (svc *Issue) FilterByStateBelongForPros(stateMap map[int64]dao.IssueState, projectIDList []uint64, req *apistructs.IssuePagingRequest) error
FilterByStateBelong
func (*Issue) GetAllIssuesByProject ¶ added in v1.3.1
func (svc *Issue) GetAllIssuesByProject(req apistructs.IssueListRequest) ([]dao.IssueItem, error)
func (*Issue) GetIssue ¶
func (svc *Issue) GetIssue(req apistructs.IssueGetRequest) (*apistructs.Issue, error)
GetIssue 获取事件
func (*Issue) GetIssueBugPercentage ¶
func (svc *Issue) GetIssueBugPercentage(req apistructs.IssuesStageRequest) (*apistructs.IssueBugPercentageResponse, error)
GetIssueBugPercentage 缺陷率
func (*Issue) GetIssueBugSeverityPercentage ¶
func (svc *Issue) GetIssueBugSeverityPercentage(req apistructs.IssuesStageRequest) ([]apistructs.IssueBugSeverityPercentageResponse, error)
GetIssueBugSeverityPercentage 缺陷等级
func (*Issue) GetIssueBugStatusPercentage ¶
func (svc *Issue) GetIssueBugStatusPercentage(req apistructs.IssuesStageRequest) ([]apistructs.IssueBugStatusPercentageResponse, error)
GetIssueBugStatusPercentage 缺陷状态
func (*Issue) GetIssueChildren ¶ added in v1.5.0
func (svc *Issue) GetIssueChildren(id uint64, req apistructs.IssuePagingRequest) ([]dao.IssueItem, uint64, error)
func (*Issue) GetIssueItem ¶ added in v1.5.0
func (*Issue) GetIssueLabelsByProjectID ¶ added in v1.3.1
func (svc *Issue) GetIssueLabelsByProjectID(projectID uint64) ([]dao.IssueLabel, error)
func (*Issue) GetIssueManHourSum ¶
func (svc *Issue) GetIssueManHourSum(req apistructs.IssuesStageRequest) (*apistructs.IssueManHourSumResponse, error)
GetIssueManHourSum 事件流任务总和查询
func (*Issue) GetIssueNumByPros ¶ added in v1.2.1
func (svc *Issue) GetIssueNumByPros(projectIDS []uint64, req apistructs.IssuePagingRequest) ([]apistructs.IssueNum, error)
GetIssueNumByPros query by issue request and group by project id list, optimization for workbench issue num
func (*Issue) GetIssueParents ¶ added in v1.5.0
func (*Issue) GetIssueStage ¶
func (svc *Issue) GetIssueStage(req *apistructs.IssueStageRequest) ([]apistructs.IssueStage, error)
func (*Issue) GetIssuesByIssueIDs ¶
func (svc *Issue) GetIssuesByIssueIDs(issueIDs []uint64, identityInfo apistructs.IdentityInfo) ([]apistructs.Issue, error)
GetIssuesByIssueIDs 通过issueIDs获取事件列表
func (*Issue) GetIssuesByStates ¶ added in v1.3.0
func (svc *Issue) GetIssuesByStates(req apistructs.WorkbenchRequest) (map[uint64]*apistructs.WorkbenchProjectItem, int, error)
func (*Issue) GetIssuesStatesByProjectID ¶ added in v1.3.1
func (svc *Issue) GetIssuesStatesByProjectID(projectID uint64, issueType apistructs.IssueType) ([]dao.IssueState, error)
func (*Issue) ImportExcel ¶
func (svc *Issue) ImportExcel(req apistructs.IssueImportExcelRequest, r *http.Request, properties []apistructs.IssuePropertyIndex, ip *issueproperty.IssueProperty, member []apistructs.Member) (*apistructs.IssueImportExcelResponse, error)
func (*Issue) IssueChildrenCount ¶ added in v1.5.0
func (*Issue) ListStatesTransByProjectID ¶ added in v1.5.0
func (svc *Issue) ListStatesTransByProjectID(projectID uint64) ([]dao.IssueStateTransition, error)
func (*Issue) Paging ¶
func (svc *Issue) Paging(req apistructs.IssuePagingRequest) ([]apistructs.Issue, uint64, error)
Paging 分页查询事件
func (*Issue) PagingForWorkbench ¶
func (svc *Issue) PagingForWorkbench(req apistructs.IssuePagingRequest) ([]apistructs.Issue, uint64, error)
get all undone issues by orgid
func (*Issue) RequirementPool ¶
func (svc *Issue) RequirementPool() ([]apistructs.Issue, error)
func (*Issue) SetIssueChildrenCount ¶ added in v1.5.0
func (*Issue) StateCheckPermission ¶
func (svc *Issue) StateCheckPermission(req *apistructs.PermissionCheckRequest, st int64, ed int64) (bool, error)
StateCheckPermission 事件状态Button鉴权
func (*Issue) Subscribe ¶
func (svc *Issue) Subscribe(id int64, identityInfo apistructs.IdentityInfo) error
Subscribe subscribe issue
func (*Issue) Unsubscribe ¶
func (svc *Issue) Unsubscribe(id int64, identityInfo apistructs.IdentityInfo) error
Unsubscribe unsubscribe issue
func (*Issue) UpdateIssue ¶
func (svc *Issue) UpdateIssue(req apistructs.IssueUpdateRequest) error
UpdateIssue 更新事件
func (*Issue) UpdateIssueType ¶
func (svc *Issue) UpdateIssueType(req *apistructs.IssueTypeUpdateRequest) (int64, error)
UpdateIssueType 转换issue类型
type Option ¶
type Option func(*Issue)
Option 定义 Issue 配置选项
func WithIssueRelated ¶ added in v1.3.0
func WithIssueRelated(issueRelated *issuerelated.IssueRelated) Option
WithIssueRelated set issue related svc
func WithIssueStream ¶
func WithIssueStream(stream *issuestream.IssueStream) Option
WithIssueStream 配置 事件流 选项
func WithTranslator ¶ added in v1.3.0
func WithTranslator(tran i18n.Translator) Option