issueKanban

package
v1.0.0-RC Latest Latest
Warning

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

Go to latest
Published: May 21, 2021 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MoveOutConfirmMsg           = "Confirm to move out iteration"
	CreateBoardConfirmMsg       = "Confirm to create board"
	DeleteBoardConfirmMsg       = "Confirm to delete board"
	UpdateBoardConfirmMsg       = "Confirm to update board"
	CreateBoardDisabledTip      = "The number of boards cannot exceed 5"
	GuestCreateBoardDisabledTip = "No permission to operate"
)
View Source
const MaxBoardNum = 15

Variables

Functions

func RenderCreator

func RenderCreator() protocol.CompRender

Types

type BoardType

type BoardType string
const (
	BoardTypeStatus   BoardType = "status"
	BoardTypeTime     BoardType = "deadline"
	BoardTypeAssignee BoardType = "assignee" // 已经移除处理人看板
	BoardTypeCustom   BoardType = "custom"
	BoardTypePriority BoardType = "priority"
)

func (BoardType) String

func (b BoardType) String() string

type CartList

type CartList struct {

	// 分类类型: 状态,处理人,时间,自定义,优先级
	Label      interface{}            `json:"label"`
	LabelKey   interface{}            `json:"labelKey"`
	Total      uint64                 `json:"total"`
	List       []IssueCart            `json:"list"`
	Operations map[string]interface{} `json:"operations"`
	// contains filtered or unexported fields
}

func (*CartList) Add

func (cl *CartList) Add(c IssueCart)

func (*CartList) Delete

func (cl *CartList) Delete(issueID int64)

func (*CartList) GenCartList

func (c *CartList) GenCartList(p *message.Printer)

func (*CartList) RenderCartListOperations

func (cl *CartList) RenderCartListOperations()

func (*CartList) SetI18nPrinter

func (c *CartList) SetI18nPrinter(ip *message.Printer)

type ChartOperationSwitch

type ChartOperationSwitch struct {
	// contains filtered or unexported fields
}

func (*ChartOperationSwitch) ClearAble

func (c *ChartOperationSwitch) ClearAble()

type ComponentIssueBoard

type ComponentIssueBoard struct {
	CompName   string                 `json:"name"`
	Data       IssueBoard             `json:"data"`
	Operations map[string]interface{} `json:"operations"`
	State      IssueBoardState        `json:"state"`
	// contains filtered or unexported fields
}

func (*ComponentIssueBoard) CheckUserPermission

func (i *ComponentIssueBoard) CheckUserPermission(projectID uint64) error

GetUserPermission check Guest permission

func (*ComponentIssueBoard) Filter

func (i *ComponentIssueBoard) Filter(req IssueFilterRequest) (ib *IssueBoard, err error)

func (ComponentIssueBoard) FilterByCustom

func (i ComponentIssueBoard) FilterByCustom(req apistructs.IssuePagingRequest) (cls []CartList, uids []string, err error)

按自定义看板 过滤

func (ComponentIssueBoard) FilterByPriority

func (i ComponentIssueBoard) FilterByPriority(req apistructs.IssuePagingRequest) (cls []CartList, uids []string, err error)

按优先级过滤 去掉终态状态 [CLOSED, DONE]

func (ComponentIssueBoard) FilterByStatusConcurrent

func (i ComponentIssueBoard) FilterByStatusConcurrent(req apistructs.IssuePagingRequest) (cls []CartList, uids []string, err error)

按状态过滤 并发

func (ComponentIssueBoard) FilterByTime

func (i ComponentIssueBoard) FilterByTime(req apistructs.IssuePagingRequest) (cls []CartList, uids []string, err error)

根据完成时间(planFinishedAt)分为:未分类,已过期,1天内过期,2天内,7天内,30天,未来

func (*ComponentIssueBoard) GenComponentState

func (i *ComponentIssueBoard) GenComponentState(c *apistructs.Component) error

func (ComponentIssueBoard) GetByStatus

func (i ComponentIssueBoard) GetByStatus(req apistructs.IssuePagingRequest, ignoreDone bool) (rsp *apistructs.IssuePagingResponse, err error)

func (ComponentIssueBoard) GetDefaultFilterReq

func (i ComponentIssueBoard) GetDefaultFilterReq(req *IssueFilterRequest) error

func (ComponentIssueBoard) GetFilterReq

func (i ComponentIssueBoard) GetFilterReq() (*IssueFilterRequest, error)

func (ComponentIssueBoard) GetIssues

