models

package
v0.0.0-...-e75809f Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2020 License: GPL-3.0 Imports: 19 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MemberTaskRoleValues = [...]string{
	"Developer",
	"Reviewer",
}

MemberTaskRoleValues ...

View Source
var ResolutionValues = [...]string{
	"-",
	"Done",
	"Won't Do",
	"Duplicate",
	"Can't Reproduce",
}

ResolutionValues ...

View Source
var RetrospectiveFeedbackScopeValues = [...]string{
	"Team",
	"Individual",
}

RetrospectiveFeedbackScopeValues ...

View Source
var RetrospectiveFeedbackTypeValues = [...]string{
	"Note",
	"Highlight",
	"Goal",
}

RetrospectiveFeedbackTypeValues ...

View Source
var SprintStatusValues = [...]string{
	"Draft",
	"Active",
	"Completed",
	"Deleted",
}

SprintStatusValues ...

View Source
var SyncStatusValues = [...]string{
	"Not Synced",
	"Syncing",
	"Synced",
	"Sync Failed",
	"Queued",
}

SyncStatusValues ...

Functions

func GetTaskTrackerConnectionFromRetro

func GetTaskTrackerConnectionFromRetro(db *gorm.DB, retroID string) (tasktracker.Connection, error)

GetTaskTrackerConnectionFromRetro ...

func NotDeletedSprint

func NotDeletedSprint(db *gorm.DB) *gorm.DB

NotDeletedSprint is a gorm scope used to exclude the deleted/discard sprints

func RegisterRetrospectiveFeedbackToAdmin

func RegisterRetrospectiveFeedbackToAdmin(Admin *admin.Admin, config admin.Config)

RegisterRetrospectiveFeedbackToAdmin ...

func RegisterRetrospectiveToAdmin

func RegisterRetrospectiveToAdmin(Admin *admin.Admin, config admin.Config)

RegisterRetrospectiveToAdmin ...

func RegisterSprintMemberTaskToAdmin

func RegisterSprintMemberTaskToAdmin(Admin *admin.Admin, config admin.Config)

RegisterSprintMemberTaskToAdmin ...

func RegisterSprintMemberToAdmin

func RegisterSprintMemberToAdmin(Admin *admin.Admin, config admin.Config)

RegisterSprintMemberToAdmin ...

func RegisterSprintSyncStatusToAdmin

func RegisterSprintSyncStatusToAdmin(Admin *admin.Admin, config admin.Config)

RegisterSprintSyncStatusToAdmin ...

func RegisterSprintTaskToAdmin

func RegisterSprintTaskToAdmin(Admin *admin.Admin, config admin.Config)

RegisterSprintTaskToAdmin ...

func RegisterSprintToAdmin

func RegisterSprintToAdmin(Admin *admin.Admin, config admin.Config)

RegisterSprintToAdmin ...

func RegisterTaskToAdmin

func RegisterTaskToAdmin(Admin *admin.Admin, config admin.Config)

RegisterTaskToAdmin ...

func RetroJoinSprints

func RetroJoinSprints(db *gorm.DB) *gorm.DB

RetroJoinSprints ...

func RetroJoinTasks

func RetroJoinTasks(db *gorm.DB) *gorm.DB

RetroJoinTasks ...

func RetroJoinUserTeams

func RetroJoinUserTeams(db *gorm.DB) *gorm.DB

RetroJoinUserTeams ...

func SMJoinMember

func SMJoinMember(db *gorm.DB) *gorm.DB

SMJoinMember ...

func SMJoinSMT

func SMJoinSMT(db *gorm.DB) *gorm.DB

SMJoinSMT ...

func SMJoinSprint

func SMJoinSprint(db *gorm.DB) *gorm.DB

SMJoinSprint ...

func SMJoinUT

func SMJoinUT(db *gorm.DB) *gorm.DB

SMJoinUT ...

func SMLeftJoinMember

func SMLeftJoinMember(db *gorm.DB) *gorm.DB

SMLeftJoinMember ...

func SMLeftJoinSMT

func SMLeftJoinSMT(db *gorm.DB) *gorm.DB

SMLeftJoinSMT ...

func SMLeftJoinSprint

func SMLeftJoinSprint(db *gorm.DB) *gorm.DB

SMLeftJoinSprint ...

func SMTJoinSM

func SMTJoinSM(db *gorm.DB) *gorm.DB

