This commit is contained in:
王怡栋
2022-04-18 11:30:31 +08:00
46 changed files with 781 additions and 226 deletions
+1 -1
View File
@@ -71,7 +71,7 @@ REPLACE INTO `zt_report` (`code`, `name`, `module`, `sql`, `vars`, `langs`, `par
('effort', '{\"zh-cn\":\"\\u65e5\\u5fd7\\u6c47\\u603b\\u8868\",\"zh-tw\":\"\\u65e5\\u8a8c\\u532f\\u7e3d\\u8868\",\"en\":\"Effort Summary\"}', ',staff', 'select t1.account,t1.consumed,t1.`date`,if($dept=\'0\',0,t2.dept) as dept from TABLE_EFFORT as t1 left join TABLE_USER as t2 on t1.account=t2.account where t1.`deleted`=\'0\' and if($startDate=\'\',1,t1.`date`>=$startDate) and if($endDate=\'\',1,t1.`date`<=$endDate) having dept=$dept order by `date` asc', '{\"varName\":[\"dept\",\"startDate\",\"endDate\"],\"showName\":[\"\\u90e8\\u95e8\",\"\\u8d77\\u59cb\\u65f6\\u95f4\",\"\\u7ed3\\u675f\\u65f6\\u95f4\"],\"requestType\":[\"select\",\"date\",\"date\"],\"selectList\":[\"dept\",\"user\",\"user\"],\"default\":[\"\",\"$MONTHBEGIN\",\"$MONTHEND\"]}', '{\"date\":{\"zh-cn\":\"\\u65e5\\u671f\",\"zh-tw\":\"\\u65e5\\u671f\",\"en\":\"Date\"},\"consumed\":{\"zh-cn\":\"\\u6d88\\u8017\\u5de5\\u65f6\",\"zh-tw\":\"\\u6d88\\u8017\\u5de5\\u65f6\",\"en\":\"Cost\"}}', '{\"group1\":\"account\",\"isUser\":{\"group1\":[\"1\"]},\"group2\":\"\",\"reportField\":[\"date\"],\"reportType\":[\"sum\"],\"sumAppend\":[\"consumed\"]}', 2, '{\"zh-cn\":\"\\u67e5\\u770b\\u67d0\\u4e2a\\u65f6\\u95f4\\u6bb5\\u5185\\u7684\\u65e5\\u5fd7\\u60c5\\u51b5\\uff0c\\u53ef\\u4ee5\\u6309\\u7167\\u90e8\\u95e8\\u9009\\u62e9\\u3002\",\"zh-tw\":\"\\u67e5\\u770b\\u67d0\\u500b\\u6642\\u9593\\u6bb5\\u5167\\u7684\\u65e5\\u8a8c\\u60c5\\u6cc1\\uff0c\\u53ef\\u4ee5\\u6309\\u7167\\u90e8\\u9580\\u9078\\u64c7\\u3002\",\"en\":\"You can view the logs of a certain period by department.\"}', 'admin', '2015-07-27 13:53:32'),
('company-dynamic', '{\"zh-cn\":\"\\u516c\\u53f8\\u52a8\\u6001\\u6c47\\u603b\\u8868\",\"zh-tw\":\"\\u516c\\u53f8\\u52d5\\u614b\\u532f\\u7e3d\\u8868\",\"en\":\"Company Dynamics\"}', ',staff', 'select t1.day,t2.userlogin,t3.consumed,t4.storyopen,t5.storyclose,t6.taskopen,t7.taskfinish,t8.bugopen,t9.bugresolve,t1.actions from ztv_dayactions as t1 left join ztv_dayuserlogin as t2 on t1.day=t2.day left join ztv_dayeffort as t3 on t1.day=t3.date left join ztv_daystoryopen as t4 on t1.day=t4.day left join ztv_daystoryclose as t5 on t1.day=t5.day left join ztv_daytaskopen as t6 on t1.day=t6.day left join ztv_daytaskfinish as t7 on t1.day=t7.day left join ztv_daybugopen as t8 on t1.day=t8.day left join ztv_daybugresolve as t9 on t1.day=t9.day where if($startDate=\'\',1,t1.day>=$startDate) and if($endDate=\'\',1,t1.day<=$endDate)', '{\"varName\":[\"startDate\",\"endDate\"],\"showName\":[\"\\u8d77\\u59cb\\u65f6\\u95f4\",\"\\u7ed3\\u675f\\u65f6\\u95f4\"],\"requestType\":[\"date\",\"date\"],\"selectList\":[\"user\",\"user\"],\"default\":[\"$MONTHBEGIN\",\"$MONTHEND\"]}', '{\"day\":{\"zh-cn\":\"\\u65e5\\u671f\",\"zh-tw\":\"\\u65e5\\u671f\",\"en\":\"Date\"},\"userlogin\":{\"zh-cn\":\"\\u767b\\u5f55\\u6b21\\u6570\",\"zh-tw\":\"\\u767b\\u9304\\u6b21\\u6578\",\"en\":\"Login\"},\"consumed\":{\"zh-cn\":\"\\u65e5\\u5fd7\\u5de5\\u65f6\",\"zh-tw\":\"\\u65e5\\u8a8c\\u5de5\\u6642\",\"en\":\"Cost(h)\"},\"storyopen\":{\"zh-cn\":\"\\u65b0\\u589e\\u9700\\u6c42\\u6570\",\"zh-tw\":\"\\u65b0\\u589e\\u9700\\u6c42\\u6578\",\"en\":\"Open Story\"},\"storyclose\":{\"zh-cn\":\"\\u5173\\u95ed\\u9700\\u6c42\\u6570\",\"zh-tw\":\"\\u95dc\\u9589\\u9700\\u6c42\\u6578\",\"en\":\"Closed Story\"},\"taskopen\":{\"zh-cn\":\"\\u65b0\\u589e\\u4efb\\u52a1\\u6570\",\"zh-tw\":\"\\u65b0\\u589e\\u4efb\\u52d9\\u6578\",\"en\":\"Open Task\"},\"taskfinish\":{\"zh-cn\":\"\\u5b8c\\u6210\\u4efb\\u52a1\\u6570\",\"zh-tw\":\"\\u5b8c\\u6210\\u4efb\\u52d9\\u6578\",\"en\":\"Finished Task\"},\"bugopen\":{\"zh-cn\":\"\\u65b0\\u589eBug\\u6570\",\"zh-tw\":\"\\u65b0\\u589eBug\\u6578\",\"en\":\"Open Bug\"},\"bugresolve\":{\"zh-cn\":\"\\u89e3\\u51b3Bug\\u6570\",\"zh-tw\":\"\\u89e3\\u51b3Bug\\u6578\",\"en\":\"Resolved bug\"},\"actions\":{\"zh-cn\":\"\\u52a8\\u6001\\u6570\",\"zh-tw\":\"\\u52d5\\u614b\\u6578\",\"en\":\"Dynamics\"}}', '{\"group1\":\"day\",\"isUser\":{\"group1\":[\"1\"]},\"group2\":\"\",\"reportField\":[\"userlogin\",\"consumed\",\"storyopen\",\"storyclose\",\"taskopen\",\"taskfinish\",\"bugopen\",\"bugresolve\",\"actions\"],\"reportType\":[\"sum\",\"sum\",\"sum\",\"sum\",\"sum\",\"sum\",\"sum\",\"sum\",\"sum\"],\"sumAppend\":[\"userlogin\",\"consumed\",\"storyopen\",\"storyclose\",\"taskopen\",\"taskfinish\",\"bugopen\",\"bugresolve\",\"actions\"]}', 2, '{\"zh-cn\":\"\\u53ef\\u4ee5\\u6307\\u5b9a\\u4e00\\u4e2a\\u65f6\\u671f\\uff0c\\u5217\\u51fa\\u76f8\\u5e94\\u7684\\u6570\\u636e\\uff1a1. \\u6bcf\\u5929\\u7684\\u767b\\u5f55\\u6b21\\u6570\\u30022. \\u6bcf\\u5929\\u7684\\u65e5\\u5fd7\\u5de5\\u65f6\\u91cf\\u30023. \\u6bcf\\u5929\\u65b0\\u589e\\u7684\\u9700\\u6c42\\u6570\\u30024. \\u6bcf\\u5929\\u5173\\u95ed\\u7684\\u9700\\u6c42\\u6570\\u30025. \\u6bcf\\u5929\\u65b0\\u589e\\u7684\\u4efb\\u52a1\\u6570\\u30026. \\u6bcf\\u5929\\u5b8c\\u6210\\u7684\\u4efb\\u52a1\\u6570\\u30027. \\u6bcf\\u5929\\u65b0\\u589e\\u7684Bug\\u6570\\u30028. \\u6bcf\\u5929\\u89e3\\u51b3\\u7684Bug\\u6570\\u30029. \\u6bcf\\u5929\\u7684\\u52a8\\u6001\\u6570\\u3002\",\"zh-tw\":\"\\u53ef\\u4ee5\\u6307\\u5b9a\\u4e00\\u500b\\u6642\\u671f\\uff0c\\u5217\\u51fa\\u76f8\\u61c9\\u7684\\u6578\\u64da\\uff1a1. \\u6bcf\\u5929\\u7684\\u767b\\u9304\\u6b21\\u6578\\u30022. \\u6bcf\\u5929\\u7684\\u65e5\\u8a8c\\u5de5\\u6642\\u91cf\\u30023. \\u6bcf\\u5929\\u65b0\\u589e\\u7684\\u9700\\u6c42\\u6578\\u30024. \\u6bcf\\u5929\\u95dc\\u9589\\u7684\\u9700\\u6c42\\u6578\\u30025. \\u6bcf\\u5929\\u65b0\\u589e\\u7684\\u4efb\\u52d9\\u6578\\u30026. \\u6bcf\\u5929\\u5b8c\\u6210\\u7684\\u4efb\\u52d9\\u6578\\u30027. \\u6bcf\\u5929\\u65b0\\u589e\\u7684Bug\\u6578\\u30028. \\u6bcf\\u5929\\u89e3\\u6c7a\\u7684Bug\\u6578\\u30029. \\u6bcf\\u5929\\u7684\\u52d5\\u614b\\u6578\\u3002\",\"en\":\"The summary of company dynamics\"}', 'admin', '2015-07-27 15:09:42'),
('bug-resolve', '{\"zh-cn\":\"Bug\\u89e3\\u51b3\\u8868\",\"zh-tw\":\"Bug\\u89e3\\u6c7a\\u8868\",\"en\":\"Solved Bugs\"}', ',test', 'select *,if($product=\'\',0,product) as customproduct from TABLE_BUG where deleted=\'0\' and resolution!=\'\' and if($startDate=\'\',1,resolvedDate>=$startDate) and if($endDate=\'\',1,resolvedDate<=$endDate) having customproduct=$product', '{\"varName\":[\"product\",\"startDate\",\"endDate\"],\"showName\":[\"\\u4ea7\\u54c1\",\"\\u89e3\\u51b3\\u65e5\\u671f\\u5f00\\u59cb\",\"\\u89e3\\u51b3\\u65e5\\u671f\\u7ed3\\u675f\"],\"requestType\":[\"select\",\"date\",\"date\"],\"selectList\":[\"product\",\"user\",\"user\"],\"default\":[\"\",\"$MONTHBEGIN\",\"$MONTHEND\"]}', '{\"count\":{\"zh-cn\":\"\\u9700\\u6c42\\u6570\",\"zh-tw\":\"\\u9700\\u6c42\\u6570\",\"en\":\"Stories\"},\"done\":{\"zh-cn\":\"\\u5b8c\\u6210\\u6570\",\"zh-tw\":\"\\u5b8c\\u6210\\u6570\",\"en\":\"Done\"}}', '{\"group1\":\"resolvedBy\",\"isUser\":{\"group1\":[\"1\"]},\"group2\":\"\",\"reportField\":[\"resolution\"],\"reportType\":[\"count\"],\"sumAppend\":[\"\"],\"reportTotal\":[\"1\"],\"percent\":[\"1\"],\"contrast\":[\"crystalTotal\"],\"showAlone\":[\"1\"]}', 2, '{\"zh-cn\":\"List the total number of bugs resolved, the distribution of solutions, and the percentage (the number of bugs solved by this user to the total number of bugs resolved).\",\"zh-tw\":\"\\u5217\\u51fa\\u89e3\\u6c7a\\u7684Bug\\u7e3d\\u6578\\uff0c\\u89e3\\u6c7a\\u65b9\\u6848\\u7684\\u5206\\u5e03\\uff0c\\u5360\\u7684\\u6bd4\\u4f8b\\uff08\\u8a72\\u7528\\u6236\\u89e3\\u6c7a\\u7684Bug\\u7684\\u6578\\u91cf\\u5360\\u6240\\u6709\\u7684\\u89e3\\u6c7a\\u7684Bug\\u7684\\u6578\\u91cf)\\u3002\",\"en\":\"percentage:self resolved \\/ all resolved\"}', 'admin', '2015-07-24 13:44:25'),
('project-progress', '{\"zh-cn\":\"\\u9879\\u76ee\\u8fdb\\u5c55\\u8868\",\"zh-tw\":\"\\u9805\\u76ee\\u9032\\u5c55\\u8868\",\"en\":\"Project Progress Report\"}', ',project', 'select t1.id,t4.name as project,t4.id,t1.name as execution,t1.status,t2.number as tasks,round(t2.consumed,2) as consumed,round(t2.`left`,2) as `left`,t3.stories,t2.undone as undoneTask,t3.undone as undoneStory,t2.totalReal from TABLE_EXECUTION as t1 \r\nleft join ztv_executionsummary as t2 on t1.id=t2.execution\r\nleft join ztv_projectstories as t3 on t1.id=t3.execution\r\nleft join TABLE_PROJECT as t4 on t4.id=t1.project\r\nwhere t1.deleted=\'0\' and t1.type in (\'sprint\',\'stage\') and if($project=\'\',1,t4.id=$project) and if($execution=\'\',1,t1.id=$execution) and if($status=\'\',1,t1.status=$status)', '{\"varName\":[\"project\",\"execution\",\"status\"],\"showName\":[\"\\u9879\\u76ee\\u5217\\u8868\",\"\\u6267\\u884c\\u5217\\u8868\",\"\\u6267\\u884c\\u72b6\\u6001\"],\"requestType\":[\"select\",\"select\",\"select\"],\"selectList\":[\"project\",\"execution\",\"project.status\"],\"default\":[\"\",\"\",\"\"]}', '{\"stories\":{\"zh-cn\":\"\\u9700\\u6c42\\u6570\",\"zh-tw\":\"\\u9700\\u6c42\\u6570\",\"en\":\"Stories\"},\"tasks\":{\"zh-cn\":\"\\u4efb\\u52a1\\u6570\",\"zh-tw\":\"\\u4efb\\u52a1\\u6570\",\"en\":\"Tasks\"},\"undoneStory\":{\"zh-cn\":\"\\u5269\\u4f59\\u9700\\u6c42\\u6570\",\"zh-tw\":\"\\u5269\\u4f59\\u9700\\u6c42\\u6570\",\"en\":\"Undone Story\"},\"undoneTask\":{\"zh-cn\":\"\\u5269\\u4f59\\u4efb\\u52a1\\u6570\",\"zh-tw\":\"\\u5269\\u4f59\\u4efb\\u52a1\\u6570\",\"en\":\"Undone Task\"},\"consumed\":{\"zh-cn\":\"\\u5df2\\u6d88\\u8017\\u5de5\\u65f6\",\"zh-tw\":\"\\u5df2\\u6d88\\u8017\\u5de5\\u65f6\",\"en\":\"Cost(h)\"},\"left\":{\"zh-cn\":\"\\u5269\\u4f59\\u5de5\\u65f6\",\"zh-tw\":\"\\u5269\\u4f59\\u5de5\\u65f6\",\"en\":\"Left(h)\"},\"consumedPercent\":{\"zh-cn\":\"\\u8fdb\\u5ea6\",\"zh-tw\":\"\\u8fdb\\u5ea6\",\"en\":\"Process\"},\"execution\":{\"zh-cn\":\"\\u6267\\u884c\\u540d\\u79f0\"}}', '{\"group1\":\"project\",\"group2\":\"execution\",\"reportField\":[\"stories\",\"undoneStory\",\"tasks\",\"undoneTask\",\"left\",\"consumed\"],\"reportType\":[\"sum\",\"sum\",\"sum\",\"sum\",\"sum\",\"sum\"],\"sumAppend\":[\"stories\",\"undoneStory\",\"tasks\",\"undoneTask\",\"left\",\"consumed\"],\"percent\":{\"5\":\"1\"},\"contrast\":{\"5\":\"totalReal\"},\"showAlone\":{\"5\":\"1\"}}', 2, '{\"zh-cn\":\"\\u9879\\u76ee\\u7684\\u9700\\u6c42\\u6570\\uff0c\\u4efb\\u52a1\\u6570\\uff0c\\u5df2\\u6d88\\u8017\\u5de5\\u65f6\\uff0c\\u5269\\u4f59\\u5de5\\u65f6\\uff0c\\u5269\\u4f59\\u9700\\u6c42\\u6570\\uff0c\\u5269\\u4f59\\u4efb\\u52a1\\u6570\\uff0c\\u8fdb\\u5ea6\\u3002\",\"zh-tw\":\"\\u9805\\u76ee\\u7684\\u9700\\u6c42\\u6578\\uff0c\\u4efb\\u52d9\\u6578\\uff0c\\u5df2\\u6d88\\u8017\\u5de5\\u6642\\uff0c\\u5269\\u9918\\u5de5\\u6642\\uff0c\\u5269\\u9918\\u9700\\u6c42\\u6578\\uff0c\\u5269\\u9918\\u4efb\\u52d9\\u6578\\uff0c\\u9032\\u5ea6\\u3002\",\"en\":\"Project requirements, tasks, consumed hours, remaining hours, remaining demands, remaining tasks, schedule.\"}', 'admin', '2015-07-23 14:03:06'),
('project-progress', '{\"zh-cn\":\"\\u9879\\u76ee\\u8fdb\\u5c55\\u8868\",\"zh-tw\":\"\\u9805\\u76ee\\u9032\\u5c55\\u8868\",\"en\":\"Project Progress Report\"}', ',project', 'select t1.id,t4.name as project,t4.id,t1.name as execution,t1.status,t2.number as tasks,round(t2.consumed,2) as consumed,round(t2.`left`,2) as `left`,t3.stories,t2.undone as undoneTask,t3.undone as undoneStory,t2.totalReal from TABLE_EXECUTION as t1 \r\nleft join ztv_executionsummary as t2 on t1.id=t2.execution\r\nleft join ztv_projectstories as t3 on t1.id=t3.execution\r\nleft join TABLE_PROJECT as t4 on t4.id=t1.project\r\nwhere t1.deleted=\'0\' and t1.type in (\'sprint\',\'stage\') and if($project=\'\',1,t4.id=$project) and if($execution=\'\',1,t1.id=$execution) and if($status=\'\' or $status=\'delay\',1,t1.status=$status) and if($status=\'delay\',t1.`end` < curdate(),1)', '{\"varName\":[\"project\",\"execution\",\"status\"],\"showName\":[\"\\u9879\\u76ee\\u5217\\u8868\",\"\\u6267\\u884c\\u5217\\u8868\",\"\\u6267\\u884c\\u72b6\\u6001\"],\"requestType\":[\"select\",\"select\",\"select\"],\"selectList\":[\"project\",\"execution\",\"project.status\"],\"default\":[\"\",\"\",\"\"]}', '{\"stories\":{\"zh-cn\":\"\\u9700\\u6c42\\u6570\",\"zh-tw\":\"\\u9700\\u6c42\\u6570\",\"en\":\"Stories\"},\"tasks\":{\"zh-cn\":\"\\u4efb\\u52a1\\u6570\",\"zh-tw\":\"\\u4efb\\u52a1\\u6570\",\"en\":\"Tasks\"},\"undoneStory\":{\"zh-cn\":\"\\u5269\\u4f59\\u9700\\u6c42\\u6570\",\"zh-tw\":\"\\u5269\\u4f59\\u9700\\u6c42\\u6570\",\"en\":\"Undone Story\"},\"undoneTask\":{\"zh-cn\":\"\\u5269\\u4f59\\u4efb\\u52a1\\u6570\",\"zh-tw\":\"\\u5269\\u4f59\\u4efb\\u52a1\\u6570\",\"en\":\"Undone Task\"},\"consumed\":{\"zh-cn\":\"\\u5df2\\u6d88\\u8017\\u5de5\\u65f6\",\"zh-tw\":\"\\u5df2\\u6d88\\u8017\\u5de5\\u65f6\",\"en\":\"Cost(h)\"},\"left\":{\"zh-cn\":\"\\u5269\\u4f59\\u5de5\\u65f6\",\"zh-tw\":\"\\u5269\\u4f59\\u5de5\\u65f6\",\"en\":\"Left(h)\"},\"consumedPercent\":{\"zh-cn\":\"\\u8fdb\\u5ea6\",\"zh-tw\":\"\\u8fdb\\u5ea6\",\"en\":\"Process\"},\"execution\":{\"zh-cn\":\"\\u6267\\u884c\\u540d\\u79f0\"}}', '{\"group1\":\"project\",\"group2\":\"execution\",\"reportField\":[\"stories\",\"undoneStory\",\"tasks\",\"undoneTask\",\"left\",\"consumed\"],\"reportType\":[\"sum\",\"sum\",\"sum\",\"sum\",\"sum\",\"sum\"],\"sumAppend\":[\"stories\",\"undoneStory\",\"tasks\",\"undoneTask\",\"left\",\"consumed\"],\"percent\":{\"5\":\"1\"},\"contrast\":{\"5\":\"totalReal\"},\"showAlone\":{\"5\":\"1\"}}', 2, '{\"zh-cn\":\"\\u9879\\u76ee\\u7684\\u9700\\u6c42\\u6570\\uff0c\\u4efb\\u52a1\\u6570\\uff0c\\u5df2\\u6d88\\u8017\\u5de5\\u65f6\\uff0c\\u5269\\u4f59\\u5de5\\u65f6\\uff0c\\u5269\\u4f59\\u9700\\u6c42\\u6570\\uff0c\\u5269\\u4f59\\u4efb\\u52a1\\u6570\\uff0c\\u8fdb\\u5ea6\\u3002\",\"zh-tw\":\"\\u9805\\u76ee\\u7684\\u9700\\u6c42\\u6578\\uff0c\\u4efb\\u52d9\\u6578\\uff0c\\u5df2\\u6d88\\u8017\\u5de5\\u6642\\uff0c\\u5269\\u9918\\u5de5\\u6642\\uff0c\\u5269\\u9918\\u9700\\u6c42\\u6578\\uff0c\\u5269\\u9918\\u4efb\\u52d9\\u6578\\uff0c\\u9032\\u5ea6\\u3002\",\"en\":\"Project requirements, tasks, consumed hours, remaining hours, remaining demands, remaining tasks, schedule.\"}', 'admin', '2015-07-23 14:03:06'),
('projectbug-type', '{\"zh-cn\":\"\\u9879\\u76eeBug\\u7c7b\\u578b\\u7edf\\u8ba1\\u8868\",\"zh-tw\":\"\\u9805\\u76eeBug\\u985e\\u578b\\u7d71\\u8a08\\u8868\",\"en\":\"Project Bug Type\"}', ',project,test', 'select t1.id,t3.name as project,t3.id,t1.name as execution,t2.id as bugID,t2.type from TABLE_EXECUTION as t1 \r\nleft join TABLE_BUG as t2 on t1.id=t2.execution\r\nleft join TABLE_PROJECT as t3 on t3.id=t1.project\r\nwhere t1.deleted=\'0\' and t2.deleted=\'0\' and if($project=\'\',1,t3.id=$project) and if($execution=\'\',1,t1.id=$execution)', '{\"varName\":[\"project\",\"execution\"],\"showName\":[\"\\u9879\\u76ee\\u5217\\u8868\",\"\\u6267\\u884c\\u5217\\u8868\"],\"requestType\":[\"select\",\"select\"],\"selectList\":[\"project\",\"execution\"],\"default\":[\"\",\"\"]}', '{\"stories\":{\"zh-cn\":\"\\u9700\\u6c42\\u6570\",\"zh-tw\":\"\\u9700\\u6c42\\u6570\",\"en\":\"Stories\"},\"tasks\":{\"zh-cn\":\"\\u4efb\\u52a1\\u6570\",\"zh-tw\":\"\\u4efb\\u52a1\\u6570\",\"en\":\"Tasks\"},\"undoneStory\":{\"zh-cn\":\"\\u5269\\u4f59\\u9700\\u6c42\\u6570\",\"zh-tw\":\"\\u5269\\u4f59\\u9700\\u6c42\\u6570\",\"en\":\"Undone Story\"},\"undoneTask\":{\"zh-cn\":\"\\u5269\\u4f59\\u4efb\\u52a1\\u6570\",\"zh-tw\":\"\\u5269\\u4f59\\u4efb\\u52a1\\u6570\",\"en\":\"Undone Task\"},\"consumed\":{\"zh-cn\":\"\\u5df2\\u6d88\\u8017\\u5de5\\u65f6\",\"zh-tw\":\"\\u5df2\\u6d88\\u8017\\u5de5\\u65f6\",\"en\":\"Cost(h)\"},\"left\":{\"zh-cn\":\"\\u5269\\u4f59\\u5de5\\u65f6\",\"zh-tw\":\"\\u5269\\u4f59\\u5de5\\u65f6\",\"en\":\"Left(h)\"},\"consumedPercent\":{\"zh-cn\":\"\\u8fdb\\u5ea6\",\"zh-tw\":\"\\u8fdb\\u5ea6\",\"en\":\"Process\"},\"execution\":{\"zh-cn\":\"\\u6267\\u884c\\u540d\\u79f0\"}}', '{\"group1\":\"project\",\"group2\":\"execution\",\"reportField\":[\"type\"],\"reportType\":[\"count\"],\"sumAppend\":[\"\"]}', 2, '{\"zh-cn\":\"\\u6309\\u7167\\u9879\\u76ee\\u7edf\\u8ba1Bug\\u7684\\u7c7b\\u578b\\u5206\\u5e03\\u60c5\\u51b5\\u3002\",\"zh-tw\":\"\\u6309\\u7167\\u9805\\u76ee\\u7d71\\u8a08Bug\\u7684\\u985e\\u578b\\u5206\\u5e03\\u60c5\\u6cc1\\u3002\",\"en\":\"Type distribution of Bug statistics by project.\"}', 'admin', '2015-08-04 13:54:22');
ALTER TABLE `zt_action` MODIFY COLUMN `product` text NOT NULL;
+1 -1
View File
@@ -6719,7 +6719,7 @@ REPLACE INTO `zt_report` (`code`, `name`, `module`, `sql`, `vars`, `langs`, `par
('effort', '{\"zh-cn\":\"\\u65e5\\u5fd7\\u6c47\\u603b\\u8868\",\"zh-tw\":\"\\u65e5\\u8a8c\\u532f\\u7e3d\\u8868\",\"en\":\"Effort Summary\"}', ',staff', 'select t1.account,t1.consumed,t1.`date`,if($dept=\'0\',0,t2.dept) as dept from TABLE_EFFORT as t1 left join TABLE_USER as t2 on t1.account=t2.account where t1.`deleted`=\'0\' and if($startDate=\'\',1,t1.`date`>=$startDate) and if($endDate=\'\',1,t1.`date`<=$endDate) having dept=$dept order by `date` asc', '{\"varName\":[\"dept\",\"startDate\",\"endDate\"],\"showName\":[\"\\u90e8\\u95e8\",\"\\u8d77\\u59cb\\u65f6\\u95f4\",\"\\u7ed3\\u675f\\u65f6\\u95f4\"],\"requestType\":[\"select\",\"date\",\"date\"],\"selectList\":[\"dept\",\"user\",\"user\"],\"default\":[\"\",\"$MONTHBEGIN\",\"$MONTHEND\"]}', '{\"date\":{\"zh-cn\":\"\\u65e5\\u671f\",\"zh-tw\":\"\\u65e5\\u671f\",\"en\":\"Date\"},\"consumed\":{\"zh-cn\":\"\\u6d88\\u8017\\u5de5\\u65f6\",\"zh-tw\":\"\\u6d88\\u8017\\u5de5\\u65f6\",\"en\":\"Cost\"}}', '{\"group1\":\"account\",\"isUser\":{\"group1\":[\"1\"]},\"group2\":\"\",\"reportField\":[\"date\"],\"reportType\":[\"sum\"],\"sumAppend\":[\"consumed\"]}', 2, '{\"zh-cn\":\"\\u67e5\\u770b\\u67d0\\u4e2a\\u65f6\\u95f4\\u6bb5\\u5185\\u7684\\u65e5\\u5fd7\\u60c5\\u51b5\\uff0c\\u53ef\\u4ee5\\u6309\\u7167\\u90e8\\u95e8\\u9009\\u62e9\\u3002\",\"zh-tw\":\"\\u67e5\\u770b\\u67d0\\u500b\\u6642\\u9593\\u6bb5\\u5167\\u7684\\u65e5\\u8a8c\\u60c5\\u6cc1\\uff0c\\u53ef\\u4ee5\\u6309\\u7167\\u90e8\\u9580\\u9078\\u64c7\\u3002\",\"en\":\"You can view the logs of a certain period by department.\"}', 'admin', '2015-07-27 13:53:32'),
('company-dynamic', '{\"zh-cn\":\"\\u516c\\u53f8\\u52a8\\u6001\\u6c47\\u603b\\u8868\",\"zh-tw\":\"\\u516c\\u53f8\\u52d5\\u614b\\u532f\\u7e3d\\u8868\",\"en\":\"Company Dynamics\"}', ',staff', 'select t1.day,t2.userlogin,t3.consumed,t4.storyopen,t5.storyclose,t6.taskopen,t7.taskfinish,t8.bugopen,t9.bugresolve,t1.actions from ztv_dayactions as t1 left join ztv_dayuserlogin as t2 on t1.day=t2.day left join ztv_dayeffort as t3 on t1.day=t3.date left join ztv_daystoryopen as t4 on t1.day=t4.day left join ztv_daystoryclose as t5 on t1.day=t5.day left join ztv_daytaskopen as t6 on t1.day=t6.day left join ztv_daytaskfinish as t7 on t1.day=t7.day left join ztv_daybugopen as t8 on t1.day=t8.day left join ztv_daybugresolve as t9 on t1.day=t9.day where if($startDate=\'\',1,t1.day>=$startDate) and if($endDate=\'\',1,t1.day<=$endDate)', '{\"varName\":[\"startDate\",\"endDate\"],\"showName\":[\"\\u8d77\\u59cb\\u65f6\\u95f4\",\"\\u7ed3\\u675f\\u65f6\\u95f4\"],\"requestType\":[\"date\",\"date\"],\"selectList\":[\"user\",\"user\"],\"default\":[\"$MONTHBEGIN\",\"$MONTHEND\"]}', '{\"day\":{\"zh-cn\":\"\\u65e5\\u671f\",\"zh-tw\":\"\\u65e5\\u671f\",\"en\":\"Date\"},\"userlogin\":{\"zh-cn\":\"\\u767b\\u5f55\\u6b21\\u6570\",\"zh-tw\":\"\\u767b\\u9304\\u6b21\\u6578\",\"en\":\"Login\"},\"consumed\":{\"zh-cn\":\"\\u65e5\\u5fd7\\u5de5\\u65f6\",\"zh-tw\":\"\\u65e5\\u8a8c\\u5de5\\u6642\",\"en\":\"Cost(h)\"},\"storyopen\":{\"zh-cn\":\"\\u65b0\\u589e\\u9700\\u6c42\\u6570\",\"zh-tw\":\"\\u65b0\\u589e\\u9700\\u6c42\\u6578\",\"en\":\"Open Story\"},\"storyclose\":{\"zh-cn\":\"\\u5173\\u95ed\\u9700\\u6c42\\u6570\",\"zh-tw\":\"\\u95dc\\u9589\\u9700\\u6c42\\u6578\",\"en\":\"Closed Story\"},\"taskopen\":{\"zh-cn\":\"\\u65b0\\u589e\\u4efb\\u52a1\\u6570\",\"zh-tw\":\"\\u65b0\\u589e\\u4efb\\u52d9\\u6578\",\"en\":\"Open Task\"},\"taskfinish\":{\"zh-cn\":\"\\u5b8c\\u6210\\u4efb\\u52a1\\u6570\",\"zh-tw\":\"\\u5b8c\\u6210\\u4efb\\u52d9\\u6578\",\"en\":\"Finished Task\"},\"bugopen\":{\"zh-cn\":\"\\u65b0\\u589eBug\\u6570\",\"zh-tw\":\"\\u65b0\\u589eBug\\u6578\",\"en\":\"Open Bug\"},\"bugresolve\":{\"zh-cn\":\"\\u89e3\\u51b3Bug\\u6570\",\"zh-tw\":\"\\u89e3\\u51b3Bug\\u6578\",\"en\":\"Resolved bug\"},\"actions\":{\"zh-cn\":\"\\u52a8\\u6001\\u6570\",\"zh-tw\":\"\\u52d5\\u614b\\u6578\",\"en\":\"Dynamics\"}}', '{\"group1\":\"day\",\"isUser\":{\"group1\":[\"1\"]},\"group2\":\"\",\"reportField\":[\"userlogin\",\"consumed\",\"storyopen\",\"storyclose\",\"taskopen\",\"taskfinish\",\"bugopen\",\"bugresolve\",\"actions\"],\"reportType\":[\"sum\",\"sum\",\"sum\",\"sum\",\"sum\",\"sum\",\"sum\",\"sum\",\"sum\"],\"sumAppend\":[\"userlogin\",\"consumed\",\"storyopen\",\"storyclose\",\"taskopen\",\"taskfinish\",\"bugopen\",\"bugresolve\",\"actions\"]}', 2, '{\"zh-cn\":\"\\u53ef\\u4ee5\\u6307\\u5b9a\\u4e00\\u4e2a\\u65f6\\u671f\\uff0c\\u5217\\u51fa\\u76f8\\u5e94\\u7684\\u6570\\u636e\\uff1a1. \\u6bcf\\u5929\\u7684\\u767b\\u5f55\\u6b21\\u6570\\u30022. \\u6bcf\\u5929\\u7684\\u65e5\\u5fd7\\u5de5\\u65f6\\u91cf\\u30023. \\u6bcf\\u5929\\u65b0\\u589e\\u7684\\u9700\\u6c42\\u6570\\u30024. \\u6bcf\\u5929\\u5173\\u95ed\\u7684\\u9700\\u6c42\\u6570\\u30025. \\u6bcf\\u5929\\u65b0\\u589e\\u7684\\u4efb\\u52a1\\u6570\\u30026. \\u6bcf\\u5929\\u5b8c\\u6210\\u7684\\u4efb\\u52a1\\u6570\\u30027. \\u6bcf\\u5929\\u65b0\\u589e\\u7684Bug\\u6570\\u30028. \\u6bcf\\u5929\\u89e3\\u51b3\\u7684Bug\\u6570\\u30029. \\u6bcf\\u5929\\u7684\\u52a8\\u6001\\u6570\\u3002\",\"zh-tw\":\"\\u53ef\\u4ee5\\u6307\\u5b9a\\u4e00\\u500b\\u6642\\u671f\\uff0c\\u5217\\u51fa\\u76f8\\u61c9\\u7684\\u6578\\u64da\\uff1a1. \\u6bcf\\u5929\\u7684\\u767b\\u9304\\u6b21\\u6578\\u30022. \\u6bcf\\u5929\\u7684\\u65e5\\u8a8c\\u5de5\\u6642\\u91cf\\u30023. \\u6bcf\\u5929\\u65b0\\u589e\\u7684\\u9700\\u6c42\\u6578\\u30024. \\u6bcf\\u5929\\u95dc\\u9589\\u7684\\u9700\\u6c42\\u6578\\u30025. \\u6bcf\\u5929\\u65b0\\u589e\\u7684\\u4efb\\u52d9\\u6578\\u30026. \\u6bcf\\u5929\\u5b8c\\u6210\\u7684\\u4efb\\u52d9\\u6578\\u30027. \\u6bcf\\u5929\\u65b0\\u589e\\u7684Bug\\u6578\\u30028. \\u6bcf\\u5929\\u89e3\\u6c7a\\u7684Bug\\u6578\\u30029. \\u6bcf\\u5929\\u7684\\u52d5\\u614b\\u6578\\u3002\",\"en\":\"The summary of company dynamics\"}', 'admin', '2015-07-27 15:09:42'),
('bug-resolve', '{\"zh-cn\":\"Bug\\u89e3\\u51b3\\u8868\",\"zh-tw\":\"Bug\\u89e3\\u6c7a\\u8868\",\"en\":\"Solved Bugs\"}', ',test', 'select *,if($product=\'\',0,product) as customproduct from TABLE_BUG where deleted=\'0\' and resolution!=\'\' and if($startDate=\'\',1,resolvedDate>=$startDate) and if($endDate=\'\',1,resolvedDate<=$endDate) having customproduct=$product', '{\"varName\":[\"product\",\"startDate\",\"endDate\"],\"showName\":[\"\\u4ea7\\u54c1\",\"\\u89e3\\u51b3\\u65e5\\u671f\\u5f00\\u59cb\",\"\\u89e3\\u51b3\\u65e5\\u671f\\u7ed3\\u675f\"],\"requestType\":[\"select\",\"date\",\"date\"],\"selectList\":[\"product\",\"user\",\"user\"],\"default\":[\"\",\"$MONTHBEGIN\",\"$MONTHEND\"]}', '{\"count\":{\"zh-cn\":\"\\u9700\\u6c42\\u6570\",\"zh-tw\":\"\\u9700\\u6c42\\u6570\",\"en\":\"Stories\"},\"done\":{\"zh-cn\":\"\\u5b8c\\u6210\\u6570\",\"zh-tw\":\"\\u5b8c\\u6210\\u6570\",\"en\":\"Done\"}}', '{\"group1\":\"resolvedBy\",\"isUser\":{\"group1\":[\"1\"]},\"group2\":\"\",\"reportField\":[\"resolution\"],\"reportType\":[\"count\"],\"sumAppend\":[\"\"],\"reportTotal\":[\"1\"],\"percent\":[\"1\"],\"contrast\":[\"crystalTotal\"],\"showAlone\":[\"1\"]}', 2, '{\"zh-cn\":\"List the total number of bugs resolved, the distribution of solutions, and the percentage (the number of bugs solved by this user to the total number of bugs resolved).\",\"zh-tw\":\"\\u5217\\u51fa\\u89e3\\u6c7a\\u7684Bug\\u7e3d\\u6578\\uff0c\\u89e3\\u6c7a\\u65b9\\u6848\\u7684\\u5206\\u5e03\\uff0c\\u5360\\u7684\\u6bd4\\u4f8b\\uff08\\u8a72\\u7528\\u6236\\u89e3\\u6c7a\\u7684Bug\\u7684\\u6578\\u91cf\\u5360\\u6240\\u6709\\u7684\\u89e3\\u6c7a\\u7684Bug\\u7684\\u6578\\u91cf)\\u3002\",\"en\":\"percentage:self resolved \\/ all resolved\"}', 'admin', '2015-07-24 13:44:25'),
('project-progress', '{\"zh-cn\":\"\\u9879\\u76ee\\u8fdb\\u5c55\\u8868\",\"zh-tw\":\"\\u9805\\u76ee\\u9032\\u5c55\\u8868\",\"en\":\"Project Progress Report\"}', ',project', 'select t1.id,t4.name as project,t4.id,t1.name as execution,t1.status,t2.number as tasks,round(t2.consumed,2) as consumed,round(t2.`left`,2) as `left`,t3.stories,t2.undone as undoneTask,t3.undone as undoneStory,t2.totalReal from TABLE_EXECUTION as t1 \r\nleft join ztv_executionsummary as t2 on t1.id=t2.execution\r\nleft join ztv_projectstories as t3 on t1.id=t3.execution\r\nleft join TABLE_PROJECT as t4 on t4.id=t1.project\r\nwhere t1.deleted=\'0\' and t1.type in (\'sprint\',\'stage\') and if($project=\'\',1,t4.id=$project) and if($execution=\'\',1,t1.id=$execution) and if($status=\'\',1,t1.status=$status)', '{\"varName\":[\"project\",\"execution\",\"status\"],\"showName\":[\"\\u9879\\u76ee\\u5217\\u8868\",\"\\u6267\\u884c\\u5217\\u8868\",\"\\u6267\\u884c\\u72b6\\u6001\"],\"requestType\":[\"select\",\"select\",\"select\"],\"selectList\":[\"project\",\"execution\",\"project.status\"],\"default\":[\"\",\"\",\"\"]}', '{\"stories\":{\"zh-cn\":\"\\u9700\\u6c42\\u6570\",\"zh-tw\":\"\\u9700\\u6c42\\u6570\",\"en\":\"Stories\"},\"tasks\":{\"zh-cn\":\"\\u4efb\\u52a1\\u6570\",\"zh-tw\":\"\\u4efb\\u52a1\\u6570\",\"en\":\"Tasks\"},\"undoneStory\":{\"zh-cn\":\"\\u5269\\u4f59\\u9700\\u6c42\\u6570\",\"zh-tw\":\"\\u5269\\u4f59\\u9700\\u6c42\\u6570\",\"en\":\"Undone Story\"},\"undoneTask\":{\"zh-cn\":\"\\u5269\\u4f59\\u4efb\\u52a1\\u6570\",\"zh-tw\":\"\\u5269\\u4f59\\u4efb\\u52a1\\u6570\",\"en\":\"Undone Task\"},\"consumed\":{\"zh-cn\":\"\\u5df2\\u6d88\\u8017\\u5de5\\u65f6\",\"zh-tw\":\"\\u5df2\\u6d88\\u8017\\u5de5\\u65f6\",\"en\":\"Cost(h)\"},\"left\":{\"zh-cn\":\"\\u5269\\u4f59\\u5de5\\u65f6\",\"zh-tw\":\"\\u5269\\u4f59\\u5de5\\u65f6\",\"en\":\"Left(h)\"},\"consumedPercent\":{\"zh-cn\":\"\\u8fdb\\u5ea6\",\"zh-tw\":\"\\u8fdb\\u5ea6\",\"en\":\"Process\"},\"execution\":{\"zh-cn\":\"\\u6267\\u884c\\u540d\\u79f0\"}}', '{\"group1\":\"project\",\"group2\":\"execution\",\"reportField\":[\"stories\",\"undoneStory\",\"tasks\",\"undoneTask\",\"left\",\"consumed\"],\"reportType\":[\"sum\",\"sum\",\"sum\",\"sum\",\"sum\",\"sum\"],\"sumAppend\":[\"stories\",\"undoneStory\",\"tasks\",\"undoneTask\",\"left\",\"consumed\"],\"percent\":{\"5\":\"1\"},\"contrast\":{\"5\":\"totalReal\"},\"showAlone\":{\"5\":\"1\"}}', 2, '{\"zh-cn\":\"\\u9879\\u76ee\\u7684\\u9700\\u6c42\\u6570\\uff0c\\u4efb\\u52a1\\u6570\\uff0c\\u5df2\\u6d88\\u8017\\u5de5\\u65f6\\uff0c\\u5269\\u4f59\\u5de5\\u65f6\\uff0c\\u5269\\u4f59\\u9700\\u6c42\\u6570\\uff0c\\u5269\\u4f59\\u4efb\\u52a1\\u6570\\uff0c\\u8fdb\\u5ea6\\u3002\",\"zh-tw\":\"\\u9805\\u76ee\\u7684\\u9700\\u6c42\\u6578\\uff0c\\u4efb\\u52d9\\u6578\\uff0c\\u5df2\\u6d88\\u8017\\u5de5\\u6642\\uff0c\\u5269\\u9918\\u5de5\\u6642\\uff0c\\u5269\\u9918\\u9700\\u6c42\\u6578\\uff0c\\u5269\\u9918\\u4efb\\u52d9\\u6578\\uff0c\\u9032\\u5ea6\\u3002\",\"en\":\"Project requirements, tasks, consumed hours, remaining hours, remaining demands, remaining tasks, schedule.\"}', 'admin', '2015-07-23 14:03:06'),
('project-progress', '{\"zh-cn\":\"\\u9879\\u76ee\\u8fdb\\u5c55\\u8868\",\"zh-tw\":\"\\u9805\\u76ee\\u9032\\u5c55\\u8868\",\"en\":\"Project Progress Report\"}', ',project', 'select t1.id,t4.name as project,t4.id,t1.name as execution,t1.status,t2.number as tasks,round(t2.consumed,2) as consumed,round(t2.`left`,2) as `left`,t3.stories,t2.undone as undoneTask,t3.undone as undoneStory,t2.totalReal from TABLE_EXECUTION as t1 \r\nleft join ztv_executionsummary as t2 on t1.id=t2.execution\r\nleft join ztv_projectstories as t3 on t1.id=t3.execution\r\nleft join TABLE_PROJECT as t4 on t4.id=t1.project\r\nwhere t1.deleted=\'0\' and t1.type in (\'sprint\',\'stage\') and if($project=\'\',1,t4.id=$project) and if($execution=\'\',1,t1.id=$execution) and if($status=\'\' or $status=\'delay\',1,t1.status=$status) and if($status=\'delay\',t1.`end` < curdate(),1)', '{\"varName\":[\"project\",\"execution\",\"status\"],\"showName\":[\"\\u9879\\u76ee\\u5217\\u8868\",\"\\u6267\\u884c\\u5217\\u8868\",\"\\u6267\\u884c\\u72b6\\u6001\"],\"requestType\":[\"select\",\"select\",\"select\"],\"selectList\":[\"project\",\"execution\",\"project.status\"],\"default\":[\"\",\"\",\"\"]}', '{\"stories\":{\"zh-cn\":\"\\u9700\\u6c42\\u6570\",\"zh-tw\":\"\\u9700\\u6c42\\u6570\",\"en\":\"Stories\"},\"tasks\":{\"zh-cn\":\"\\u4efb\\u52a1\\u6570\",\"zh-tw\":\"\\u4efb\\u52a1\\u6570\",\"en\":\"Tasks\"},\"undoneStory\":{\"zh-cn\":\"\\u5269\\u4f59\\u9700\\u6c42\\u6570\",\"zh-tw\":\"\\u5269\\u4f59\\u9700\\u6c42\\u6570\",\"en\":\"Undone Story\"},\"undoneTask\":{\"zh-cn\":\"\\u5269\\u4f59\\u4efb\\u52a1\\u6570\",\"zh-tw\":\"\\u5269\\u4f59\\u4efb\\u52a1\\u6570\",\"en\":\"Undone Task\"},\"consumed\":{\"zh-cn\":\"\\u5df2\\u6d88\\u8017\\u5de5\\u65f6\",\"zh-tw\":\"\\u5df2\\u6d88\\u8017\\u5de5\\u65f6\",\"en\":\"Cost(h)\"},\"left\":{\"zh-cn\":\"\\u5269\\u4f59\\u5de5\\u65f6\",\"zh-tw\":\"\\u5269\\u4f59\\u5de5\\u65f6\",\"en\":\"Left(h)\"},\"consumedPercent\":{\"zh-cn\":\"\\u8fdb\\u5ea6\",\"zh-tw\":\"\\u8fdb\\u5ea6\",\"en\":\"Process\"},\"execution\":{\"zh-cn\":\"\\u6267\\u884c\\u540d\\u79f0\"}}', '{\"group1\":\"project\",\"group2\":\"execution\",\"reportField\":[\"stories\",\"undoneStory\",\"tasks\",\"undoneTask\",\"left\",\"consumed\"],\"reportType\":[\"sum\",\"sum\",\"sum\",\"sum\",\"sum\",\"sum\"],\"sumAppend\":[\"stories\",\"undoneStory\",\"tasks\",\"undoneTask\",\"left\",\"consumed\"],\"percent\":{\"5\":\"1\"},\"contrast\":{\"5\":\"totalReal\"},\"showAlone\":{\"5\":\"1\"}}', 2, '{\"zh-cn\":\"\\u9879\\u76ee\\u7684\\u9700\\u6c42\\u6570\\uff0c\\u4efb\\u52a1\\u6570\\uff0c\\u5df2\\u6d88\\u8017\\u5de5\\u65f6\\uff0c\\u5269\\u4f59\\u5de5\\u65f6\\uff0c\\u5269\\u4f59\\u9700\\u6c42\\u6570\\uff0c\\u5269\\u4f59\\u4efb\\u52a1\\u6570\\uff0c\\u8fdb\\u5ea6\\u3002\",\"zh-tw\":\"\\u9805\\u76ee\\u7684\\u9700\\u6c42\\u6578\\uff0c\\u4efb\\u52d9\\u6578\\uff0c\\u5df2\\u6d88\\u8017\\u5de5\\u6642\\uff0c\\u5269\\u9918\\u5de5\\u6642\\uff0c\\u5269\\u9918\\u9700\\u6c42\\u6578\\uff0c\\u5269\\u9918\\u4efb\\u52d9\\u6578\\uff0c\\u9032\\u5ea6\\u3002\",\"en\":\"Project requirements, tasks, consumed hours, remaining hours, remaining demands, remaining tasks, schedule.\"}', 'admin', '2015-07-23 14:03:06'),
('projectbug-type', '{\"zh-cn\":\"\\u9879\\u76eeBug\\u7c7b\\u578b\\u7edf\\u8ba1\\u8868\",\"zh-tw\":\"\\u9805\\u76eeBug\\u985e\\u578b\\u7d71\\u8a08\\u8868\",\"en\":\"Project Bug Type\"}', ',project,test', 'select t1.id,t3.name as project,t3.id,t1.name as execution,t2.id as bugID,t2.type from TABLE_EXECUTION as t1 \r\nleft join TABLE_BUG as t2 on t1.id=t2.execution\r\nleft join TABLE_PROJECT as t3 on t3.id=t1.project\r\nwhere t1.deleted=\'0\' and t2.deleted=\'0\' and if($project=\'\',1,t3.id=$project) and if($execution=\'\',1,t1.id=$execution)', '{\"varName\":[\"project\",\"execution\"],\"showName\":[\"\\u9879\\u76ee\\u5217\\u8868\",\"\\u6267\\u884c\\u5217\\u8868\"],\"requestType\":[\"select\",\"select\"],\"selectList\":[\"project\",\"execution\"],\"default\":[\"\",\"\"]}', '{\"stories\":{\"zh-cn\":\"\\u9700\\u6c42\\u6570\",\"zh-tw\":\"\\u9700\\u6c42\\u6570\",\"en\":\"Stories\"},\"tasks\":{\"zh-cn\":\"\\u4efb\\u52a1\\u6570\",\"zh-tw\":\"\\u4efb\\u52a1\\u6570\",\"en\":\"Tasks\"},\"undoneStory\":{\"zh-cn\":\"\\u5269\\u4f59\\u9700\\u6c42\\u6570\",\"zh-tw\":\"\\u5269\\u4f59\\u9700\\u6c42\\u6570\",\"en\":\"Undone Story\"},\"undoneTask\":{\"zh-cn\":\"\\u5269\\u4f59\\u4efb\\u52a1\\u6570\",\"zh-tw\":\"\\u5269\\u4f59\\u4efb\\u52a1\\u6570\",\"en\":\"Undone Task\"},\"consumed\":{\"zh-cn\":\"\\u5df2\\u6d88\\u8017\\u5de5\\u65f6\",\"zh-tw\":\"\\u5df2\\u6d88\\u8017\\u5de5\\u65f6\",\"en\":\"Cost(h)\"},\"left\":{\"zh-cn\":\"\\u5269\\u4f59\\u5de5\\u65f6\",\"zh-tw\":\"\\u5269\\u4f59\\u5de5\\u65f6\",\"en\":\"Left(h)\"},\"consumedPercent\":{\"zh-cn\":\"\\u8fdb\\u5ea6\",\"zh-tw\":\"\\u8fdb\\u5ea6\",\"en\":\"Process\"},\"execution\":{\"zh-cn\":\"\\u6267\\u884c\\u540d\\u79f0\"}}', '{\"group1\":\"project\",\"group2\":\"execution\",\"reportField\":[\"type\"],\"reportType\":[\"count\"],\"sumAppend\":[\"\"]}', 2, '{\"zh-cn\":\"\\u6309\\u7167\\u9879\\u76ee\\u7edf\\u8ba1Bug\\u7684\\u7c7b\\u578b\\u5206\\u5e03\\u60c5\\u51b5\\u3002\",\"zh-tw\":\"\\u6309\\u7167\\u9805\\u76ee\\u7d71\\u8a08Bug\\u7684\\u985e\\u578b\\u5206\\u5e03\\u60c5\\u6cc1\\u3002\",\"en\":\"Type distribution of Bug statistics by project.\"}', 'admin', '2015-08-04 13:54:22');
REPLACE INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
@@ -42,7 +42,7 @@ class myExecution extends execution
$TRActions .= "<div class='dropdown'>";
$TRActions .= html::a('javascript:;', "<i class='icon icon-cog-outline'></i>" . $this->lang->kanban->setting, '', "data-toggle='dropdown' data- class='btn btn-link'");
$TRActions .= "<ul id='kanbanActionMenu' class='dropdown-menu pull-right'>";
$width = $this->app->getClientLang() == 'en' ? '70%' : '60%';
$width = $this->app->getClientLang() == 'en' ? '750' : '650';
if(common::hasPriv('kanban', 'createRegion')) $TRActions .= '<li>' . html::a(helper::createLink('kanban', 'createRegion', "kanbanID=$execution->id&from=execution", '', true), '<i class="icon icon-plus"></i>' . $this->lang->kanban->createRegion, '', "class='iframe btn btn-link text-left'") . '</li>';
if(common::hasPriv('kanban', 'setLaneHeight')) $TRActions .= '<li>' . html::a(helper::createLink('kanban', 'setLaneHeight', "kanbanID=$execution->id&from=execution", '', true), '<i class="icon icon-size-height"></i>' . $this->lang->kanban->laneHeight, '', "class='iframe btn btn-link text-left' data-width=$width") . '</li>';
$kanbanActions = '';
@@ -22,9 +22,9 @@
.product-info {position: relative; height: 65px;}
.product-info + .product-info {margin-top: 10px;}
.product-info .progress {position: absolute; left: 10px; top: 35px; right: 90px;}
.product-info .progress-info {position: absolute; left: 8px; top: 10px; width: 180px; font-size: 12px;}
.product-info .progress-info {position: absolute; left: 5px; top: 10px; width: 180px; font-size: 12px;}
.product-info .type-info {color: #A6AAB8; text-align: center; position: absolute; right: 0; top: 6px; width: 100px;}
html[lang="en"] .product-info .type-info {color: #A6AAB8; text-align: center; position: absolute; right: 0; top: 6px; width: 90px;}
html[lang="en"] .product-info .type-info {color: #A6AAB8; text-align: center; position: absolute; right: 0; top: 6px; width: 75px;}
.product-info .type-value,
.product-info .type-label {font-size: 12px; overflow: visible; text-overflow: ellipsis; white-space: nowrap;}
.product-info .type-value {font-size: 14px;}
@@ -35,7 +35,7 @@ html[lang="en"] .product-info .type-info {color: #A6AAB8; text-align: center; po
.block-statistic .tile {margin-bottom: 30px;}
.block-statistic .tile-title {font-size: 18px; color: #A6AAB8;}
.block-statistic .tile-amount {font-size: 48px; margin-bottom: 10px;}
.block-statistic .col-nav {border-right: 1px solid #EBF2FB; width: 260px; padding: 0;}
.block-statistic .col-nav {border-right: 1px solid #EBF2FB; width: 220px; padding: 0;}
.block-statistic .nav-secondary > li {position: relative}
.block-statistic .nav-secondary > li:hover {background: #f5f5f5;}
.block-statistic .nav-secondary > li > a {font-size: 14px; color: #838A9D; position: relative; box-shadow: none; padding-left: 20px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; transition: all .2s;}
+4 -10
View File
@@ -257,20 +257,14 @@ class branch extends control
* @access public
* @return void
*/
public function ajaxGetBranches($productID, $oldBranch = 0, $param = 'all', $projectID = 0, $withMainBranch = true)
public function ajaxGetBranches($productID, $oldBranch = 0, $param = '', $projectID = 0, $withMainBranch = true)
{
$product = $this->loadModel('product')->getById($productID);
if(empty($product) or $product->type == 'normal') return;
$branches = $this->loadModel('branch')->getList($productID, $projectID, $param, 'order', null, $withMainBranch);
$branchOption = array();
$branchTagOption = array();
foreach($branches as $branchInfo)
{
$branchOption[$branchInfo->id] = $branchInfo->name;
$branchTagOption[$branchInfo->id] = $branchInfo->name . ($branchInfo->status == 'closed' ? ' (' . $this->lang->branch->statusList['closed'] . ')' : '');
}
return print(html::select('branch', strpos($param, 'active') !== false ? $branchOption : $branchTagOption, $oldBranch, "class='form-control' onchange='loadBranch(this)'"));
$branches = $this->loadModel('branch')->getPairs($productID, $param);
return print(html::select('branch', $branches, $oldBranch, "class='form-control' onchange='loadBranch(this)'"));
}
/**
+11 -1
View File
@@ -96,7 +96,7 @@ class branchModel extends model
* Get pairs.
*
* @param int $productID
* @param string $params
* @param string $params active|noempty|all|withClosed
* @param int $executionID
* @param string $mergedBranches
* @access public
@@ -141,6 +141,16 @@ class branchModel extends model
{
$branches = array('all' => $this->lang->branch->all) + $branches;
}
if(strpos($params, 'withClosed') !== false)
{
$closedBranches = $this->dao->select('id')->from(TABLE_BRANCH)->where('product')->eq($productID)->andWhere('status')->eq('closed')->fetchPairs();
if(!empty($closedBranches))
{
foreach($closedBranches as $closedBranch) $branches[$closedBranch] .= ' (' . $this->lang->branch->statusList['closed'] . ')';
}
}
return $branches;
}
+1 -1
View File
@@ -39,7 +39,7 @@ $config->bug->list->exportFields = 'id, product, branch, module, project, execut
lastEditedDate, files';
if($config->systemMode == 'classic') $config->bug->list->exportFields = str_replace(' project,', '', $config->bug->list->exportFields);
$config->bug->list->customCreateFields = 'execution,story,task,pri,severity,os,browser,deadline,mailto,keywords';
$config->bug->list->customCreateFields = 'execution,noticefeedbackBy,story,task,pri,severity,os,browser,deadline,mailto,keywords';
$config->bug->list->customBatchCreateFields = 'execution,steps,type,pri,deadline,severity,os,browser,keywords';
$config->bug->list->customBatchEditFields = 'type,severity,pri,productplan,assignedTo,deadline,resolvedBy,resolution,os,browser,keywords';
+5 -2
View File
@@ -571,7 +571,7 @@ class bug extends control
if($projectID)
{
$project = $this->loadModel('project')->getByID($projectID);
$projects = array($projectID => $project->name);
if(empty($bugID)) $projects = array($projectID => $project->name);
}
}
elseif($projectID)
@@ -581,7 +581,7 @@ class bug extends control
foreach($productList as $product) $products[$product->id] = $product->name;
$project = $this->loadModel('project')->getByID($projectID);
$projects += array($projectID => $project->name);
if(empty($bugID)) $projects += array($projectID => $project->name);
/* Set project menu. */
if($this->app->tab == 'project') $this->project->setMenu($projectID);
@@ -591,6 +591,9 @@ class bug extends control
$projects += $this->product->getProjectPairsByProduct($productID, $branch);
}
/* When copying bug, get all project linked to the product. */
if(!empty($bugID)) $projects += $this->product->getProjectPairsByProduct($productID, $branch);
/* Get block id of assinge to me. */
$blockID = 0;
if(isonlybody())
+1
View File
@@ -90,6 +90,7 @@ $lang->bug->fromCase = 'From Case';
$lang->bug->toCase = 'To Case';
$lang->bug->colorTag = 'Color';
$lang->bug->fixedRate = 'Fixed Rate';
$lang->bug->noticefeedbackBy = 'NoticeFeedbackBy';
/* Method list. */
$lang->bug->index = 'Bug Home';
+1
View File
@@ -90,6 +90,7 @@ $lang->bug->fromCase = '来源用例';
$lang->bug->toCase = '生成用例';
$lang->bug->colorTag = '颜色标签';
$lang->bug->fixedRate = '修复率';
$lang->bug->noticefeedbackBy = '通知反馈者';
/* 方法列表。*/
$lang->bug->index = '首页';
+4 -1
View File
@@ -138,6 +138,7 @@ if($this->app->tab == 'project') js::set('objectID', $projectID);
</div>
</td>
<?php $showDeadline = strpos(",$showFields,", ',deadline,') !== false;?>
<?php $showNoticefeedbackBy = strpos(",$showFields,", ',noticefeedbackBy,') !== false;?>
<?php if($showDeadline):?>
<td id='deadlineTd'>
<div class='input-group'>
@@ -146,6 +147,7 @@ if($this->app->tab == 'project') js::set('objectID', $projectID);
</div>
</td>
</tr>
<?php if($showNoticefeedbackBy):?>
<tr>
<th><nobr><?php echo $lang->bug->feedbackBy;?></nobr></th>
<td><?php echo html::input('feedbackBy', '', "class='form-control'");?></td>
@@ -156,7 +158,8 @@ if($this->app->tab == 'project') js::set('objectID', $projectID);
</div>
</td>
</tr>
<?php else:?>
<?php endif;?>
<?php elseif($showNoticefeedbackBy):?>
<td>
<div class='input-group' id='feedback'>
<span class="input-group-addon"><?php echo $lang->bug->feedbackBy?></span>
+24 -2
View File
@@ -2010,13 +2010,35 @@ EOD;
}
else
{
$key = $existsObjectList['idkey'];
$isObject = false;
$objects = array();
$key = $existsObjectList['idkey'];
$queryObjects = $this->dao->query($existsObjectList['sql']);
while($object = $queryObjects->fetch())
{
$objects[$object->$key] = $object;
if(!empty($preAndNextObject->pre) and is_numeric($preAndNextObject->pre) and $object->$key == $preAndNextObject->pre) $preAndNextObject->pre = $object;
if(!empty($preAndNextObject->next) and is_numeric($preAndNextObject->next) and $object->$key == $preAndNextObject->next) $preAndNextObject->next = $object;
if((empty($preAndNextObject->pre) or is_object($preAndNextObject->pre)) and (empty($preAndNextObject->next) or is_object($preAndNextObject->next))) break;
if((empty($preAndNextObject->pre) or is_object($preAndNextObject->pre)) and (empty($preAndNextObject->next) or is_object($preAndNextObject->next)))
{
$isObject = true;
break;
}
}
/* If the pre object or next object is number type, then continue to find the pre or next. */
if(!$isObject)
{
$objectIdList = array_keys($objects);
$objectIdIndex = array_search($objectID, $objectIdList);
if(is_numeric($preAndNextObject->pre))
{
$preAndNextObject->pre = $objectIdIndex - 1 >= 0 ? $objects[$objectIdList[$objectIdIndex - 1]] : '';
}
if(is_numeric($preAndNextObject->next))
{
$preAndNextObject->next = $objectIdIndex + 1 < count($objectIdList) ? $objects[$objectIdList[$objectIdIndex + 1]] : '';
}
}
}
}
+33 -3
View File
@@ -937,12 +937,10 @@ class convertModel extends model
->where('project')->in(array_values($projectRelation))
->fetchPairs();
$versionGroup = $method == 'db' ? $this->dao->dbh($this->sourceDBH)->select('SINK_NODE_ID as versionID, SOURCE_NODE_ID as issueID')->from(JIRA_NODEASSOCIATION)->where('SINK_NODE_ENTITY')->eq('Version')->fetchGroup('versionID') : $this->getVersionGroup();
$versionGroup = $method == 'db' ? $this->dao->dbh($this->sourceDBH)->select('SINK_NODE_ID as versionID, SOURCE_NODE_ID as issueID, ASSOCIATION_TYPE as relation')->from(JIRA_NODEASSOCIATION)->where('SINK_NODE_ENTITY')->eq('Version')->fetchGroup('versionID') : $this->getVersionGroup();
foreach($dataList as $data)
{
if(empty($data->RELEASEDATE)) continue;
$versionID = $data->ID;
$buildProject = $data->PROJECT;
$projectID = $projectRelation[$buildProject];
@@ -958,6 +956,38 @@ class convertModel extends model
$this->dao->dbh($this->dbh)->insert(TABLE_BUILD)->data($build)->exec();
$buildID = $this->dao->dbh($this->dbh)->lastInsertID();
/* Process build data. */
if(isset($versionGroup[$versionID]))
{
foreach($versionGroup[$versionID] as $issue)
{
$issueID = $method == 'db' ? $issue->issueID : $issue;
$issueType = zget($issueObjectType, $issueID, '');
if(!$issueType || ($issueType != 'story' and $issueType != 'bug')) continue;
$objectID = $issueType == 'bug' ? zget($issueBugs, $issueID) : zget($issueStories, $issueID);
$field = $issueType == 'story' ? 'stories' : 'bugs';
if($issueType == 'story')
{
$this->dao->dbh($this->dbh)->update(TABLE_BUILD)->set("stories = CONCAT(stories, ',$objectID')")->where('id')->eq($buildID)->exec();
}
else
{
$this->dao->dbh($this->dbh)->update(TABLE_BUILD)->set("bugs = CONCAT(bugs, ',$objectID')")->where('id')->eq($buildID)->exec();
if($issue->relation == 'IssueVersion')
{
$this->dao->dbh($this->dbh)->update(TABLE_BUG)->set('openedBuild')->eq($buildID)->where('id')->eq($objectID)->exec();
}
elseif($issue->relation == 'IssueFixVersion')
{
$this->dao->dbh($this->dbh)->update(TABLE_BUG)->set('resolvedBuild')->eq($buildID)->where('id')->eq($objectID)->exec();
}
}
}
}
if(empty($data->RELEASEDATE)) continue;
$release = new stdclass();
$release->product = $build->product;
$release->build = $buildID;
+2 -2
View File
@@ -144,10 +144,10 @@ js::set('hasTaskButton', $hasTaskButton);
{
$actions .= html::a('javascript:;', "<i class='icon icon-cog-outline'></i>" . $lang->kanban->setting, '', "data-toggle='dropdown' class='btn btn-link'");
$actions .= "<ul id='kanbanActionMenu' class='dropdown-menu pull-right'>";
$width = $this->app->getClientLang() == 'en' ? '70%' : '60%';
$width = $this->app->getClientLang() == 'en' ? '750' : '650';
if(common::hasPriv('kanban', 'createRegion')) $actions .= '<li>' . html::a(helper::createLink('kanban', 'createRegion', "kanbanID=$execution->id&from=execution", '', true), '<i class="icon icon-plus"></i>' . $lang->kanban->createRegion, '', "class='iframe btn btn-link text-left'") . '</li>';
if(common::hasPriv('kanban', 'setLaneHeight')) $actions .= '<li>' . html::a(helper::createLink('kanban', 'setLaneHeight', "kanbanID=$execution->id&from=execution", '', true), '<i class="icon icon-size-height"></i>' . $lang->kanban->laneHeight, '', "class='iframe btn btn-link text-left' data-width=$width") . '</li>';
if(common::hasPriv('kanban', 'setColumnWidth')) $actions .= '<li>' . html::a(helper::createLink('kanban', 'setColumnWidth', "kanbanID=$execution->id&from=execution", '', true), '<i class="icon icon-size-width"></i>' . $lang->kanban->columnWidth, '', "class='iframe btn btn-link text-left' data-width=30%") . '</li>';
if(common::hasPriv('kanban', 'setColumnWidth')) $actions .= '<li>' . html::a(helper::createLink('kanban', 'setColumnWidth', "kanbanID=$execution->id&from=execution", '', true), '<i class="icon icon-size-width"></i>' . $lang->kanban->columnWidth, '', "class='iframe btn btn-link text-left' data-width='400'") . '</li>';
$kanbanActions = '';
if(common::hasPriv('execution', 'edit')) $kanbanActions .= '<li>' . html::a(helper::createLink('execution', 'edit', "executionID=$execution->id", '', true), '<i class="icon icon-edit"></i>' . $lang->kanban->edit, '', "class='iframe btn btn-link text-left' data-width='75%'") . '</li>';
if(common::hasPriv('execution', 'start')) $kanbanActions .= '<li class="startButton hidden">' . html::a(helper::createLink('execution', 'start', "executionID=$execution->id&from=kanban", '', true), '<i class="icon icon-play"></i>' . $lang->execution->start, '', "class='iframe btn btn-link text-left' data-width='75%'") . '</li>';
+1 -1
View File
@@ -308,7 +308,7 @@
$lang->testcase->batchCreate = $lang->testcase->create;
if($productID and $hasDBPriv and common::hasPriv('testcase', 'create'))
{
echo html::a($this->createLink('testcase', 'create', "productID=$story->product&branch=$story->branch&moduleID=$story->module&form=&param=0&storyID=$story->id"), '<i class="icon-testcase-create icon-sitemap"></i>', '', "title='{$lang->testcase->create}' data-app='qa'");
echo html::a($this->createLink('testcase', 'create', "productID=$story->product&branch=$story->branch&moduleID=$story->module&form=&param=0&storyID=$story->id"), '<i class="icon-testcase-create icon-sitemap"></i>', '', "class='btn' title='{$lang->testcase->create}' data-app='qa'");
}
if($canBeChanged and common::hasPriv('execution', 'storyEstimate', $execution))
+4 -4
View File
@@ -2943,16 +2943,16 @@ class kanbanModel extends model
$actions .= "<a data-toggle='dropdown' $btnColor class='btn btn-link dropdown-toggle setting' type='button'>" . '<i class="icon icon-cog-outline"></i> ' . $this->lang->kanban->setting . '</a>';
$actions .= "<ul id='kanbanActionMenu' class='dropdown-menu text-left'>";
if(common::hasPriv('kanban', 'createRegion')) $actions .= '<li>' . html::a(helper::createLink('kanban', 'createRegion', "kanbanID=$kanban->id", '', true), '<i class="icon icon-plus"></i>' . $this->lang->kanban->createRegion, '', "class='iframe btn btn-link'") . '</li>';
$importWidth = $this->app->getClientLang() == 'en' ? '70%' : '50%';
$importWidth = $this->app->getClientLang() == 'en' ? '700' : '550';
if(common::hasPriv('kanban', 'import')) $actions .= '<li>' . html::a(helper::createLink('kanban', 'import', "kanbanID=$kanban->id", '', true), '<i class="icon icon-import"></i>' . $this->lang->kanban->import, '', "class='iframe btn btn-link' data-width=$importWidth") . '</li>';
if(common::hasPriv('kanban', 'enableArchived')) $actions .= '<li>' . html::a(helper::createLink('kanban', 'enableArchived', "kanbanID=$kanban->id", '', true), '<i class="icon icon-card-archive"></i>' . $this->lang->kanban->archived, '', "class='iframe btn btn-link' data-width=30%") . '</li>';
if(common::hasPriv('kanban', 'enableArchived')) $actions .= '<li>' . html::a(helper::createLink('kanban', 'enableArchived', "kanbanID=$kanban->id", '', true), '<i class="icon icon-card-archive"></i>' . $this->lang->kanban->archived, '', "class='iframe btn btn-link' data-width=400") . '</li>';
if($printSetHeightBtn)
{
$width = $this->app->getClientLang() == 'en' ? '70%' : '60%';
$width = $this->app->getClientLang() == 'en' ? '750' : '650';
$actions .= '<li>' . html::a(helper::createLink('kanban', 'setLaneHeight', "kanbanID=$kanban->id", '', true), '<i class="icon icon-size-height"></i>' . $this->lang->kanban->laneHeight, '', "class='iframe btn btn-link' data-width='$width'") . '</li>';
}
if(common::hasPriv('kanban', 'setColumnWidth')) $actions .= '<li>' . html::a(helper::createLink('kanban', 'setColumnWidth', "kanbanID=$kanban->id", '', true), '<i class="icon icon-size-width"></i>' . $this->lang->kanban->columnWidth, '', "class='iframe btn btn-link' data-width=30%") . '</li>';
if(common::hasPriv('kanban', 'setColumnWidth')) $actions .= '<li>' . html::a(helper::createLink('kanban', 'setColumnWidth', "kanbanID=$kanban->id", '', true), '<i class="icon icon-size-width"></i>' . $this->lang->kanban->columnWidth, '', "class='iframe btn btn-link' data-width=400") . '</li>';
if(common::hasPriv('kanban', 'performable')) $actions .= '<li>' . html::a(helper::createLink('kanban', 'performable', "kanbanID=$kanban->id", '', true), '<i class="icon icon-checked"></i>' . $this->lang->kanban->manageProgress, '', "class='iframe btn btn-link' data-width=40%") . '</li>';
$kanbanActions = '';
+1 -1
View File
@@ -67,7 +67,7 @@
}
else
{
echo html::select('users[]', $users, $list->userList, "multiple $readonly class='form-control chosen' data-drop_direction='down'");
echo html::select('users[]', $users, $list->userList, "multiple $readonly class='form-control picker' data-drop_direction='down'");
}
?>
</td>
+9
View File
@@ -749,6 +749,14 @@ class project extends control
$this->app->loadClass('pager', $static = true);
$pager = new pager(0, 30, 1);
/* Check exist extend fields. */
$isExtended = false;
if(!empty($this->config->bizVersion))
{
$extend = $this->loadModel('workflowaction')->getByModuleAndAction('project', 'view');
if(!empty($extend) and $extend->extensionType == 'extend') $isExtended = true;
}
$this->view->title = $this->lang->project->view;
$this->view->position = $this->lang->project->view;
$this->view->projectID = $projectID;
@@ -762,6 +770,7 @@ class project extends control
$this->view->planGroup = $this->loadModel('execution')->getPlans($products);
$this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($products), '', $linkedBranches);
$this->view->dynamics = $this->loadModel('action')->getDynamic('all', 'all', 'date_desc', $pager, 'all', $projectID);
$this->view->isExtended = $isExtended;
$this->display();
}
+1 -1
View File
@@ -125,7 +125,7 @@
<?php if(common::hasPriv('product', 'create')):?>
<span class='input-group-addon'>
<?php echo html::checkBox('newProduct', $lang->project->addProduct, '', "onchange=addNewProduct(this);");?>
<div><icon class='icon icon-help' data-toggle='popover' data-trigger='focus hover' data-placement='top' data-tip-class='text-muted popover-sm' data-content="<?php echo $lang->project->productTip;?>"></icon></div>
<div><icon class='icon icon-help' data-toggle='popover' data-trigger='focus hover' data-placement='left' data-tip-class='text-muted popover-sm' data-content="<?php echo $lang->project->productTip;?>"></icon></div>
</span>
<?php endif;?>
</div>
+2
View File
@@ -81,11 +81,13 @@
</div>
</div>
</div>
<?php if($isExtended):?>
<div class="col-sm-12">
<div class='panel'>
<?php $this->printExtendFields($project, 'div', "position=left&inForm=0");?>
</div>
</div>
<?php endif;?>
<div class="col-sm-12">
<?php $blockHistory = true;?>
<?php $actionFormLink = $this->createLink('action', 'comment', "objectType=project&objectID=$project->id");?>
+1 -1
View File
@@ -216,7 +216,7 @@ class testcase extends control
$this->view->browseType = $browseType;
$this->view->param = $param;
$this->view->cases = $cases;
$this->view->branch = $product->type == 'normal' ? 0 : $branch;
$this->view->branch = !empty($product) and $product->type != 'normal' ? $branch : 0;
$this->view->branchOption = $branchOption;
$this->view->branchTagOption = $branchTagOption;
$this->view->suiteList = $this->loadModel('testsuite')->getSuites($productID);
+2 -2
View File
@@ -58,7 +58,7 @@ class tree extends control
if(!empty($product->type) && $product->type != 'normal')
{
$branches = $this->loadModel('branch')->getPairs($product->id);
$branches = $this->loadModel('branch')->getPairs($product->id, 'withClosed');
if($currentModuleID)
{
$currentModuleBranch = $this->dao->select('branch')->from(TABLE_MODULE)->where('id')->eq($currentModuleID)->fetch('branch');
@@ -335,7 +335,7 @@ class tree extends control
if($showProduct)
{
$product = $this->loadModel('product')->getById($module->root);
if($product->type != 'normal') $this->view->branches = $this->loadModel('branch')->getPairs($module->root, 'active');
if($product->type != 'normal') $this->view->branches = $this->loadModel('branch')->getPairs($module->root, 'withClosed');
$this->view->product = $product;
$this->view->products = $this->product->getPairs('', $product->program);
}
+1 -1
View File
@@ -1666,7 +1666,7 @@ class treeModel extends model
if(!isset($_POST['branch'])) $module->branch = $self->branch;
$repeatName = $this->checkUnique($self, array("id{$self->id}" => $module->name), array("id{$self->id}" => $module->branch));
if($repeatName) return print(js::alert(sprintf($this->lang->tree->repeatName, $repeatName)));
if($repeatName) helper::end(js::alert(sprintf($this->lang->tree->repeatName, $repeatName)));
$parent = $this->getById($this->post->parent);
$childs = $this->getAllChildId($moduleID);
+1 -1
View File
@@ -160,7 +160,7 @@ function loadBranches(obj)
var $inputGroup = $(obj).closest('.input-group');
$inputGroup.find('#branch').remove();
$inputGroup.find('#branch_chosen').remove();
$.get(createLink('branch', 'ajaxGetBranches', "productID=" + productID), function(data)
$.get(createLink('branch', 'ajaxGetBranches', "productID=" + productID + "&oldBranch=0&param=withClosed"), function(data)
{
if(data)
{
+4 -9
View File
@@ -1179,10 +1179,11 @@ class user extends control
*
* @param int $contactListID
* @param string $dropdownName mailto|whitelist
* @param string $oldUsers
* @access public
* @return string
*/
public function ajaxGetContactUsers($contactListID, $dropdownName = 'mailto')
public function ajaxGetContactUsers($contactListID, $dropdownName = 'mailto', $oldUsers = '')
{
$list = $contactListID ? $this->user->getContactListByID($contactListID) : '';
@@ -1191,14 +1192,8 @@ class user extends control
$users = $this->user->getPairs('devfirst|nodeleted|noclosed', $list ? $list->userList : '', $this->config->maxCount);
if(isset($this->config->user->moreLink)) $this->config->moreLinks[$dropdownName . "[]"] = $this->config->user->moreLink;
if(!$contactListID)
{
return print(html::select($dropdownName . "[]", $users, '', "class='form-control chosen' multiple $attr"));
}
else
{
return print(html::select($dropdownName . "[]", $users, $list->userList, "class='form-control chosen' multiple $attr"));
}
$defaultUsers = empty($contactListID) ? '' : $list->userList . ',' . trim($oldUsers);
return print(html::select($dropdownName . "[]", $users, $defaultUsers, "class='form-control chosen' multiple $attr"));
}
/**
+215 -140
View File
@@ -96,13 +96,25 @@ class treeTest
return count($objects);
}
/**
* Test create an option menu of task in html.
*
* @param int $rootID
* @param int $productID
* @param int $startModule
* @param string $extra
* @access public
* @return string
*/
public function getTaskOptionMenuTest($rootID, $productID = 0, $startModule = 0, $extra = '')
{
$objects = $this->objectModel->getTaskOptionMenu($rootID, $productID = 0, $startModule = 0, $extra = '');
if(dao::isError()) return dao::getError();
return $objects;
$names = '';
foreach($objects as $object) $names .= ',' . $object;
return $names;
}
/**
@@ -129,87 +141,76 @@ class treeTest
return $objects;
}
public function getTreeMenuTest($rootID, $type = 'root', $startModule = 0, $userFunc = '', $extra = '', $branch = 0, $extraParams = '')
{
$objects = $this->objectModel->getTreeMenu($rootID, $type = 'root', $startModule = 0, $userFunc = '', $extra = '', $branch = 0, $extraParams = '');
if(dao::isError()) return dao::getError();
return $objects;
}
public function getTaskTreeMenuTest($rootID, $productID = 0, $startModule = 0, $userFunc = '', $extra = '')
{
$objects = $this->objectModel->getTaskTreeMenu($rootID, $productID = 0, $startModule = 0, $userFunc = '', $extra = '');
if(dao::isError()) return dao::getError();
return $objects;
}
/**
* Test get full task tree.
*
* @param int $rootID
* @param int $productID
* @access public
* @return string
*/
public function getTaskStructureTest($rootID, $productID = 0)
{
$objects = $this->objectModel->getTaskStructure($rootID, $productID = 0);
if(dao::isError()) return dao::getError();
return $objects;
$child = '';
foreach($objects as $object)
{
if(is_array($object)) $child .= isset($object['children']) ? $object['name'] . ':' . count($object['children']) . ';' : $object['name'] . ':0';
if(is_object($object)) $child .= isset($object->children) ? "$object->name:" . count($object->children) . ';' : "$object->name:0";
}
return $child;
}
/**
* Test get tree structure.
*
* @param int $rootID
* @param string $type
* @access public
* @return string
*/
public function getTreeStructureTest($rootID, $type)
{
$objects = $this->objectModel->getTreeStructure($rootID, $type);
if(dao::isError()) return dao::getError();
return $objects;
}
public function getBugTreeMenuTest($rootID, $productID = 0, $startModule = 0, $userFunc = '', $extra = '')
{
$objects = $this->objectModel->getBugTreeMenu($rootID, $productID = 0, $startModule = 0, $userFunc = '', $extra = '');
if(dao::isError()) return dao::getError();
return $objects;
}
public function getCaseTreeMenuTest($rootID, $productID = 0, $startModule = 0, $userFunc = '', $extra = '')
{
$objects = $this->objectModel->getCaseTreeMenu($rootID, $productID = 0, $startModule = 0, $userFunc = '', $extra = '');
if(dao::isError()) return dao::getError();
return $objects;
}
public function getProjectStoryTreeMenuTest($rootID, $startModule = 0, $userFunc = '')
{
$objects = $this->objectModel->getProjectStoryTreeMenu($rootID, $startModule = 0, $userFunc = '');
if(dao::isError()) return dao::getError();
return $objects;
}
public function buildTreeTest(& $treeMenu, $module, $type, $userFunc, $extra, $branch = 'all')
{
$objects = $this->objectModel->buildTree($treeMenu, $module, $type, $userFunc, $extra, $branch = 'all');
if(dao::isError()) return dao::getError();
return $objects;
$child = '';
foreach($objects as $object) $child .= isset($object->children) ? "$object->id:" . count($object->children) . ';' : "$object->id:0;";
return $child;
}
/**
* Test get execution modules.
*
* @param int $executionID
* @param bool $parent
* @param string $linkObject
* @access public
* @return string
*/
public function getTaskTreeModulesTest($executionID, $parent = false, $linkObject = 'story')
{
$objects = $this->objectModel->getTaskTreeModules($executionID, $parent = false, $linkObject = 'story');
$objects = $this->objectModel->getTaskTreeModules($executionID, $parent, $linkObject);
if(dao::isError()) return dao::getError();
return $objects;
$ids = '';
foreach($objects as $object) $ids .= ',' . $object;
return $ids;
}
/**
* Test create story link.
*
* @param int $moduleID
* @param array $extra
* @access public
* @return string
*/
public function createStoryLinkTest($moduleID, $extra = array())
{
$type = '';
@@ -224,15 +225,6 @@ class treeTest
return $string;
}
public function createLineLinkTest($moduleID, $extra)
{
$objects = $this->objectModel->createLineLink($type, $module, $extra);
if(dao::isError()) return dao::getError();
return $objects;
}
/**
* Test create task link.
*
@@ -255,15 +247,6 @@ class treeTest
return $string;
}
public function createProjectStoryLinkTest($type, $module, $extra)
{
$objects = $this->objectModel->createProjectStoryLink($type, $module, $extra);
if(dao::isError()) return dao::getError();
return $objects;
}
/**
* Test create requirment link.
*
@@ -285,15 +268,14 @@ class treeTest
return $string;
}
public function createDocLinkTest($type, $module, $extra = '')
{
$objects = $this->objectModel->createDocLink($type, $module, $extra = '');
if(dao::isError()) return dao::getError();
return $objects;
}
/**
* Test create manage link.
*
* @param int $moduleID
* @param array $extra
* @access public
* @return string
*/
public function createManageLinkTest($moduleID, $extra)
{
$type = 0;
@@ -306,6 +288,14 @@ class treeTest
return substr($link, 0, 15);
}
/**
* Test create task manage link.
*
* @param int $moduleID
* @param array $extra
* @access public
* @return string
*/
public function createTaskManageLinkTest($moduleID, $extra)
{
$type = '';
@@ -406,15 +396,6 @@ class treeTest
return $string;
}
public function createBranchLinkTest($type, $rootID, $branchID, $branch)
{
$objects = $this->objectModel->createBranchLink($type, $rootID, $branchID, $branch);
if(dao::isError()) return dao::getError();
return $objects;
}
/**
* Test create feedback link.
*
@@ -436,49 +417,45 @@ class treeTest
return $string;
}
public function createTrainSkillLinkTest($type, $module, $extra = '')
{
$objects = $this->objectModel->createTrainSkillLink($type, $module, $extra = '');
if(dao::isError()) return dao::getError();
return $objects;
}
public function createTrainCourseLinkTest($type, $module, $extra = '')
{
$objects = $this->objectModel->createTrainCourseLink($type, $module, $extra = '');
if(dao::isError()) return dao::getError();
return $objects;
}
public function createTrainPostLinkTest($type, $module, $extra = '')
{
$objects = $this->objectModel->createTrainPostLink($type, $module, $extra = '');
if(dao::isError()) return dao::getError();
return $objects;
}
/**
* Test get sons of a module.
*
* @param int $rootID
* @param int $moduleID
* @param string $type
* @param int $branch
* @access public
* @return string
*/
public function getSonsTest($rootID, $moduleID, $type = 'root', $branch = 0)
{
$objects = $this->objectModel->getSons($rootID, $moduleID, $type = 'root', $branch = 0);
$objects = $this->objectModel->getSons($rootID, $moduleID, $type, $branch);
if(dao::isError()) return dao::getError();
return $objects;
$ids = '';
foreach($objects as $object) $ids .= ',' . $object->id;
return $ids;
}
/**
* Test get sons of a task module.
*
* @param int $rootID
* @param int $productID
* @param int $moduleID
* @access public
* @return string
*/
public function getTaskSonsTest($rootID, $productID, $moduleID)
{
$objects = $this->objectModel->getTaskSons($rootID, $productID, $moduleID);
if(dao::isError()) return dao::getError();
return $objects;
$ids = '';
foreach($objects as $object) $ids .= ',' . $object->id;
return $ids;
}
/**
@@ -499,13 +476,23 @@ class treeTest
return $ids;
}
/**
* Test get project module.
*
* @param int $projectID
* @param int $productID
* @access public
* @return string
*/
public function getProjectModuleTest($projectID, $productID = 0)
{
$objects = $this->objectModel->getProjectModule($projectID, $productID = 0);
$objects = $this->objectModel->getProjectModule($projectID, $productID);
if(dao::isError()) return dao::getError();
return $objects;
$ids = '';
foreach($objects as $objectID) $ids .= ',' . $objectID;
return $ids;
}
/**
@@ -542,13 +529,20 @@ class treeTest
return $object;
}
/**
* Test get the module that its type == 'story'.
*
* @param int $moduleID
* @access public
* @return int
*/
public function getStoryModuleTest($moduleID)
{
$objects = $this->objectModel->getStoryModule($moduleID);
$object = $this->objectModel->getStoryModule($moduleID);
if(dao::isError()) return dao::getError();
return $objects;
return $object;
}
/**
@@ -569,31 +563,86 @@ class treeTest
return $objects;
}
/**
* Test update modules' order.
*
* @param array $orders
* @access public
* @return string
*/
public function updateOrderTest($orders)
{
$objects = $this->objectModel->updateOrder($orders);
if(dao::isError()) return dao::getError();
return $objects;
global $tester;
$objects = $tester->dao->select('*')->from(TABLE_MODULE)->where('id')->in(array_keys($orders))->orderBy('`order` asc')->fetchAll();
$ids = '';
foreach($objects as $object) $ids .= ',' . $object->id;
return $ids;
}
public function manageChildTest($rootID, $type)
/**
* Test manage childs of a module.
*
* @param int $rootID
* @param string $type
* @param array $param
* @access public
* @return string
*/
public function manageChildTest($rootID, $type, $param)
{
$objects = $this->objectModel->manageChild($rootID, $type);
$_POST['allProduct'] = 100;
$_POST['productModule'] = 0;
foreach($param as $key => $value) $_POST[$key] = $value;
$this->objectModel->manageChild($rootID, $type);
unset($_POST);
if(dao::isError()) return dao::getError();
return $objects;
global $tester;
$objects = $tester->dao->select('*')->from(TABLE_MODULE)->where('parent')->eq($param['parentModuleID'])->andWhere('deleted')->eq(0)->fetchAll();
$names = '';
foreach($objects as $object) $names .= ',' . $object->name;
return $names;
}
public function updateTest($moduleID)
/**
* Test update a module.
*
* @param int $moduleID
* @param array $param
* @access public
* @return object
*/
public function updateTest($moduleID, $param)
{
$objects = $this->objectModel->update($moduleID);
$fields = array('root', 'branch', 'parent', 'name', 'short');
$module = $this->objectModel->getByID($moduleID);
foreach($fields as $field)
{
if(isset($param[$field]))
{
$_POST[$field] = $param[$field];
}
else
{
$_POST[$field] = $module->$field;
}
}
$this->objectModel->update($moduleID);
if(dao::isError()) return dao::getError();
return $objects;
$object = $this->objectModel->getByID($moduleID);
return $object;
}
/**
@@ -675,22 +724,42 @@ class treeTest
return $repeatName;
}
/**
* Test check merge module version.
*
* @param int $rootID
* @param string $viewType
* @access public
* @return int
*/
public function isMergeModuleTest($rootID, $viewType)
{
$objects = $this->objectModel->isMergeModule($rootID, $viewType);
$object = $this->objectModel->isMergeModule($rootID, $viewType);
if(dao::isError()) return dao::getError();
return $objects;
return $object ? 1 : 2;
}
/**
* Test get full trees.
*
* @param int $rootID
* @param string $viewType
* @param string $branchID
* @param int $currentModuleID
* @access public
* @return string
*/
public function getProductStructureTest($rootID, $viewType, $branchID = 'all', $currentModuleID = 0)
{
$objects = $this->objectModel->getProductStructure($rootID, $viewType, $branchID = 'all', $currentModuleID = 0);
$objects = $this->objectModel->getProductStructure($rootID, $viewType, $branchID, $currentModuleID);
if(dao::isError()) return dao::getError();
return $objects;
$child = '';
foreach($objects as $object) $child .= isset($object->children) ? "$object->id:" . count($object->children) . ';' : "$object->id:0;";
return $child;
}
/**
@@ -717,6 +786,12 @@ class treeTest
return $child;
}
/**
* Test get all doc structure.
*
* @access public
* @return string
*/
public function getDocStructureTest()
{
$objects = $this->objectModel->getDocStructure();
+2 -2
View File
@@ -14,7 +14,7 @@ pid=1
测试正常批量创建bug2 >> 批量bug五,trunk,codeerror,3,3,1,101
测试正常批量创建bug3 >> 批量bug九,1,config,3,3,1,0
测试短时间内重复批量创建bug >> 0
测试异常创建bug >> <html><meta charset='utf-8'/><style>body{background:white}</style><script>alert('『影响版本』不能为空。')
测试异常创建bug >> 『影响版本』不能为空。
*/
@@ -43,6 +43,6 @@ r($bug->batchCreateObject($productID, $normal_create1)) && p('0:title,openedBu
r($bug->batchCreateObject($productID, $normal_create2)) && p('1:title,openedBuild,type,severity,pri,product,execution') && e('批量bug五,trunk,codeerror,3,3,1,101'); // 测试正常批量创建bug2
r($bug->batchCreateObject($productID, $normal_create3)) && p('2:title,openedBuild,type,severity,pri,product,execution') && e('批量bug九,1,config,3,3,1,0'); // 测试正常批量创建bug3
r($bug->batchCreateObject($productID, $normal_create1)) && p() && e('0'); // 测试短时间内重复批量创建bug
r($bug->batchCreateObject($productID, $exception_create)) && p() && e("<html><meta charset='utf-8'/><style>body{background:white}</style><script>alert('『影响版本』不能为空。')"); // 测试异常创建bug
r($bug->batchCreateObject($productID, $exception_create)) && p('message:0') && e("『影响版本』不能为空。"); // 测试异常创建bug
system("./ztest init");
+12 -12
View File
@@ -10,12 +10,12 @@ title=bugModel->checkDelayedBugs();
cid=1
pid=1
检查deadline在resolvedDate前 状态为未解决的bug是否延期 >> 35,33,31
检查deadline在resolvedDate后 状态为未解决的bug是否延期 >> 0,0,0
检查deadline在resolvedDate前 状态为已解决的bug是否延期 >> 10,8,6
检查deadline在resolvedDate后 状态为已解决的bug是否延期 >> 0,0,0
检查deadline在resolvedDate前 状态为已关闭的bug是否延期 >> 6,4,2
检查deadline在resolvedDate后 状态为已关闭的bug是否延期 >> 0,0,0
检查deadline在resolvedDate前 状态为未解决的bug是否延期 >> 38,36,34,31,21,20,19,18,17
检查deadline在resolvedDate后 状态为未解决的bug是否延期 >> 2,0,0,25
检查deadline在resolvedDate前 状态为已解决的bug是否延期 >> 16,14,12
检查deadline在resolvedDate后 状态为已解决的bug是否延期 >> 4,2,0
检查deadline在resolvedDate前 状态为已关闭的bug是否延期 >> 15,13,11
检查deadline在resolvedDate后 状态为已关闭的bug是否延期 >> 6,4,2
@@ -24,9 +24,9 @@ pid=1
$productIDList = array('1', '7','18', '20', '28', '33');
$bug = new bugTest();
r($bug->checkDelayedBugsTest($productIDList[0])) && p('delay') && e('35,33,31'); // 检查deadline在resolvedDate前 状态为未解决的bug是否延期
r($bug->checkDelayedBugsTest($productIDList[1])) && p('delay') && e('0,0,0'); // 检查deadline在resolvedDate后 状态为未解决的bug是否延期
r($bug->checkDelayedBugsTest($productIDList[2])) && p('delay') && e('10,8,6'); // 检查deadline在resolvedDate前 状态为已解决的bug是否延期
r($bug->checkDelayedBugsTest($productIDList[3])) && p('delay') && e('0,0,0'); // 检查deadline在resolvedDate后 状态为已解决的bug是否延期
r($bug->checkDelayedBugsTest($productIDList[4])) && p('delay') && e('6,4,2'); // 检查deadline在resolvedDate前 状态为已关闭的bug是否延期
r($bug->checkDelayedBugsTest($productIDList[5])) && p('delay') && e('0,0,0'); // 检查deadline在resolvedDate后 状态为已关闭的bug是否延期
r($bug->checkDelayedBugsTest($productIDList[0])) && p('delay') && e('38,36,34,31,21,20,19,18,17'); // 检查deadline在resolvedDate前 状态为未解决的bug是否延期
r($bug->checkDelayedBugsTest($productIDList[1])) && p('delay') && e('2,0,0,25'); // 检查deadline在resolvedDate后 状态为未解决的bug是否延期
r($bug->checkDelayedBugsTest($productIDList[2])) && p('delay') && e('16,14,12'); // 检查deadline在resolvedDate前 状态为已解决的bug是否延期
r($bug->checkDelayedBugsTest($productIDList[3])) && p('delay') && e('4,2,0'); // 检查deadline在resolvedDate后 状态为已解决的bug是否延期
r($bug->checkDelayedBugsTest($productIDList[4])) && p('delay') && e('15,13,11'); // 检查deadline在resolvedDate前 状态为已关闭的bug是否延期
r($bug->checkDelayedBugsTest($productIDList[5])) && p('delay') && e('6,4,2'); // 检查deadline在resolvedDate后 状态为已关闭的bug是否延期
+11 -11
View File
@@ -12,7 +12,7 @@ pid=1
确认指派人变化的bug >> assignedTo,admin,user92;confirmed,0,1
确认类型变化的bug >> type,install,codeerror;confirmed,0,1
确认已确认的bug >> 0
确认已确认的bug >> assignedTo,admin,user95
确认优先级变化的bug >> status,resolved,active;pri,3,2
确认bug >> status,closed,active
@@ -20,16 +20,16 @@ pid=1
$bugIDlist = array('1','3','4','51','81');
$bug1 = array('assignedTo' => 'user92', 'status' => 'active', 'type' => 'codeerror', 'pri' => '1');
$bug3 = array('assignedTo' => 'admin' , 'status' => 'active', 'type' => 'codeerror', 'pri' => '3');
$bug4 = array('assignedTo' => 'admin' , 'status' => 'active', 'type' => 'security', 'pri' => '4');
$bug51 = array('assignedTo' => 'dev1' , 'status' => 'active', 'type' => 'standard', 'pri' => '2');
$bug81 = array('assignedTo' => 'test1' , 'status' => 'active', 'type' => 'others', 'pri' => '1');
$bug1 = array('assignedTo' => 'user92', 'status' => 'active', 'type' => 'codeerror', 'pri' => '1');
$bug3 = array('assignedTo' => 'admin' , 'status' => 'active', 'type' => 'codeerror', 'pri' => '3');
$bug4 = array('assignedTo' => 'user95' , 'status' => 'active', 'type' => 'security', 'pri' => '4');
$bug5 = array('assignedTo' => 'dev1' , 'status' => 'active', 'type' => 'standard', 'pri' => '2');
$bug8 = array('assignedTo' => 'test1' , 'status' => 'active', 'type' => 'others', 'pri' => '1');
$bug = new bugTest();
r($bug->confirmTest($bugIDlist[0],$bug1)) && p('0:field,old,new;1:field,old,new') && e('assignedTo,admin,user92;confirmed,0,1'); // 确认指派人变化的bug
r($bug->confirmTest($bugIDlist[1],$bug3)) && p('0:field,old,new;1:field,old,new') && e('assignedTo,admin,user94;confirmed,0,1'); // 确认类型变化的bug
r($bug->confirmTest($bugIDlist[2],$bug4)) && p('0:field,old,new') && e('assignedTo,admin,user95'); // 确认已确认的bug
r($bug->confirmTest($bugIDlist[3],$bug51)) && p('0:field,old,new;1:field,old,new') && e('assignedTo,dev1,user96;pri,3,2'); // 确认优先级变化的bug
r($bug->confirmTest($bugIDlist[4],$bug81)) && p('0:field,old,new') && e('assignedTo,test1,user97'); // 确认bug
r($bug->confirmTest($bugIDlist[0],$bug1)) && p('0:field,old,new;1:field,old,new') && e('assignedTo,admin,user92;confirmed,0,1'); // 确认指派人变化的bug
r($bug->confirmTest($bugIDlist[1],$bug3)) && p('0:field,old,new;1:field,old,new') && e('type,install,codeerror;confirmed,0,1'); // 确认类型变化的bug
r($bug->confirmTest($bugIDlist[2],$bug4)) && p('0:field,old,new') && e('assignedTo,admin,user95'); // 确认已确认的bug
r($bug->confirmTest($bugIDlist[3],$bug5)) && p('0:field,old,new;1:field,old,new') && e('status,resolved,active;;pri,3,2'); // 确认优先级变化的bug
r($bug->confirmTest($bugIDlist[4],$bug8)) && p('0:field,old,new') && e('status,closed,active'); // 确认bug
system("./ztest init");
+2 -2
View File
@@ -10,7 +10,7 @@ cid=1
pid=1
测试获取用户admin的bug >> 85
测试获取用户test1的bug >> 85
测试获取用户test1的bug >> 65
测试获取用户test2的bug >> 0
测试获取用户dev1的bug >> 55
测试获取用户po1的bug >> 0
@@ -22,7 +22,7 @@ $accountIDList = array('admin', 'test1', 'test2', 'dev1', 'po1');
$bug=new bugTest();
r($bug->getUserBugPairsTest($accountIDList[0])) && p() && e('85'); // 测试获取用户admin的bug
r($bug->getUserBugPairsTest($accountIDList[1])) && p() && e('55'); // 测试获取用户test1的bug
r($bug->getUserBugPairsTest($accountIDList[1])) && p() && e('65'); // 测试获取用户test1的bug
r($bug->getUserBugPairsTest($accountIDList[2])) && p() && e('0'); // 测试获取用户test2的bug
r($bug->getUserBugPairsTest($accountIDList[3])) && p() && e('55'); // 测试获取用户dev1的bug
r($bug->getUserBugPairsTest($accountIDList[4])) && p() && e('0'); // 测试获取用户po1的bug
+7 -7
View File
@@ -9,7 +9,7 @@ title=bugModel->processBuildForBugs();
cid=1
pid=1
测试处理bug1 2 3的openedBuild resolvedBuild字段 >> 产品1正常的发布1,;0,;产品1正常的发布1,
测试处理bug1 2 3的openedBuild resolvedBuild字段 >> 产品发布9,;0,;产品发布9,
测试处理bug4 5 6的openedBuild resolvedBuild字段 >> 主干,;主干,;主干,
测试处理bug51 52 53的openedBuild resolvedBuild字段 >> 主干,;主干,;主干,
测试处理bug54 55 56的openedBuild resolvedBuild字段 >> 主干,;主干,;主干,主干
@@ -28,9 +28,9 @@ $bugIDList5 = array('81', '82', '83');
$bugIDList6 = array('84', '85', '86');
$bug=new bugTest();
r($bug->processBuildForBugsTest($bugIDList1)) && p('1:openedBuild,resolvedBuild;2:openedBuild,resolvedBuild;3:openedBuild,resolvedBuild') && e('产品1正常的发布1,;0,;产品1正常的发布1,'); // 测试处理bug1 2 3的openedBuild resolvedBuild字段
r($bug->processBuildForBugsTest($bugIDList2)) && p('4:openedBuild,resolvedBuild;5:openedBuild,resolvedBuild;6:openedBuild,resolvedBuild') && e('主干,;主干,;主干,'); // 测试处理bug4 5 6的openedBuild resolvedBuild字段
r($bug->processBuildForBugsTest($bugIDList3)) && p('51:openedBuild,resolvedBuild;52:openedBuild,resolvedBuild;53:openedBuild,resolvedBuild') && e('主干,;主干,;主干,'); // 测试处理bug51 52 53的openedBuild resolvedBuild字段
r($bug->processBuildForBugsTest($bugIDList4)) && p('54:openedBuild,resolvedBuild;55:openedBuild,resolvedBuild;56:openedBuild,resolvedBuild') && e('主干,;主干,;主干,主干'); // 测试处理bug54 55 56的openedBuild resolvedBuild字段
r($bug->processBuildForBugsTest($bugIDList5)) && p('81:openedBuild,resolvedBuild;82:openedBuild,resolvedBuild;83:openedBuild,resolvedBuild') && e('主干,;主干,;主干,'); // 测试处理bug81 82 83的openedBuild resolvedBuild字段
r($bug->processBuildForBugsTest($bugIDList6)) && p('84:openedBuild,resolvedBuild;85:openedBuild,resolvedBuild;86:openedBuild,resolvedBuild') && e('主干,;主干,;主干,'); // 测试处理bug84 85 86的openedBuild resolvedBuild字段
r($bug->processBuildForBugsTest($bugIDList1)) && p('1:openedBuild,resolvedBuild;2:openedBuild,resolvedBuild;3:openedBuild,resolvedBuild') && e('产品发布9,;0,;产品发布9,'); // 测试处理bug1 2 3的openedBuild resolvedBuild字段
r($bug->processBuildForBugsTest($bugIDList2)) && p('4:openedBuild,resolvedBuild;5:openedBuild,resolvedBuild;6:openedBuild,resolvedBuild') && e('主干,;主干,;主干,'); // 测试处理bug4 5 6的openedBuild resolvedBuild字段
r($bug->processBuildForBugsTest($bugIDList3)) && p('51:openedBuild,resolvedBuild;52:openedBuild,resolvedBuild;53:openedBuild,resolvedBuild') && e('主干,;主干,;主干,'); // 测试处理bug51 52 53的openedBuild resolvedBuild字段
r($bug->processBuildForBugsTest($bugIDList4)) && p('54:openedBuild,resolvedBuild;55:openedBuild,resolvedBuild;56:openedBuild,resolvedBuild') && e('主干,;主干,;主干,主干'); // 测试处理bug54 55 56的openedBuild resolvedBuild字段
r($bug->processBuildForBugsTest($bugIDList5)) && p('81:openedBuild,resolvedBuild;82:openedBuild,resolvedBuild;83:openedBuild,resolvedBuild') && e('主干,;主干,;主干,'); // 测试处理bug81 82 83的openedBuild resolvedBuild字段
r($bug->processBuildForBugsTest($bugIDList6)) && p('84:openedBuild,resolvedBuild;85:openedBuild,resolvedBuild;86:openedBuild,resolvedBuild') && e('主干,;主干,;主干,'); // 测试处理bug84 85 86的openedBuild resolvedBuild字段
+2 -2
View File
@@ -16,6 +16,6 @@ $type = array('bug', 'case', 'task');
$tree = new treeTest();
r($tree->getAllModulePairsTest()) && p() && e('3601'); // 测试获取默认(task)的模块信息
r($tree->getAllModulePairsTest($type[0])) && p() && e('1201'); // 测试获取默认(task)的模块信息
r($tree->getAllModulePairsTest($type[1])) && p() && e('1201'); // 测试获取默认(task)的模块信息
r($tree->getAllModulePairsTest($type[0])) && p() && e('1501'); // 测试获取默认(task)的模块信息
r($tree->getAllModulePairsTest($type[1])) && p() && e('1501'); // 测试获取默认(task)的模块信息
r($tree->getAllModulePairsTest($type[2])) && p() && e('3601'); // 测试获取默认(task)的模块信息
+30
View File
@@ -0,0 +1,30 @@
#!/usr/bin/env php
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
include dirname(dirname(dirname(__FILE__))) . '/class/tree.class.php';
su('admin');
/**
title=测试 treeModel->getProductStructure();
cid=1
pid=1
*/
$root = array(1, 2, 3, 41, 42, 43, 101, 102, 103);
$type = array('story', 'task', 'doc');
$tree = new treeTest();
r($tree->getProductStructureTest($root[0], $type[0])) && p() && e('1821:2;2221:2;1822:0;2222:0;1823:0;2223:0;1824:0;2224:0;'); // 测试获取 root 1 type story 的树结构
r($tree->getProductStructureTest($root[1], $type[0])) && p() && e('1825:2;2225:2;1826:0;2226:0;1827:0;2227:0;1828:0;2228:0;'); // 测试获取 root 2 type story 的树结构
r($tree->getProductStructureTest($root[2], $type[0])) && p() && e('1831:0;2231:0;1832:0;2232:0;1829:2;2229:2;1830:0;2230:0;'); // 测试获取 root 3 type story 的树结构
r($tree->getProductStructureTest($root[3], $type[0])) && p() && e('1981:2;2381:2;1982:0;2382:0;1983:0;2383:0;1984:0;2384:0;'); // 测试获取 root 41 type story 的树结构
r($tree->getProductStructureTest($root[4], $type[0])) && p() && e('1985:2;2385:2;1986:0;2386:0;1987:0;2387:0;1988:0;2388:0;'); // 测试获取 root 42 type story 的树结构
r($tree->getProductStructureTest($root[5], $type[0])) && p() && e('1991:0;2391:0;1992:0;2392:0;1989:2;2389:2;1990:0;2390:0;'); // 测试获取 root 43 type story 的树结构
r($tree->getProductStructureTest($root[6], $type[1])) && p() && e('0'); // 测试获取 root 101 type task 的树结构
r($tree->getProductStructureTest($root[7], $type[1])) && p() && e('0'); // 测试获取 root 102 type task 的树结构
r($tree->getProductStructureTest($root[8], $type[1])) && p() && e('0'); // 测试获取 root 103 type task 的树结构
r($tree->getProductStructureTest($root[0], $type[2])) && p() && e('3621:2;'); // 测试获取 root 1 type doc 的树结构
r($tree->getProductStructureTest($root[1], $type[2])) && p() && e('3622:2;'); // 测试获取 root 2 type doc 的树结构
r($tree->getProductStructureTest($root[2], $type[2])) && p() && e('3623:2;'); // 测试获取 root 3 type doc 的树结构
+24
View File
@@ -0,0 +1,24 @@
#!/usr/bin/env php
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
include dirname(dirname(dirname(__FILE__))) . '/class/tree.class.php';
su('admin');
/**
title=测试 treeModel->getProjectModule();
cid=1
pid=1
*/
$projectID = 1;
$productID = array(1, 2, 3, 4, 5, 6);
$tree = new treeTest();
r($tree->getProjectModuleTest($projectID, $productID[0])) && p() && e(',1821,2621,2622,1822,1823,1824,2221,2821,2822,2222,2223,2224'); // 测试获取项目模块 1
r($tree->getProjectModuleTest($projectID, $productID[1])) && p() && e(',1825,2623,2624,1826,1827,1828,2225,2823,2824,2226,2227,2228'); // 测试获取项目模块 2
r($tree->getProjectModuleTest($projectID, $productID[2])) && p() && e(',1829,2625,2626,1830,1831,1832,2229,2825,2826,2230,2231,2232'); // 测试获取项目模块 3
r($tree->getProjectModuleTest($projectID, $productID[3])) && p() && e(',1833,2627,2628,1834,1835,1836,2233,2827,2828,2234,2235,2236'); // 测试获取项目模块 4
r($tree->getProjectModuleTest($projectID, $productID[4])) && p() && e(',1837,2629,2630,1838,1839,1840,2237,2829,2830,2238,2239,2240'); // 测试获取项目模块 5
r($tree->getProjectModuleTest($projectID, $productID[5])) && p() && e(',1841,2631,2632,1842,1843,1844,2241,2831,2832,2242,2243,2244'); // 测试获取项目模块 6
+38
View File
@@ -0,0 +1,38 @@
#!/usr/bin/env php
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
include dirname(dirname(dirname(__FILE__))) . '/class/tree.class.php';
su('admin');
/**
title=测试 treeModel->getSons();
cid=1
pid=1
*/
$root = array(1, 2, 41, 42, 101, 102);
$module = array(1821, 1825, 1981, 1982, 1985, 1987, 21, 24, 3621, 3622);
$type = array('story', 'task', 'doc');
$branch = array(0, 1, 2);
$tree = new treeTest();
r($tree->getSonsTest($root[0], $module[0], $type[0], $branch[0])) && p() && e(',2621,2622'); // 测试获取root 1 module 1821 type story branch 0 的子module
r($tree->getSonsTest($root[1], $module[1], $type[0], $branch[0])) && p() && e(',2623,2624'); // 测试获取root 2 module 1822 type story branch 0 的子module
r($tree->getSonsTest($root[2], $module[2], $type[0], $branch[0])) && p() && e(',2701,2702'); // 测试获取root 41 module 1981 type story branch 0 的子module
r($tree->getSonsTest($root[2], $module[2], $type[0], $branch[1])) && p() && e(',2701,2702'); // 测试获取root 41 module 1981 type story branch 1 的子module
r($tree->getSonsTest($root[2], $module[2], $type[0], $branch[2])) && p() && e(',2701,2702'); // 测试获取root 41 module 1981 type story branch 2 的子module
r($tree->getSonsTest($root[2], $module[3], $type[0], $branch[0])) && p() && e('0'); // 测试获取root 41 module 1982 type story branch 0 的子module
r($tree->getSonsTest($root[2], $module[3], $type[0], $branch[1])) && p() && e('0'); // 测试获取root 41 module 1982 type story branch 1 的子module
r($tree->getSonsTest($root[2], $module[3], $type[0], $branch[2])) && p() && e('0'); // 测试获取root 41 module 1982 type story branch 2 的子module
r($tree->getSonsTest($root[3], $module[4], $type[0], $branch[0])) && p() && e(',2703,2704'); // 测试获取root 42 module 1985 type story branch 0 的子module
r($tree->getSonsTest($root[3], $module[4], $type[0], $branch[1])) && p() && e(',2703,2704'); // 测试获取root 42 module 1985 type story branch 1 的子module
r($tree->getSonsTest($root[3], $module[4], $type[0], $branch[2])) && p() && e(',2703,2704'); // 测试获取root 42 module 1985 type story branch 2 的子module
r($tree->getSonsTest($root[3], $module[5], $type[0], $branch[0])) && p() && e('0'); // 测试获取root 42 module 1987 type story branch 0 的子module
r($tree->getSonsTest($root[3], $module[5], $type[0], $branch[1])) && p() && e('0'); // 测试获取root 42 module 1987 type story branch 1 的子module
r($tree->getSonsTest($root[3], $module[5], $type[0], $branch[2])) && p() && e('0'); // 测试获取root 42 module 1987 type story branch 2 的子module
r($tree->getSonsTest($root[4], $module[6], $type[1], $branch[0])) && p() && e(',3021'); // 测试获取root 101 module 21 type task branch 0 的子module
r($tree->getSonsTest($root[5], $module[7], $type[1], $branch[0])) && p() && e('0'); // 测试获取root 102 module 22 type task branch 0 的子module
r($tree->getSonsTest($root[0], $module[8], $type[2], $branch[0])) && p() && e(',3721,3722'); // 测试获取root 1 module 3621 type doc branch 0 的子module
r($tree->getSonsTest($root[1], $module[9], $type[2], $branch[0])) && p() && e(',3723,3724'); // 测试获取root 2 module 3621 type doc branch 0 的子module
+25
View File
@@ -0,0 +1,25 @@
#!/usr/bin/env php
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
include dirname(dirname(dirname(__FILE__))) . '/class/tree.class.php';
su('admin');
/**
title=测试 treeModel->getStoryModule();
cid=1
pid=1
*/
$moduleID = array(1821, 1822, 1982, 1983, 2621, 2622, 21, 3021);
$tree = new treeTest();
r($tree->getStoryModuleTest($moduleID[0])) && p() && e('1821'); // 测试获取module 1821 的story模块
r($tree->getStoryModuleTest($moduleID[1])) && p() && e('1822'); // 测试获取module 1822 的story模块
r($tree->getStoryModuleTest($moduleID[2])) && p() && e('1982'); // 测试获取module 1982 的story模块
r($tree->getStoryModuleTest($moduleID[3])) && p() && e('1983'); // 测试获取module 1983 的story模块
r($tree->getStoryModuleTest($moduleID[4])) && p() && e('2621'); // 测试获取module 2621 的story模块
r($tree->getStoryModuleTest($moduleID[5])) && p() && e('2622'); // 测试获取module 2622 的story模块
r($tree->getStoryModuleTest($moduleID[6])) && p() && e('0'); // 测试获取module 21 的story模块
r($tree->getStoryModuleTest($moduleID[7])) && p() && e('0'); // 测试获取module 3021 的story模块
+32
View File
@@ -0,0 +1,32 @@
#!/usr/bin/env php
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
include dirname(dirname(dirname(__FILE__))) . '/class/tree.class.php';
su('admin');
/**
title=测试 treeModel->getTaskOptionMenu();
cid=1
pid=1
*/
$root = array(1, 2, 3, 41, 42, 43, 101, 102, 103);
$productID = 1;
$startModule = 3021;
$extra = 'allModule';
$tree = new treeTest();
r($tree->getTaskOptionMenuTest($root[0])) && p() && e(',/'); // 测试获取 root 1 task目录
r($tree->getTaskOptionMenuTest($root[1])) && p() && e(',/'); // 测试获取 root 2 task目录
r($tree->getTaskOptionMenuTest($root[2])) && p() && e(',/'); // 测试获取 root 3 task目录
r($tree->getTaskOptionMenuTest($root[3])) && p() && e(',/,/已关闭的正常产品31/产品模块122,/已关闭的正常产品31/产品模块124'); // 测试获取 root 41 task目录
r($tree->getTaskOptionMenuTest($root[4])) && p() && e(',/,/已关闭的正常产品32/产品模块126,/已关闭的正常产品32/产品模块128'); // 测试获取 root 42 task目录
r($tree->getTaskOptionMenuTest($root[5])) && p() && e(',/,/已关闭的正常产品33/产品模块132,/已关闭的正常产品33/产品模块130'); // 测试获取 root 43 task目录
r($tree->getTaskOptionMenuTest($root[6])) && p() && e(',/,/正常产品1/产品模块2,/正常产品1/产品模块4,/模块1,/模块1/执行子模块1,/模块2,/模块3'); // 测试获取 root 101 task目录
r($tree->getTaskOptionMenuTest($root[6], $productID)) && p() && e(',/,/正常产品1/产品模块2,/正常产品1/产品模块4,/模块1,/模块1/执行子模块1,/模块2,/模块3'); // 测试获取 root 101 product 1 task目录
r($tree->getTaskOptionMenuTest($root[6], $productID, $startModule)) && p() && e(',/,/正常产品1/产品模块2,/正常产品1/产品模块4,/模块1,/模块1/执行子模块1,/模块2,/模块3'); // 测试获取 root 101 product 1 startModule 3021 task目录
r($tree->getTaskOptionMenuTest($root[6], $productID, $startModule, $extra)) && p() && e(',/,/正常产品1/产品模块2,/正常产品1/产品模块4,/模块1,/模块1/执行子模块1,/模块2,/模块3'); // 测试获取 root 101 product 1 startModule 3021 allModule task目录
r($tree->getTaskOptionMenuTest($root[7])) && p() && e(',/,/正常产品2/产品模块6,/正常产品2/产品模块8,/模块4,/模块5,/模块6'); // 测试获取 root 102 task目录
r($tree->getTaskOptionMenuTest($root[8])) && p() && e(',/,/正常产品3/产品模块12,/正常产品3/产品模块10,/模块7,/模块8,/模块9'); // 测试获取 root 103 task目录
+43
View File
@@ -0,0 +1,43 @@
#!/usr/bin/env php
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
include dirname(dirname(dirname(__FILE__))) . '/class/tree.class.php';
su('admin');
/**
title=测试 treeModel->getTaskSons();
cid=1
pid=1
*/
$rootID = array(1, 2, 101, 102);
$productID = array(0, 1, 2);
$moduleID = array(0, 1821, 1825, 21, 23);
$tree = new treeTest();
r($tree->getTaskSonsTest($rootID[0], $productID[1], $moduleID[0])) && p() && e(',1821,2221,1822,2222,1823,2223,1824,2224'); // 测试获取 root 1 product 1 task模块的子模块
r($tree->getTaskSonsTest($rootID[0], $productID[2], $moduleID[0])) && p() && e(',1825,2225,1826,2226,1827,2227,1828,2228'); // 测试获取 root 1 product 2 task模块的子模块
r($tree->getTaskSonsTest($rootID[0], $productID[0], $moduleID[1])) && p() && e(',2621,2622'); // 测试获取 root 1 module 1821 task模块的子模块
r($tree->getTaskSonsTest($rootID[0], $productID[0], $moduleID[2])) && p() && e('0'); // 测试获取 root 1 module 1825 task模块的子模块
r($tree->getTaskSonsTest($rootID[0], $productID[0], $moduleID[3])) && p() && e('0'); // 测试获取 root 1 module 21 task模块的子模块
r($tree->getTaskSonsTest($rootID[0], $productID[0], $moduleID[4])) && p() && e('0'); // 测试获取 root 1 module 23 task模块的子模块
r($tree->getTaskSonsTest($rootID[1], $productID[1], $moduleID[0])) && p() && e(',1821,2221,1822,2222,1823,2223,1824,2224'); // 测试获取 root 2 product 1 task模块的子模块
r($tree->getTaskSonsTest($rootID[1], $productID[2], $moduleID[0])) && p() && e(',1825,2225,1826,2226,1827,2227,1828,2228'); // 测试获取 root 2 product 2 task模块的子模块
r($tree->getTaskSonsTest($rootID[1], $productID[0], $moduleID[1])) && p() && e('0'); // 测试获取 root 2 module 1821 task模块的子模块
r($tree->getTaskSonsTest($rootID[1], $productID[0], $moduleID[2])) && p() && e(',2623,2624'); // 测试获取 root 2 module 1825 task模块的子模块
r($tree->getTaskSonsTest($rootID[1], $productID[0], $moduleID[3])) && p() && e('0'); // 测试获取 root 2 module 21 task模块的子模块
r($tree->getTaskSonsTest($rootID[1], $productID[0], $moduleID[4])) && p() && e('0'); // 测试获取 root 2 module 23 task模块的子模块
r($tree->getTaskSonsTest($rootID[2], $productID[1], $moduleID[0])) && p() && e(',1821,2221,21,1822,2222,22,1823,2223,23,1824,2224 '); // 测试获取 root 101 product 1 task模块的子模块
r($tree->getTaskSonsTest($rootID[2], $productID[2], $moduleID[0])) && p() && e(',21,22,23,1825,2225,1826,2226,1827,2227,1828,2228 '); // 测试获取 root 101 product 2 task模块的子模块
r($tree->getTaskSonsTest($rootID[2], $productID[0], $moduleID[1])) && p() && e('0'); // 测试获取 root 101 module 1821 task模块的子模块
r($tree->getTaskSonsTest($rootID[2], $productID[0], $moduleID[2])) && p() && e('0'); // 测试获取 root 101 module 1825 task模块的子模块
r($tree->getTaskSonsTest($rootID[2], $productID[0], $moduleID[3])) && p() && e(',3021'); // 测试获取 root 101 module 21 task模块的子模块
r($tree->getTaskSonsTest($rootID[2], $productID[0], $moduleID[4])) && p() && e('0'); // 测试获取 root 101 module 23 task模块的子模块
r($tree->getTaskSonsTest($rootID[3], $productID[1], $moduleID[0])) && p() && e(',1821,2221,1822,2222,1823,2223,1824,2224,24,25,26 '); // 测试获取 root 102 product 1 task模块的子模块
r($tree->getTaskSonsTest($rootID[3], $productID[2], $moduleID[0])) && p() && e(',24,1825,2225,25,1826,2226,26,1827,2227,1828,2228 '); // 测试获取 root 102 product 2 task模块的子模块
r($tree->getTaskSonsTest($rootID[3], $productID[0], $moduleID[1])) && p() && e('0'); // 测试获取 root 102 module 1821 task模块的子模块
r($tree->getTaskSonsTest($rootID[3], $productID[0], $moduleID[2])) && p() && e('0'); // 测试获取 root 102 module 1825 task模块的子模块
r($tree->getTaskSonsTest($rootID[3], $productID[0], $moduleID[3])) && p() && e('0'); // 测试获取 root 102 module 21 task模块的子模块
r($tree->getTaskSonsTest($rootID[3], $productID[0], $moduleID[4])) && p() && e(',3022'); // 测试获取 root 102 module 23 task模块的子模块
+23
View File
@@ -0,0 +1,23 @@
#!/usr/bin/env php
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
include dirname(dirname(dirname(__FILE__))) . '/class/tree.class.php';
su('admin');
/**
title=测试 treeModel->getTaskStructure();
cid=1
pid=1
*/
$root = array(101, 102, 103, 104, 105, 106);
$tree = new treeTest();
r($tree->getTaskStructureTest($root[0])) && p() && e('正常产品1:2;多平台产品81:0;多平台产品91:0;模块1:1;模块2:0模块3:0'); // 获取root 101 的task 结构
r($tree->getTaskStructureTest($root[1])) && p() && e('正常产品2:2;多平台产品82:0;多平台产品92:0;模块4:0模块5:0模块6:0'); // 获取root 102 的task 结构
r($tree->getTaskStructureTest($root[2])) && p() && e('正常产品3:2;多平台产品83:0;多平台产品93:0;模块7:0模块8:0模块9:0'); // 获取root 103 的task 结构
r($tree->getTaskStructureTest($root[3])) && p() && e('正常产品4:2;多平台产品84:0;多平台产品94:0;模块11:0模块12:0模块10:0'); // 获取root 104 的task 结构
r($tree->getTaskStructureTest($root[4])) && p() && e('正常产品5:2;多平台产品85:0;多平台产品95:0;模块13:0模块14:0模块15:0'); // 获取root 105 的task 结构
r($tree->getTaskStructureTest($root[5])) && p() && e('正常产品6:2;多平台产品86:0;多平台产品96:0;模块16:0模块17:0模块18:0'); // 获取root 106 的task 结构
+35
View File
@@ -0,0 +1,35 @@
#!/usr/bin/env php
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
include dirname(dirname(dirname(__FILE__))) . '/class/tree.class.php';
su('admin');
/**
title=测试 treeModel->getTaskTreeModules();
cid=1
pid=1
*/
$executionID = array(101, 102, 103, 104);
$parent = array(false, true);
$linkObject = array('story', 'case');
$tree = new treeTest();
r($tree->getTaskTreeModulesTest($executionID[0], $parent[0], $linkObject[0])) && p() && e(',1822,1824,21,22,23,3021'); // 测试获取 execution 101 parent false story 的树
r($tree->getTaskTreeModulesTest($executionID[1], $parent[0], $linkObject[0])) && p() && e(',1826,1828,24,25,26,3022'); // 测试获取 execution 102 parent false story 的树
r($tree->getTaskTreeModulesTest($executionID[2], $parent[0], $linkObject[0])) && p() && e(',1830,1832,27,28,29,3023'); // 测试获取 execution 103 parent false story 的树
r($tree->getTaskTreeModulesTest($executionID[3], $parent[0], $linkObject[0])) && p() && e(',1834,1836,30,31,32,3024'); // 测试获取 execution 104 parent false story 的树
r($tree->getTaskTreeModulesTest($executionID[0], $parent[1], $linkObject[0])) && p() && e(',,1822,1824,21,22,23,3021'); // 测试获取 execution 101 parent true story 的树
r($tree->getTaskTreeModulesTest($executionID[1], $parent[1], $linkObject[0])) && p() && e(',,1826,1828,24,25,26,23,3022'); // 测试获取 execution 102 parent true story 的树
r($tree->getTaskTreeModulesTest($executionID[2], $parent[1], $linkObject[0])) && p() && e(',,1830,1832,27,28,29,25,3023'); // 测试获取 execution 103 parent true story 的树
r($tree->getTaskTreeModulesTest($executionID[3], $parent[1], $linkObject[0])) && p() && e(',,1834,1836,30,31,32,27,3024'); // 测试获取 execution 104 parent true story 的树
r($tree->getTaskTreeModulesTest($executionID[0], $parent[0], $linkObject[1])) && p() && e(',21,22,23,3021'); // 测试获取 execution 101 parent false case 的树
r($tree->getTaskTreeModulesTest($executionID[1], $parent[0], $linkObject[1])) && p() && e(',24,25,26,3022'); // 测试获取 execution 102 parent false case 的树
r($tree->getTaskTreeModulesTest($executionID[2], $parent[0], $linkObject[1])) && p() && e(',27,28,29,3023'); // 测试获取 execution 103 parent false case 的树
r($tree->getTaskTreeModulesTest($executionID[3], $parent[0], $linkObject[1])) && p() && e(',30,31,32,3024'); // 测试获取 execution 104 parent false case 的树
r($tree->getTaskTreeModulesTest($executionID[0], $parent[1], $linkObject[1])) && p() && e(',,21,22,23,3021'); // 测试获取 execution 101 parent true case 的树
r($tree->getTaskTreeModulesTest($executionID[1], $parent[1], $linkObject[1])) && p() && e(',,24,25,26,23,3022'); // 测试获取 execution 102 parent true case 的树
r($tree->getTaskTreeModulesTest($executionID[2], $parent[1], $linkObject[1])) && p() && e(',,27,28,29,25,3023'); // 测试获取 execution 103 parent true case 的树
r($tree->getTaskTreeModulesTest($executionID[3], $parent[1], $linkObject[1])) && p() && e(',,30,31,32,27,3024'); // 测试获取 execution 104 parent true case 的树
+33
View File
@@ -0,0 +1,33 @@
#!/usr/bin/env php
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
include dirname(dirname(dirname(__FILE__))) . '/class/tree.class.php';
su('admin');
/**
title=测试 treeModel->getTreeStructure();
cid=1
pid=1
*/
$root = array(1, 2, 3, 41, 42, 43, 101, 102, 103);
$type = array('story', 'case', 'doc', 'task');
$tree = new treeTest();
r($tree->getTreeStructureTest($root[0], $type[0])) && p() && e('1821:2;2221:2;1822:0;2222:0;1823:0;2223:0;1824:0;2224:0;'); // 测试获取root 1 story 的树结构
r($tree->getTreeStructureTest($root[1], $type[0])) && p() && e('1825:2;2225:2;1826:0;2226:0;1827:0;2227:0;1828:0;2228:0;'); // 测试获取root 2 story 的树结构
r($tree->getTreeStructureTest($root[2], $type[0])) && p() && e('1831:0;2231:0;1832:0;2232:0;1829:2;2229:2;1830:0;2230:0;'); // 测试获取root 3 story 的树结构
r($tree->getTreeStructureTest($root[3], $type[0])) && p() && e('1981:2;2381:2;1982:0;2382:0;1983:0;2383:0;1984:0;2384:0;'); // 测试获取root 41 story 的树结构
r($tree->getTreeStructureTest($root[4], $type[0])) && p() && e('1985:2;2385:2;1986:0;2386:0;1987:0;2387:0;1988:0;2388:0;'); // 测试获取root 42 story 的树结构
r($tree->getTreeStructureTest($root[5], $type[0])) && p() && e('1991:0;2391:0;1992:0;2392:0;1989:2;2389:2;1990:0;2390:0;'); // 测试获取root 43 story 的树结构
r($tree->getTreeStructureTest($root[0], $type[1])) && p() && e('1821:2;2221:2;3921:2;1822:0;2222:0;1823:0;2223:0;1824:0;2224:0;'); // 测试获取root 1 case 的树结构
r($tree->getTreeStructureTest($root[1], $type[1])) && p() && e('3922:2;1825:2;2225:2;1826:0;2226:0;1827:0;2227:0;1828:0;2228:0;'); // 测试获取root 2 case 的树结构
r($tree->getTreeStructureTest($root[2], $type[1])) && p() && e('1831:0;2231:0;1832:0;2232:0;3923:2;1829:2;2229:2;1830:0;2230:0;'); // 测试获取root 3 case 的树结构
r($tree->getTreeStructureTest($root[0], $type[2])) && p() && e('3621:2;'); // 测试获取root 1 doc 的树结构
r($tree->getTreeStructureTest($root[1], $type[2])) && p() && e('3622:2;'); // 测试获取root 2 doc 的树结构
r($tree->getTreeStructureTest($root[2], $type[2])) && p() && e('3623:2;'); // 测试获取root 3 doc 的树结构
r($tree->getTreeStructureTest($root[6], $type[3])) && p() && e('0'); // 测试获取root 101 task 的树结构
r($tree->getTreeStructureTest($root[7], $type[3])) && p() && e('0'); // 测试获取root 102 task 的树结构
r($tree->getTreeStructureTest($root[8], $type[3])) && p() && e('0'); // 测试获取root 103 task 的树结构
+27
View File
@@ -0,0 +1,27 @@
#!/usr/bin/env php
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
include dirname(dirname(dirname(__FILE__))) . '/class/tree.class.php';
su('admin');
/**
title=测试 treeModel->isMergeModule();
cid=1
pid=1
*/
$root = array(1, 2, 3, 101, 102, 103);
$type = array('bug', 'case', 'task');
$tree = new treeTest();
r($tree->isMergeModuleTest($root[0], $type[0])) && p() && e('1'); // 测试检查root 1 type bug 合并模块版本
r($tree->isMergeModuleTest($root[1], $type[0])) && p() && e('1'); // 测试检查root 2 type bug 合并模块版本
r($tree->isMergeModuleTest($root[2], $type[0])) && p() && e('1'); // 测试检查root 3 type bug 合并模块版本
r($tree->isMergeModuleTest($root[0], $type[1])) && p() && e('1'); // 测试检查root 1 type case 合并模块版本
r($tree->isMergeModuleTest($root[1], $type[1])) && p() && e('1'); // 测试检查root 2 type case 合并模块版本
r($tree->isMergeModuleTest($root[2], $type[1])) && p() && e('1'); // 测试检查root 3 type case 合并模块版本
r($tree->isMergeModuleTest($root[3], $type[2])) && p() && e('1'); // 测试检查root 101 type task 合并模块版本
r($tree->isMergeModuleTest($root[4], $type[2])) && p() && e('1'); // 测试检查root 102 type task 合并模块版本
r($tree->isMergeModuleTest($root[5], $type[2])) && p() && e('1'); // 测试检查root 103 type task 合并模块版本
+45
View File
@@ -0,0 +1,45 @@
#!/usr/bin/env php
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
include dirname(dirname(dirname(__FILE__))) . '/class/tree.class.php';
su('admin');
/**
title=测试 treeModel->manageChild();
cid=1
pid=1
*/
$root = array(1, 41);
$parentModuleID = array(1821, 2621, 1981, 1982);
$branch = array(0, 0, 0, 0, 0);
$type = 'story';
$modules1 = array('id2621' => '修改名称的产品子模块1', 'id2622' => '产品子模块2', '0' => '新建产品子模块1', '2' => '', '3' => '新建产品子模块2', '4' => '', '5' => '');
$short1 = array('id2621' => '模块简称1', 'id2622' => '修改简称的模块简称2', '0' => '新建模块简称1', '2' => '新建模块简称3', '3' => '新建模块简称2', '4' => '', '5' => '');
$order1 = array('id2621' => 10, 'id2622' => 20);
$tree1 = array('maxOrder' => 20, 'parentModuleID' => $parentModuleID[0], 'modules' => $modules1, 'shorts' => $short1, 'order' => $order1);
$modules2 = array('0' => '新建产品子模块3', '2' => '', '3' => '新建产品子模块4', '4' => '', '5' => '');
$short2 = array('0' => '新建模块简称3', '2' => '新建模块简称5', '3' => '新建模块简称4', '4' => '', '5' => '');
$tree2 = array('maxOrder' => 20, 'parentModuleID' => $parentModuleID[1], 'modules' => $modules2, 'shorts' => $short2);
$modules3 = array('id2701' => '修改名称的产品子模块81', 'id2702' => '产品子模块82', '0' => '新建产品子模块5', '2' => '', '3' => '新建产品子模块6', '4' => '', '5' => '');
$short3 = array('id2701' => '模块简称81', 'id2702' => '修改简称的模块简称82', '0' => '新建模块简称5', '2' => '新建模块简称7', '3' => '新建模块简称6', '4' => '', '5' => '');
$order3 = array('id2701' => 10, 'id2702' => 20);
$branch3 = array(0, 0, 0, 0, 0, 0);
$tree3 = array('maxOrder' => 20, 'parentModuleID' => $parentModuleID[2], 'modules' => $modules3, 'shorts' => $short3, 'order' => $order3, 'branch' => $branch3);
$modules4 = array('0' => '新建产品子模块7', '2' => '', '3' => '新建产品子模块8', '4' => '', '5' => '');
$short4 = array('0' => '新建模块简称7', '2' => '新建模块简称9', '3' => '新建模块简称8', '4' => '', '5' => '');
$branch4 = array(1, 1, 1, 1, 1, 1);
$tree4 = array('maxOrder' => 20, 'parentModuleID' => $parentModuleID[3], 'modules' => $modules4, 'shorts' => $short4, 'branch' => $branch4);
$tree = new treeTest();
r($tree->manageChildTest($root[0], $type, $tree1)) && p() && e(',修改名称的产品子模块1,产品子模块2,新建产品子模块1,新建产品子模块2'); // 测试管理module 1821 的子模块
r($tree->manageChildTest($root[0], $type, $tree2)) && p() && e(',新建产品子模块3,新建产品子模块4'); // 测试管理module 2621 的子模块
r($tree->manageChildTest($root[1], $type, $tree3)) && p() && e(',修改名称的产品子模块81,产品子模块82,新建产品子模块5,新建产品子模块6'); // 测试管理module 1981 的子模块
r($tree->manageChildTest($root[1], $type, $tree4)) && p() && e(',新建产品子模块7,新建产品子模块8'); // 测试管理module 1982 的子模块
system("./ztest init");
+29
View File
@@ -0,0 +1,29 @@
#!/usr/bin/env php
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
include dirname(dirname(dirname(__FILE__))) . '/class/tree.class.php';
su('admin');
/**
title=测试 treeModel->update();
cid=1
pid=1
*/
$moduleID = array(1821, 1981);
$changeRoot = array('root' => '2');
$changeParent = array('parent' => 1822);
$changeName = array('name' => '修改后的模块名');
$changeShort = array('short' => '修改后的简称');
$changeBranch = array('branch' => 1);
$tree = new treeTest();
r($tree->updateTest($moduleID[0], $changeRoot)) && p('root,branch,parent,name,short') && e('2,0,0,产品模块1,模块简称1'); // 测试更新module 1821 的 root
r($tree->updateTest($moduleID[0], $changeParent)) && p('root,branch,parent,name,short') && e('2,0,1822,产品模块1,模块简称1'); // 测试更新module 1821 的 root
r($tree->updateTest($moduleID[0], $changeName)) && p('root,branch,parent,name,short') && e('2,0,1822,修改后的模块名,模块简称1'); // 测试更新module 1821 的 root
r($tree->updateTest($moduleID[0], $changeShort)) && p('root,branch,parent,name,short') && e('2,0,1822,修改后的模块名,修改后的简称'); // 测试更新module 1821 的 root
r($tree->updateTest($moduleID[1], $changeBranch)) && p('root,branch,parent,name,short') && e('41,1,0,产品模块161,模块简称161'); // 测试更新module 1981 的 root
system("./ztest init");
+25
View File
@@ -0,0 +1,25 @@
#!/usr/bin/env php
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
include dirname(dirname(dirname(__FILE__))) . '/class/tree.class.php';
su('admin');
/**
title=测试 treeModel->updateOrder();
cid=1
pid=1
*/
$orders1 = array('2221' => 0, '2821' => 1, '2822' => 2, '1822' => 3, '1823' => 4, '2222' => 5, '2223' => 6, '1824' => 7, '2224' => 8);
$orders2 = array('2221' => 0, '2821' => 1, '2822' => 2, '1822' => 3, '1823' => 4, '1824' => 5, '2222' => 6, '2223' => 7, '2224' => 8);
$orders3 = array('2221' => 0, '2822' => 1, '2821' => 2, '1822' => 3, '1823' => 4, '1824' => 5, '2222' => 6, '2223' => 7, '2224' => 8);
$orders4 = array('1984' => 0, '2381' => 1, '2901' => 2, '2902' => 3, '2382' => 4, '2383' => 5, '2384' => 6);
$tree = new treeTest();
r($tree->updateOrderTest($orders1)) && p() && e(',2221,2821,1822,2822,1823,2222,2223,1824,2224'); // 测试更新模块顺序 1
r($tree->updateOrderTest($orders2)) && p() && e(',2221,2821,1822,2822,1823,1824,2222,2223,2224'); // 测试更新模块顺序 2
r($tree->updateOrderTest($orders3)) && p() && e(',2221,2822,1822,2821,1823,1824,2222,2223,2224'); // 测试更新模块顺序 3
r($tree->updateOrderTest($orders4)) && p() && e(',1984,2901,2381,2902,2382,2383,2384'); // 测试更新模块顺序 4
system("./ztest init");
+2 -1
View File
@@ -136,7 +136,8 @@ function showMoreImage(obj)
*/
function setMailto(mailto, contactListID)
{
link = createLink('user', 'ajaxGetContactUsers', 'listID=' + contactListID + '&dropdownName=' + mailto);
var oldUsers = $('#' + mailto).val() ? $('#' + mailto).val() : '';
link = createLink('user', 'ajaxGetContactUsers', 'listID=' + contactListID + '&dropdownName=' + mailto + '&oldUsers=' + oldUsers);
$.get(link, function(users)
{
$('#' + mailto).replaceWith(users);