func (i ComponentIssueBoard) GetIssues(req apistructs.IssuePagingRequest, ignoreDone bool) (result []apistructs.Issue, uids []string, err error)

func (*ComponentIssueBoard) RefreshOnMoveOut

func (i *ComponentIssueBoard) RefreshOnMoveOut(issueID int64) error

func (*ComponentIssueBoard) RefreshOnMoveTo

func (i *ComponentIssueBoard) RefreshOnMoveTo(issueID, from, to int64) error

全量更新时间长,在改变状态时,可以直接move到另一个状态list,同时删掉当前list中的item

func (*ComponentIssueBoard) RenderDefault

func (*ComponentIssueBoard) RenderOnAddCustom

func (i *ComponentIssueBoard) RenderOnAddCustom() error

TODO 增加自定义看板

func (*ComponentIssueBoard) RenderOnDeleteCustom

func (i *ComponentIssueBoard) RenderOnDeleteCustom() error

RenderOnDeleteCustom 删除自定义看板

func (*ComponentIssueBoard) RenderOnDrag

func (i *ComponentIssueBoard) RenderOnDrag(opsData interface{}) error

func (*ComponentIssueBoard) RenderOnFilter

func (i *ComponentIssueBoard) RenderOnFilter(req IssueFilterRequest) error

Issue过滤,分类

func (*ComponentIssueBoard) RenderOnMoveOut

func (i *ComponentIssueBoard) RenderOnMoveOut(opsData interface{}) error

func (*ComponentIssueBoard) RenderOnMoveTo

func (i *ComponentIssueBoard) RenderOnMoveTo(opsData interface{}) error

func (*ComponentIssueBoard) RenderOnMoveToAssignee

func (i *ComponentIssueBoard) RenderOnMoveToAssignee(opsData interface{}) error

func (*ComponentIssueBoard) RenderOnMoveToCustom

func (i *ComponentIssueBoard) RenderOnMoveToCustom(opsData interface{}) error

func (*ComponentIssueBoard) RenderOnMoveToPriority

func (i *ComponentIssueBoard) RenderOnMoveToPriority(opsData interface{}) error

func (*ComponentIssueBoard) RenderOnUpdateCustom

func (i *ComponentIssueBoard) RenderOnUpdateCustom() error

RenderOnUpdateCustom 更新自定义看板

func (*ComponentIssueBoard) RenderProtocol

func (*ComponentIssueBoard) SetBoardDate

func (i *ComponentIssueBoard) SetBoardDate(c apistructs.Component) error

func (*ComponentIssueBoard) SetBoardType

func (i *ComponentIssueBoard) SetBoardType(bt BoardType)

func (*ComponentIssueBoard) SetCtxBundle

func (i *ComponentIssueBoard) SetCtxBundle(b protocol.ContextBundle) error

func (*ComponentIssueBoard) SetOperationSwitch

func (i *ComponentIssueBoard) SetOperationSwitch(req *IssueFilterRequest) error

type CreateBoardOperation

type CreateBoardOperation OperationInfo

自定义看板

type DeleteBoardOperation

type DeleteBoardOperation OperationInfo

type DragOperation

type DragOperation DragOperationInfo

状态

type DragOperationInfo

type DragOperationInfo struct {
	Meta OpMetaInfo `json:"meta"`
	// 前端操作是否需要触发后端
	Reload bool `json:"reload"`
	// 可拖拽的范围
	TargetKeys interface{} `json:"targetKeys"`
	Disabled   bool        `json:"disabled"`
}

type ExpireType

type ExpireType string

根据完成时间(planFinishedAt)分为:未分类,已过期,1天内过期,2天内,3天内,30天,未来

const (
	ExpireTypeUndefined      ExpireType = "Undefined"
	ExpireTypeExpired        ExpireType = "Expired"
	ExpireTypeExpireIn1Day   ExpireType = "ExpireIn1Day"
	ExpireTypeExpireIn2Days  ExpireType = "ExpireIn2Days"
	ExpireTypeExpireIn7Days  ExpireType = "ExpireIn7Days"
	ExpireTypeExpireIn30Days ExpireType = "ExpireIn30Days"
	ExpireTypeExpireInFuture ExpireType = "ExpireInFuture"
)

func (ExpireType) String

func (e ExpireType) String() string

type IssueBoard

type IssueBoard struct {
	Board   []CartList `json:"board"`
	UserIDs []string   `json:"userIDs"`
}

type IssueBoardState