SMTJoinSM ...

func SMTJoinST

func SMTJoinST(db *gorm.DB) *gorm.DB

SMTJoinST ...

func SMTLeftJoinSM

func SMTLeftJoinSM(db *gorm.DB) *gorm.DB

SMTLeftJoinSM ...

func STJoinSMT

func STJoinSMT(db *gorm.DB) *gorm.DB

STJoinSMT ...

func STJoinSprint

func STJoinSprint(db *gorm.DB) *gorm.DB

STJoinSprint ...

func STJoinTask

func STJoinTask(db *gorm.DB) *gorm.DB

STJoinTask ...

func STLeftJoinSMT

func STLeftJoinSMT(db *gorm.DB) *gorm.DB

STLeftJoinSMT ...

func SprintJoinRetro

func SprintJoinRetro(db *gorm.DB) *gorm.DB

SprintJoinRetro ...

func SprintJoinSM

func SprintJoinSM(db *gorm.DB) *gorm.DB

SprintJoinSM ...

func SprintJoinST

func SprintJoinST(db *gorm.DB) *gorm.DB

SprintJoinST ...

func TaskJoinST

func TaskJoinST(db *gorm.DB) *gorm.DB

TaskJoinST ...

func TaskJoinTaskKeyMaps

func TaskJoinTaskKeyMaps(db *gorm.DB) *gorm.DB

TaskJoinTaskKeyMaps ...

func TrailJoinFeedback

func TrailJoinFeedback(db *gorm.DB) *gorm.DB

TrailJoinFeedback ...

func TrailJoinSM

func TrailJoinSM(db *gorm.DB) *gorm.DB

TrailJoinSM ...

func TrailJoinSMT

func TrailJoinSMT(db *gorm.DB) *gorm.DB

TrailJoinSMT ...

func TrailJoinST

func TrailJoinST(db *gorm.DB) *gorm.DB

TrailJoinST ...

Types

type MemberTaskRole

type MemberTaskRole int8

MemberTaskRole ...

const (
	Developer MemberTaskRole = iota
	Reviewer
)

MemberTaskRole

func (MemberTaskRole) GetStringValue

func (role MemberTaskRole) GetStringValue() string

GetStringValue ...

type Resolution

type Resolution int8

Resolution ...

const (
	TaskNotDoneResolution Resolution = iota
	DoneResolution
	WontDoResolution
	DuplicateResolution
	CantReproduceResolution
)

Resolution

func (Resolution) GetStringValue

func (resolution Resolution) GetStringValue() string

GetStringValue ...

type Retrospective

type Retrospective struct {
	gorm.Model
	Title              string       `gorm:"type:varchar(255); not null"`
	ProjectName        string       `gorm:"type:varchar(255); not null"`
	TaskProviderConfig fields.JSONB `gorm:"type:jsonb; not null; default:'[]'::jsonb"`
	TimeProviderName   string       `gorm:"not null"`
	Team               userModels.Team
	TeamID             uint `gorm:"not null"`
	Sprints            []Sprint
	StoryPointPerWeek  float64 `gorm:"not null"`
	CreatedBy          userModels.User
	CreatedByID        uint `gorm:"not null"`
}

Retrospective represents a retrospective of a team

func (*Retrospective) BeforeSave

func (retrospective *Retrospective) BeforeSave(db *gorm.DB) (err error)

BeforeSave ...

func (*Retrospective) BeforeUpdate

func (retrospective *Retrospective) BeforeUpdate(db *gorm.DB) (err error)

BeforeUpdate ...

func (*Retrospective) Validate

func (retrospective *Retrospective) Validate(db *gorm.DB) (err error)

Validate ...

type RetrospectiveFeedback

type RetrospectiveFeedback struct {
	gorm.Model
	SubType         string                    `gorm:"type:varchar(30); not null"`
	Type            RetrospectiveFeedbackType `gorm:"default:0; not null"`
	Retrospective   Retrospective
	RetrospectiveID uint                       `gorm:"not null"`
	Text            string                     `gorm:"type:text; not null"`
	Scope           RetrospectiveFeedbackScope `gorm:"default:0; not null"`
	AssigneeID      *uint
	Assignee        userModels.User
	AddedAt         *time.Time
	ResolvedAt      *time.Time
	ExpectedAt      *time.Time
	CreatedByID     uint `gorm:"not null"`
	CreatedBy       userModels.User
}

