mirror of
https://shylinux.com/x/operation
synced 2025-07-01 21:21:19 +08:00
add some
This commit is contained in:
parent
a3cf46f398
commit
3a93591f39
@ -20,8 +20,8 @@ type Case struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s Case) Create(m *ice.Message, arg ...string) {
|
func (s Case) Create(m *ice.Message, arg ...string) {
|
||||||
s.GetCommandUID(m)
|
|
||||||
s.ValueCreate(m, arg...)
|
s.ValueCreate(m, arg...)
|
||||||
|
s.GetCommandUID(m)
|
||||||
s.SendMessage(m, "", "")
|
s.SendMessage(m, "", "")
|
||||||
s.taskCount(m, "1")
|
s.taskCount(m, "1")
|
||||||
s.planCount(m, "1")
|
s.planCount(m, "1")
|
||||||
@ -53,12 +53,9 @@ func (s Case) List(m *ice.Message, arg ...string) {
|
|||||||
s.SelectJoinPlan(m)
|
s.SelectJoinPlan(m)
|
||||||
s.SelectJoinUser(m)
|
s.SelectJoinUser(m)
|
||||||
}
|
}
|
||||||
func (s Case) Process(m *ice.Message, arg ...string) { s.changeStatus(m, CaseCreate, CaseProcess) }
|
func (s Case) Process(m *ice.Message, arg ...string) { s.changeStatus(m, CaseCreate, CaseProcess) }
|
||||||
func (s Case) Finish(m *ice.Message, arg ...string) { s.changeStatus(m, CaseProcess, CaseFinish) }
|
func (s Case) Finish(m *ice.Message, arg ...string) { s.changeStatus(m, CaseProcess, CaseFinish) }
|
||||||
func (s Case) PlanBind(m *ice.Message, arg ...string) {
|
func (s Case) PlanBind(m *ice.Message, arg ...string) { s.ValueModify(m, arg...); s.planCount(m, "1") }
|
||||||
s.ValueModify(m, arg...)
|
|
||||||
s.planCount(m, "1")
|
|
||||||
}
|
|
||||||
|
|
||||||
func init() { ice.TeamCtxCmd(Case{}) }
|
func init() { ice.TeamCtxCmd(Case{}) }
|
||||||
|
|
||||||
@ -72,9 +69,10 @@ func (s Case) taskCount(m *ice.Message, value string) {
|
|||||||
if m.IsErr() {
|
if m.IsErr() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if m.Option(model.TASK_UID) != "" {
|
if m.Option(model.TASK_UID) == "" {
|
||||||
m.Cmd(task{}, s.AddCount, model.CASE_COUNT, value, m.Option(model.TASK_UID))
|
return
|
||||||
}
|
}
|
||||||
|
m.Cmd(task{}, s.AddCount, model.CASE_COUNT, value, m.Option(model.TASK_UID))
|
||||||
}
|
}
|
||||||
|
|
||||||
type CaseStatus int
|
type CaseStatus int
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
Volcanos(chat.ONIMPORT, {
|
Volcanos(chat.ONIMPORT, {
|
||||||
_init: function(can, msg) {
|
_init: function(can, msg) {
|
||||||
can.onimport.myView(can, msg, function(value) { return [
|
can.onimport.myView(can, msg, function(value) { return [
|
||||||
{view: html.TITLE, list: [value.title,
|
{view: html.TITLE, list: [value.title, value.case_status != "finish" && can.onimport.textView(can, value, "case_status"), can.onimport.titleAction(can, value)]},
|
||||||
value.case_status != "finish" && can.onimport.textView(can, value, "case_status"),
|
|
||||||
can.onimport.titleAction(can, value),
|
|
||||||
]},
|
|
||||||
{view: html.STATUS, list: [value.uid.slice(0, 6), can.base.TimeTrim(value.created_at), value.user_name]},
|
{view: html.STATUS, list: [value.uid.slice(0, 6), can.base.TimeTrim(value.created_at), value.user_name]},
|
||||||
value.process_time && {view: html.STATUS, list: [can.base.TimeTrim(value.process_time), "~", can.base.TimeTrim(value.finish_time)]},
|
value.process_time && {view: html.STATUS, list: [can.base.TimeTrim(value.process_time), "~", can.base.TimeTrim(value.finish_time)]},
|
||||||
value.plan_title && {view: html.STATUS, list: ["计划:", value.plan_title]},
|
value.plan_title && {view: html.STATUS, list: ["计划:", value.plan_title]},
|
||||||
|
@ -19,14 +19,14 @@ func (s Table) Inputs(m *ice.Message, arg ...string) {
|
|||||||
s.InputsListRole(m, UserStoryRoleList, arg...)
|
s.InputsListRole(m, UserStoryRoleList, arg...)
|
||||||
case model.STORY_TYPE:
|
case model.STORY_TYPE:
|
||||||
s.InputsList(m, StoryTypeList, arg...)
|
s.InputsList(m, StoryTypeList, arg...)
|
||||||
|
case model.PLAN_UID:
|
||||||
|
s.Fields(m, model.UID, model.TITLE)
|
||||||
|
m.Cmdy(plan{}, s.Select, m.OptionSimple(model.STORY_UID)).RenameAppend(model.UID, arg[0])
|
||||||
|
m.DisplayInputKeyNameIconTitle()
|
||||||
case model.ISSUE_TYPE:
|
case model.ISSUE_TYPE:
|
||||||
s.InputsList(m, IssueTypeList, arg...)
|
s.InputsList(m, IssueTypeList, arg...)
|
||||||
case model.LEVEL:
|
case model.LEVEL:
|
||||||
s.InputsList(m, LevelList, arg...)
|
s.InputsList(m, LevelList, arg...)
|
||||||
case model.PLAN_UID:
|
|
||||||
s.Fields(m, model.UID, model.TITLE)
|
|
||||||
m.Cmdy(plan{}, s.Select, m.OptionSimple(model.STORY_UID)).RenameAppend(model.UID, model.PLAN_UID)
|
|
||||||
m.DisplayInputKeyNameIconTitle()
|
|
||||||
default:
|
default:
|
||||||
s.Table.Inputs(m, arg...)
|
s.Table.Inputs(m, arg...)
|
||||||
}
|
}
|
||||||
@ -66,9 +66,10 @@ func (s Table) planCount(m *ice.Message, key, value string) {
|
|||||||
if m.IsErr() {
|
if m.IsErr() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if m.Option(model.PLAN_UID) != "" {
|
if m.Option(model.PLAN_UID) == "" {
|
||||||
m.Cmd(plan{}, s.AddCount, key, value, m.Option(model.PLAN_UID))
|
return
|
||||||
}
|
}
|
||||||
|
m.Cmd(plan{}, s.AddCount, key, value, m.Option(model.PLAN_UID))
|
||||||
}
|
}
|
||||||
|
|
||||||
type Tables struct{ Table }
|
type Tables struct{ Table }
|
||||||
|
@ -24,8 +24,8 @@ type issue struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s issue) Create(m *ice.Message, arg ...string) {
|
func (s issue) Create(m *ice.Message, arg ...string) {
|
||||||
s.GetCommandUID(m)
|
|
||||||
s.ValueCreate(m, kit.ArgDef(arg, kit.Simple(model.ISSUE_TYPE, IssueFeature, model.LEVEL, Level3)...)...)
|
s.ValueCreate(m, kit.ArgDef(arg, kit.Simple(model.ISSUE_TYPE, IssueFeature, model.LEVEL, Level3)...)...)
|
||||||
|
s.GetCommandUID(m)
|
||||||
s.SendMessage(m, "", "")
|
s.SendMessage(m, "", "")
|
||||||
s.DashboardUpdate(m)
|
s.DashboardUpdate(m)
|
||||||
s.planCount(m, "1")
|
s.planCount(m, "1")
|
||||||
@ -70,7 +70,7 @@ func (s issue) Process(m *ice.Message, arg ...string) {
|
|||||||
}
|
}
|
||||||
func (s issue) Finish(m *ice.Message, arg ...string) {
|
func (s issue) Finish(m *ice.Message, arg ...string) {
|
||||||
count := m.Cmd(s.task, s.Select, "issue_uid = ? AND status != ?", m.Option(model.UID), TaskFinish).Length()
|
count := m.Cmd(s.task, s.Select, "issue_uid = ? AND status != ?", m.Option(model.UID), TaskFinish).Length()
|
||||||
if m.WarnNotValid(count > 0, kit.Format("还有%v个未完成的任务", count)) {
|
if m.WarnNotValid(count > 0, kit.Format("还有 %v 个未完成的任务", count)) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
s.changeStatus(m, IssueProcess, IssueFinish)
|
s.changeStatus(m, IssueProcess, IssueFinish)
|
||||||
|
@ -44,7 +44,7 @@ func (s plan) List(m *ice.Message, arg ...string) {
|
|||||||
func (s plan) Process(m *ice.Message, arg ...string) { s.changeStatus(m, PlanCreate, PlanProcess) }
|
func (s plan) Process(m *ice.Message, arg ...string) { s.changeStatus(m, PlanCreate, PlanProcess) }
|
||||||
func (s plan) Finish(m *ice.Message, arg ...string) {
|
func (s plan) Finish(m *ice.Message, arg ...string) {
|
||||||
count := m.Cmd(s.issue, s.Select, "plan_uid = ? AND status != ?", m.Option(model.UID), IssueFinish).Length()
|
count := m.Cmd(s.issue, s.Select, "plan_uid = ? AND status != ?", m.Option(model.UID), IssueFinish).Length()
|
||||||
if m.WarnNotValid(count > 0, kit.Format("还有%v个未完成的需求", count)) {
|
if m.WarnNotValid(count > 0, kit.Format("还有 %v 个未完成的需求", count)) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
s.changeStatus(m, PlanProcess, PlanFinish)
|
s.changeStatus(m, PlanProcess, PlanFinish)
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
Volcanos(chat.ONIMPORT, {
|
Volcanos(chat.ONIMPORT, {
|
||||||
_init: function(can, msg) {
|
_init: function(can, msg) {
|
||||||
can.onimport.myView(can, msg, function(value) { return [
|
can.onimport.myView(can, msg, function(value) { return [
|
||||||
{view: html.TITLE, list: [value.title,
|
{view: html.TITLE, list: [value.title, value.plan_status != "finish" && can.onimport.textView(can, value, "plan_status"), can.onimport.titleAction(can, value)]},
|
||||||
value.plan_status != "finish" && can.onimport.textView(can, value, "plan_status"),
|
|
||||||
can.onimport.titleAction(can, value)
|
|
||||||
]},
|
|
||||||
{view: html.STATUS, list: [value.begin_time.split(" ")[0], "~", value.end_time.split(" ")[0]]},
|
{view: html.STATUS, list: [value.begin_time.split(" ")[0], "~", value.end_time.split(" ")[0]]},
|
||||||
value.process_time && {view: html.STATUS, list: [can.base.TimeTrim(value.process_time), "~", can.base.TimeTrim(value.finish_time)]},
|
value.process_time && {view: html.STATUS, list: [can.base.TimeTrim(value.process_time), "~", can.base.TimeTrim(value.finish_time)]},
|
||||||
{view: html.STATUS, list: ["需求:", value.issue_count+" 个", "任务:", value.task_count+" 个", "用例:", value.case_count+" 个"]},
|
{view: html.STATUS, list: ["需求:", value.issue_count+" 个", "任务:", value.task_count+" 个", "用例:", value.case_count+" 个"]},
|
||||||
|
@ -53,9 +53,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"story_type": {
|
"story_type": {
|
||||||
"system": "系统开发",
|
"custom": "应用软件",
|
||||||
"enterprise": "企业应用",
|
"enterprise": "企业软件",
|
||||||
"custom": "消费应用"
|
"industry": "工业软件",
|
||||||
|
"military": "军用软件",
|
||||||
|
"system": "系统软件"
|
||||||
},
|
},
|
||||||
"plan_status": {
|
"plan_status": {
|
||||||
"create": "待开始",
|
"create": "待开始",
|
||||||
|
@ -9,15 +9,19 @@ func init() { ice.TeamCtxCmd(story{}) }
|
|||||||
type StoryType int
|
type StoryType int
|
||||||
|
|
||||||
const (
|
const (
|
||||||
StorySystem StoryType = iota
|
StoryCustom StoryType = iota
|
||||||
StoryEnterprise
|
StoryEnterprise
|
||||||
StoryCustom
|
StoryIndustry
|
||||||
|
StoryMilitary
|
||||||
|
StorySystem
|
||||||
)
|
)
|
||||||
|
|
||||||
var StoryTypeList = map[StoryType]string{
|
var StoryTypeList = map[StoryType]string{
|
||||||
StorySystem: "system",
|
|
||||||
StoryEnterprise: "enterprise",
|
|
||||||
StoryCustom: "custom",
|
StoryCustom: "custom",
|
||||||
|
StoryEnterprise: "enterprise",
|
||||||
|
StoryIndustry: "industry",
|
||||||
|
StoryMilitary: "military",
|
||||||
|
StorySystem: "system",
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s StoryType) String() string { return StoryTypeList[s] }
|
func (s StoryType) String() string { return StoryTypeList[s] }
|
||||||
|
@ -22,8 +22,8 @@ type task struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s task) Create(m *ice.Message, arg ...string) {
|
func (s task) Create(m *ice.Message, arg ...string) {
|
||||||
s.GetCommandUID(m)
|
|
||||||
s.ValueCreate(m, kit.ArgDef(arg, kit.Simple(model.BEGIN_TIME, m.Time(), model.END_TIME, m.Time("72h"))...)...)
|
s.ValueCreate(m, kit.ArgDef(arg, kit.Simple(model.BEGIN_TIME, m.Time(), model.END_TIME, m.Time("72h"))...)...)
|
||||||
|
s.GetCommandUID(m)
|
||||||
s.SendMessage(m, "", "")
|
s.SendMessage(m, "", "")
|
||||||
s.DashboardUpdate(m)
|
s.DashboardUpdate(m)
|
||||||
s.issueCount(m, "1")
|
s.issueCount(m, "1")
|
||||||
@ -62,7 +62,7 @@ func (s task) Process(m *ice.Message, arg ...string) {
|
|||||||
}
|
}
|
||||||
func (s task) Finish(m *ice.Message, arg ...string) {
|
func (s task) Finish(m *ice.Message, arg ...string) {
|
||||||
count := m.Cmd(s.Case, s.Select, "task_uid = ? AND status != ?", m.Option(model.UID), CaseFinish).Length()
|
count := m.Cmd(s.Case, s.Select, "task_uid = ? AND status != ?", m.Option(model.UID), CaseFinish).Length()
|
||||||
if m.WarnNotValid(count > 0, kit.Format("还有%v个未完成的用例", count)) {
|
if m.WarnNotValid(count > 0, kit.Format("还有 %v 个未完成的用例", count)) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
s.changeStatus(m, TaskProcess, TaskFinish)
|
s.changeStatus(m, TaskProcess, TaskFinish)
|
||||||
@ -70,7 +70,7 @@ func (s task) Finish(m *ice.Message, arg ...string) {
|
|||||||
}
|
}
|
||||||
func (s task) PlanBind(m *ice.Message, arg ...string) {
|
func (s task) PlanBind(m *ice.Message, arg ...string) {
|
||||||
s.ValueModify(m, arg...)
|
s.ValueModify(m, arg...)
|
||||||
s.DashboardUpdate(m)
|
s.planCount(m, "1")
|
||||||
}
|
}
|
||||||
func (s task) CaseCreate(m *ice.Message, arg ...string) {
|
func (s task) CaseCreate(m *ice.Message, arg ...string) {
|
||||||
m.Cmd(s.Case, s.Create, arg, model.TASK_UID, m.Option(model.UID), m.OptionSimple(model.PLAN_UID))
|
m.Cmd(s.Case, s.Create, arg, model.TASK_UID, m.Option(model.UID), m.OptionSimple(model.PLAN_UID))
|
||||||
@ -88,9 +88,10 @@ func (s task) issueCount(m *ice.Message, value string) {
|
|||||||
if m.IsErr() {
|
if m.IsErr() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if m.Option(model.ISSUE_UID) != "" {
|
if m.Option(model.ISSUE_UID) == "" {
|
||||||
m.Cmd(issue{}, s.AddCount, model.TASK_COUNT, value, m.Option(model.ISSUE_UID))
|
return
|
||||||
}
|
}
|
||||||
|
m.Cmd(issue{}, s.AddCount, model.TASK_COUNT, value, m.Option(model.ISSUE_UID))
|
||||||
}
|
}
|
||||||
|
|
||||||
type TaskStatus int
|
type TaskStatus int
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
Volcanos(chat.ONIMPORT, {
|
Volcanos(chat.ONIMPORT, {
|
||||||
_init: function(can, msg) {
|
_init: function(can, msg) {
|
||||||
can.onimport.myView(can, msg, function(value) { return [
|
can.onimport.myView(can, msg, function(value) { return [
|
||||||
{view: html.TITLE, list: [value.title,
|
{view: html.TITLE, list: [value.title, value.task_status != "finish" && can.onimport.textView(can, value, "task_status"), can.onimport.titleAction(can, value)]},
|
||||||
value.task_status != "finish" && can.onimport.textView(can, value, "task_status"),
|
|
||||||
can.onimport.titleAction(can, value),
|
|
||||||
]},
|
|
||||||
{view: html.STATUS, list: [value.uid.slice(0, 6), can.base.TimeTrim(value.created_at), value.user_name]},
|
{view: html.STATUS, list: [value.uid.slice(0, 6), can.base.TimeTrim(value.created_at), value.user_name]},
|
||||||
value.process_time && {view: html.STATUS, list: [can.base.TimeTrim(value.process_time), "~", can.base.TimeTrim(value.finish_time)]},
|
value.process_time && {view: html.STATUS, list: [can.base.TimeTrim(value.process_time), "~", can.base.TimeTrim(value.finish_time)]},
|
||||||
value.plan_title && {view: html.STATUS, list: ["计划:", value.plan_title, "用例:", value.case_count+" 个"]},
|
value.plan_title && {view: html.STATUS, list: ["计划:", value.plan_title, "用例:", value.case_count+" 个"]},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user