type IssueBoardState struct {
	DropTarget interface{} `json:"dropTarget"`
	apistructs.IssuePanel
	Priority                    apistructs.IssuePriority      `json:"priority"`
	FilterConditions            apistructs.IssuePagingRequest `json:"filterConditions"`
	IssueViewGroupChildrenValue map[string]string             `json:"issueViewGroupChildrenValue"`
	IssueViewGroupValue         string                        `json:"issueViewGroupValue"`
}

type IssueCart

type IssueCart struct {
	Assignee       string                        `json:"assignee"`
	Priority       apistructs.IssuePriority      `json:"priority"`
	ID             int64                         `json:"id"`
	Title          string                        `json:"title"`
	Type           apistructs.IssueType          `json:"type"`
	State          int64                         `json:"state"`
	IssueButton    []apistructs.IssueStateButton `json:"issueButton"`
	IterationID    int64                         `json:"iterationID"`
	PlanFinishedAt *time.Time                    `json:"planFinishedAt"`
	Operations     map[string]interface{}        `json:"operations"`
	// contains filtered or unexported fields
}

func (IssueCart) GetExpireType

func (c IssueCart) GetExpireType(now time.Time) ExpireType

FinishTime和now都是date;hour, min, sec 都为0

func (*IssueCart) RenderCartOperations

func (c *IssueCart) RenderCartOperations(s ChartOperationSwitch, i apistructs.Issue, mp map[apistructs.OperationKey]interface{})

func (*IssueCart) RenderDragOperation

func (c *IssueCart) RenderDragOperation()

拖拽操作渲染生成

func (*IssueCart) RenderDragToAssigneeOperation

func (c *IssueCart) RenderDragToAssigneeOperation(mp map[apistructs.OperationKey]interface{})

func (*IssueCart) RenderDragToCustomOperation

func (c *IssueCart) RenderDragToCustomOperation(mp map[apistructs.OperationKey]interface{})

func (*IssueCart) RenderDragToPriorityOperation

func (c *IssueCart) RenderDragToPriorityOperation(i apistructs.Issue, mp map[apistructs.OperationKey]interface{})

func (*IssueCart) RenderMoveOutOperation

func (c *IssueCart) RenderMoveOutOperation()

移除操作渲染生成

func (*IssueCart) RenderMoveToAssigneeOperation

func (c *IssueCart) RenderMoveToAssigneeOperation(mp map[apistructs.OperationKey]interface{})

func (*IssueCart) RenderMoveToCustomOperation

func (c *IssueCart) RenderMoveToCustomOperation(mp map[apistructs.OperationKey]interface{})

func (*IssueCart) RenderMoveToOperation

func (c *IssueCart) RenderMoveToOperation()

func (*IssueCart) RenderMoveToPriorityOperation

func (c *IssueCart) RenderMoveToPriorityOperation(i apistructs.Issue, mp map[apistructs.OperationKey]interface{})

func (*IssueCart) SetI18nPrinter

func (c *IssueCart) SetI18nPrinter(ip *message.Printer)

type IssueFilterRequest

type IssueFilterRequest struct {
	apistructs.IssuePagingRequest
	BoardType BoardType `json:"boardType"`
}

type MoveOutOperation

type MoveOutOperation OperationInfo

type MoveToAssigneeOperation

type MoveToAssigneeOperation OperationInfo

处理人 type DragToAssigneeOperation DragOperationInfo

type MoveToCustomOperation

type MoveToCustomOperation OperationInfo

type MoveToOperation

type MoveToOperation OperationInfo

type MoveToPriorityOperation

type MoveToPriorityOperation OperationInfo

优先级

type OpMetaInfo

type OpMetaInfo struct {
	IssueID       int64                    `json:"ID"`
	IssueAssignee string                   `json:"issueAssignee"`
	IssuePriority apistructs.IssuePriority `json:"issuePriority"`
	StateID       int64                    `json:"stateID"`
	apistructs.IssuePanel
}

func GetCartOpsInfo

func GetCartOpsInfo(opsData interface{}, isDrag bool) (*OpMetaInfo, error)

type OperationBaseInfo

type OperationBaseInfo struct {
	// 操作展示名称
	Text string `json:"text"`
	// 是否有权限操作
	Disabled bool `json:"disabled"`
	// 确认提示
	Confirm string `json:"confirm,omitempty"`
	// 前端操作是否需要触发后端
	Reload      bool   `json:"reload"`
	DisabledTip string `json:"disabledTip"`
}

type OperationInfo

type OperationInfo struct {
	OperationBaseInfo
	Meta OpMetaInfo `json:"meta"`
}

type UpdateBoardOperation

type UpdateBoardOperation OperationInfo

Jump to

Keyboard shortcuts

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