RetrospectiveFeedback represent Goals, Highlights and Notes of a sprint

func (*RetrospectiveFeedback) BeforeSave

func (feedback *RetrospectiveFeedback) BeforeSave(db *gorm.DB) (err error)

BeforeSave ...

func (*RetrospectiveFeedback) BeforeUpdate

func (feedback *RetrospectiveFeedback) BeforeUpdate(db *gorm.DB) (err error)

BeforeUpdate ...

func (*RetrospectiveFeedback) Validate

func (feedback *RetrospectiveFeedback) Validate(db *gorm.DB) (err error)

Validate ...

type RetrospectiveFeedbackScope

type RetrospectiveFeedbackScope int8

RetrospectiveFeedbackScope ...

const (
	TeamScope RetrospectiveFeedbackScope = iota
	IndividualScope
)

RetrospectiveFeedbackScope

func (RetrospectiveFeedbackScope) GetStringValue

func (status RetrospectiveFeedbackScope) GetStringValue() string

GetStringValue ...

type RetrospectiveFeedbackType

type RetrospectiveFeedbackType int8

RetrospectiveFeedbackType ...

const (
	NoteType RetrospectiveFeedbackType = iota
	HighlightType
	GoalType
)

RetrospectiveFeedbackType

func (RetrospectiveFeedbackType) GetStringValue

func (status RetrospectiveFeedbackType) GetStringValue() string

GetStringValue ...

type Sprint

type Sprint struct {
	gorm.Model
	Title           string `gorm:"type:varchar(255); not null"`
	SprintID        string `gorm:"type:varchar(30); not null"`
	Retrospective   Retrospective
	RetrospectiveID uint         `gorm:"not null"`
	Status          SprintStatus `gorm:"default:0; not null"`
	StartDate       *time.Time
	EndDate         *time.Time
	SprintMembers   []SprintMember
	SprintTasks     []SprintTask
	LastSyncedAt    *time.Time
	SyncStatus      []SprintSyncStatus
	CreatedBy       userModels.User
	CreatedByID     uint `gorm:"not null"`
}

Sprint represents a sprint of a retrospective

func (*Sprint) BeforeSave

func (sprint *Sprint) BeforeSave(db *gorm.DB) (err error)

BeforeSave ...

func (*Sprint) BeforeUpdate

func (sprint *Sprint) BeforeUpdate(db *gorm.DB) (err error)

BeforeUpdate ...

func (*Sprint) Validate

func (sprint *Sprint) Validate(db *gorm.DB) (err error)

Validate ...

type SprintMember

type SprintMember struct {
	gorm.Model
	Sprint             Sprint
	SprintID           uint `gorm:"not null"`
	Member             userModels.User
	MemberID           uint    `gorm:"not null"`
	AllocationPercent  float64 `gorm:"not null;default:100"`
	ExpectationPercent float64 `gorm:"not null;default:100"`
	Tasks              []SprintMemberTask
	Vacations          float64              `gorm:"not null;default:0"`
	Rating             retrospective.Rating `gorm:"default:2; not null"`
	Comment            string               `gorm:"type:text"`
}

SprintMember represents a member of a particular sprint

func (*SprintMember) BeforeSave

func (sprintMember *SprintMember) BeforeSave(db *gorm.DB) (err error)

BeforeSave ...

func (*SprintMember) BeforeUpdate

func (sprintMember *SprintMember) BeforeUpdate(db *gorm.DB) (err error)

BeforeUpdate ...

func (*SprintMember) Validate

func (sprintMember *SprintMember) Validate(db *gorm.DB) (err error)

Validate ...

type SprintMemberTask

type SprintMemberTask struct {
	gorm.Model
	SprintMember     SprintMember
	SprintMemberID   uint `gorm:"not null"`
	SprintTask       SprintTask
	SprintTaskID     uint                 `gorm:"not null"`
	TimeSpentMinutes uint                 `gorm:"not null"`
	PointsEarned     float64              `gorm:"default:0; not null"`
	PointsAssigned   float64              `gorm:"default:0; not null"`
	Rating           retrospective.Rating `gorm:"default:2; not null"`
	Comment          string               `gorm:"type:text"`
	Role             MemberTaskRole       `gorm:"default:0; not null"`
}

SprintMemberTask represents a task for a member for a particular sprint

func (*SprintMemberTask) BeforeSave

func (sprintMemberTask *SprintMemberTask) BeforeSave(db *gorm.DB) (err error)

BeforeSave ...

func (*SprintMemberTask) BeforeUpdate

func (sprintMemberTask *SprintMemberTask) BeforeUpdate(db *gorm.DB) (err error)

BeforeUpdate ...

func (*SprintMemberTask) Validate

func (sprintMemberTask *SprintMemberTask) Validate(db *gorm.DB) (err error)

Validate ...

type SprintStatus

type SprintStatus int8

SprintStatus ...

const (
	DraftSprint SprintStatus = iota
	ActiveSprint
	CompletedSprint
	DeletedSprint
)

SprintStatus

func (SprintStatus) GetStringValue

func (status SprintStatus) GetStringValue() string

GetStringValue ...

type SprintSyncStatus

type SprintSyncStatus struct {
	gorm.Model
	SprintID uint `gorm:"not null"`
	Sprint   Sprint
	Status   SyncStatus `gorm:"default:0; not null"`
}

SprintSyncStatus stores the sync history of a sprint

func (*SprintSyncStatus) BeforeSave

func (syncStatus *SprintSyncStatus) BeforeSave(db *gorm.DB) (err error)

BeforeSave ...

func (*SprintSyncStatus) BeforeUpdate

func (syncStatus *SprintSyncStatus) BeforeUpdate(db *gorm.DB) (err error)

BeforeUpdate ...

func (*SprintSyncStatus) Validate

func (syncStatus *SprintSyncStatus) Validate(db *gorm.DB) (err error)

Validate ...

type SprintTask

type SprintTask struct {
	gorm.Model
	Sprint   Sprint
	SprintID uint `gorm:"not null"`
	Task     Task
	TaskID   uint `gorm:"not null"`
}

SprintTask ...

type SyncStatus

type SyncStatus int8

SyncStatus ...

const (
	NotSynced SyncStatus = iota
	Syncing
	Synced
	SyncFailed
	Queued
)

SyncStatus

func (SyncStatus) GetStringValue

func (status SyncStatus) GetStringValue() string

GetStringValue ...

type Task

type Task struct {
	gorm.Model
	Key               string `gorm:"type:varchar(30); not null"`
	TrackerUniqueID   string `gorm:"type:varchar(255); not null"`
	Retrospective     Retrospective
	RetrospectiveID   uint                 `gorm:"not null"`
	Summary           string               `gorm:"type:text; not null"`
	Description       string               `gorm:"type:text; not null"`
	Type              string               `gorm:"type:varchar(30); not null"`
	Status            string               `gorm:"type:varchar(50); not null"`
	Priority          string               `gorm:"type:varchar(50); not null"`
	Assignee          string               `gorm:"type:varchar(100); not null"`
	Estimate          float64              `gorm:"not null; default: 0"`
	Fields            fields.JSONB         `gorm:"type:jsonb; not null; default:'{}'::jsonb"`
	Rating            retrospective.Rating `gorm:"default:2; not null"`
	DoneAt            *time.Time
	IsTrackerTask     bool `gorm:"not null;default: false"`
	SprintMemberTasks []SprintMemberTask
	Resolution        Resolution `gorm:"default:0"`
}

Task represents the tasks for retrospectives

func (*Task) BeforeSave

func (task *Task) BeforeSave(db *gorm.DB) (err error)

BeforeSave ...

func (*Task) BeforeUpdate

func (task *Task) BeforeUpdate(db *gorm.DB) (err error)

BeforeUpdate ...

func (Task) Stringify

func (task Task) Stringify() string

Stringify ...

func (Task) Validate

func (task Task) Validate(db *gorm.DB) (err error)

Validate ...

type TaskKeyMap

type TaskKeyMap struct {
	gorm.Model
	TaskID uint `gorm:"not null"`
	Task   Task
	Key    string `gorm:"type:varchar(30); not null"`
}

TaskKeyMap ...

type Trail

type Trail struct {
	gorm.Model
	Action       string `gorm:"type:varchar(255); not null"`
	ActionItem   string `gorm:"type:varchar(255); not null"`
	ActionItemID uint   `gorm:"not null"`
	ActionBy     userModels.User
	ActionByID   uint `gorm:"not null"`
}

Trail represents an action on a retrospective item

Jump to

Keyboard shortcuts

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