diff --git a/config/filter.php b/config/filter.php
index 6b684691fd..e173dd69be 100644
--- a/config/filter.php
+++ b/config/filter.php
@@ -97,9 +97,11 @@ $filter->bug->default->cookie['preProductID'] = 'int';
$filter->bug->create->cookie['preBranch'] = 'int';
$filter->bug->export->cookie['checkedItem'] = 'reg::checked';
-$filter->doc->browse->cookie['browseType'] = 'reg::browseType';
-$filter->doc->default->cookie['from'] = 'code';
-$filter->doc->default->cookie['product'] = 'int';
+$filter->doc->browse->cookie['browseType'] = 'reg::browseType';
+$filter->doc->alllibs->cookie['browseType'] = 'reg::browseType';
+$filter->doc->objectlibs->cookie['browseType'] = 'reg::browseType';
+$filter->doc->default->cookie['from'] = 'code';
+$filter->doc->default->cookie['product'] = 'int';
$filter->doc->showfiles->cookie['docFilesViewType'] = 'code';
$filter->file->download->cookie[$config->sessionVar] = 'code';
@@ -153,7 +155,7 @@ $filter->testsuite->library->cookie['libCaseModule'] = 'int';
$filter->testsuite->library->cookie['preCaseLibID'] = 'int';
$filter->testtask->browse->cookie['preBranch'] = 'int';
-$filter->testtask->cases->cookie['preProductID'] = 'int';
+$filter->testtask->cases->cookie['preTaskID'] = 'int';
$filter->testtask->cases->cookie['taskCaseModule'] = 'int';
$filter->testtask->default->cookie['lastProduct'] = 'int';
$filter->testtask->default->cookie['preProductID'] = 'int';
diff --git a/db/update10.0.sql b/db/update10.0.sql
index 3fe85f06c1..b5b242c41c 100644
--- a/db/update10.0.sql
+++ b/db/update10.0.sql
@@ -1 +1,2 @@
ALTER TABLE `zt_storyspec` CHANGE `title` `title` varchar(255) NOT NULL;
+update `zt_todo` set assignedTo = 'closed', assignedDate = closedDate where status = 'closed';
diff --git a/module/bug/control.php b/module/bug/control.php
index 1cd4977818..4d460a554d 100644
--- a/module/bug/control.php
+++ b/module/bug/control.php
@@ -254,7 +254,7 @@ class bug extends control
$this->view->users = $this->user->getPairs('devfirst|noclosed|nodeleted');
$this->app->loadLang('release');
- if(!empty($_POST) and !isset($_POST['stepIDList']))
+ if(!empty($_POST))
{
$response['result'] = 'success';
$response['message'] = '';
@@ -332,8 +332,8 @@ class bug extends control
$extras = str_replace(array(',', ' '), array('&', ''), $extras);
parse_str($extras);
- if($runID and $resultID) extract($this->bug->getBugInfoFromResult($resultID));// If set runID and resultID, get the result info by resultID as template.
- if(!$runID and $caseID) extract($this->bug->getBugInfoFromResult($resultID, $caseID, $version));// If not set runID but set caseID, get the result info by resultID and case info.
+ if($runID and $resultID) extract($this->bug->getBugInfoFromResult($resultID, 0, 0, isset($stepIdList) ? $stepIdList : ''));// If set runID and resultID, get the result info by resultID as template.
+ if(!$runID and $caseID) extract($this->bug->getBugInfoFromResult($resultID, $caseID, $version, isset($stepIdList) ? $stepIdList : ''));// If not set runID but set caseID, get the result info by resultID and case info.
/* If bugID setted, use this bug as template. */
if(isset($bugID))
diff --git a/module/bug/css/view.css b/module/bug/css/view.css
index 7908c48a09..3e5652d2ac 100644
--- a/module/bug/css/view.css
+++ b/module/bug/css/view.css
@@ -1,2 +1,3 @@
.content .stepTitle{display:block; color: green; margin:0px;}
.table-fixed td{white-space: unset}
+.table-data tr > td{word-break: break-all; word-wrap: break-word;}
diff --git a/module/bug/model.php b/module/bug/model.php
index dc97cd92fd..d68f1e0227 100644
--- a/module/bug/model.php
+++ b/module/bug/model.php
@@ -1610,11 +1610,11 @@ class bugModel extends model
* @access public
* @return array
*/
- public function getBugInfoFromResult($resultID, $caseID = 0, $version = 0)
+ public function getBugInfoFromResult($resultID, $caseID = 0, $version = 0, $stepIdList = '')
{
$title = '';
$bugSteps = '';
- $steps = zget($_POST, 'stepIDList', array());
+ $steps = explode('_', trim($stepIdList, '_'));
$result = $this->dao->findById($resultID)->from(TABLE_TESTRESULT)->fetch();
if($caseID > 0)
@@ -1635,38 +1635,47 @@ class bugModel extends model
$bugSteps = "
[" . $this->lang->testcase->precondition . "]
" . "\n" . $run->case->precondition;
}
- $bugSteps .= $this->lang->bug->tplStep;
if(!empty($stepResults))
{
$i = 1;
+ $bugStep = '';
foreach($steps as $stepId)
{
if(!isset($caseSteps[$stepId])) continue;
$step = $caseSteps[$stepId];
- $bugSteps .= $i . '. ' . $step->desc . "
";
+ $bugStep .= $i . '. ' . $step->desc . "
";
$i++;
}
+ $bugSteps .= $bugStep ? str_replace('
', '', $this->lang->bug->tplStep) . $bugStep : $this->lang->bug->tplStep;
- $bugSteps .= $this->lang->bug->tplResult;
$i = 1;
+ $bugResult = '';
foreach($steps as $stepId)
{
if(!isset($stepResults[$stepId]) or empty($stepResults[$stepId]['real'])) continue;
- $bugSteps .= $i . '. ' . $stepResults[$stepId]['real'] . "
";
+ $bugResult .= $i . '. ' . $stepResults[$stepId]['real'] . "
";
$i++;
}
+ $bugSteps .= $bugResult ? str_replace('
', '', $this->lang->bug->tplResult) . $bugResult : $this->lang->bug->tplResult;
- $bugSteps .= $this->lang->bug->tplExpect;
$i = 1;
+ $bugExpect = '';
foreach($steps as $stepId)
{
if(!isset($caseSteps[$stepId])) continue;
$step = $caseSteps[$stepId];
- if($step->expect) $bugSteps .= $i . '. ' . $step->expect . "
";
+ if($step->expect) $bugExpect .= $i . '. ' . $step->expect . "
";
$i++;
}
+ $bugSteps .= $bugExpect ? str_replace('
', '', $this->lang->bug->tplExpect) . $bugExpect : $this->lang->bug->tplExpect;
+ }
+ else
+ {
+ $bugSteps .= $this->lang->bug->tplStep;
+ $bugSteps .= $this->lang->bug->tplResult;
+ $bugSteps .= $this->lang->bug->tplExpect;
}
return array('title' => $title, 'steps' => $bugSteps, 'storyID' => $run->case->story, 'moduleID' => $run->case->module, 'version' => $run->case->version);
diff --git a/module/common/view/action.html.php b/module/common/view/action.html.php
index 802d192c2e..ea779ef062 100755
--- a/module/common/view/action.html.php
+++ b/module/common/view/action.html.php
@@ -1,4 +1,7 @@
getExtViewFile(__FILE__)){include $extView; return helper::cd();}?>
+
diff --git a/module/company/lang/en.php b/module/company/lang/en.php
index 06eb84d09a..35bd18740d 100644
--- a/module/company/lang/en.php
+++ b/module/company/lang/en.php
@@ -12,7 +12,7 @@
$lang->company->common = 'Company';
$lang->company->index = "Home";
$lang->company->edit = "Edit Company";
-$lang->company->view = "Company Info";
+$lang->company->view = "Company Information";
$lang->company->browse = "User List";
$lang->company->dynamic = "Dynamic";
$lang->company->orgView = 'View';
@@ -24,7 +24,7 @@ $lang->company->address = 'Mailing Address';
$lang->company->zipcode = 'Zip Code';
$lang->company->website = 'Website';
$lang->company->backyard = 'Intranet';
-$lang->company->guest = 'Anonymous Login';
+$lang->company->guest = 'Guest Login';
$lang->company->admins = 'Administrators';
$lang->company->product = $lang->productCommon;
diff --git a/module/doc/control.php b/module/doc/control.php
index f2e36ff588..1121c71599 100644
--- a/module/doc/control.php
+++ b/module/doc/control.php
@@ -619,7 +619,11 @@ class doc extends control
$libs = $this->doc->getAllLibsByType($type, $pager, $product);
$subLibs = array();
- if($type == 'product' or $type == 'project') $subLibs = $this->doc->getSubLibGroups($type, array_keys($libs));
+ if($type == 'product' or $type == 'project')
+ {
+ $subLibs = $this->doc->getSubLibGroups($type, array_keys($libs));
+ if($this->cookie->browseType == 'bylist') $this->view->users = $this->loadModel('user')->getPairs('noletter');
+ }
if($type == 'custom') $this->view->itemCounts = $this->doc->statLibCounts(array_keys($libs));
$this->view->type = $type;
@@ -739,7 +743,7 @@ class doc extends control
public function objectLibs($type, $objectID, $from = 'doc')
{
$this->from = $from;
- setcookie('from', $from, $this->config->cookieLife, $this->config->webRoot);
+ setcookie('from', $from, $this->config->cookieLife, $this->config->webRoot);
$table = $type == 'product' ? TABLE_PRODUCT : TABLE_PROJECT;
$object = $this->dao->select('id,name')->from($table)->where('id')->eq($objectID)->fetch();
diff --git a/module/doc/css/common.css b/module/doc/css/common.css
index 23926c7d45..b0dcd89fc1 100644
--- a/module/doc/css/common.css
+++ b/module/doc/css/common.css
@@ -26,9 +26,6 @@
.col-md-size .table .c-datetime {display: none;}
.table-files .btn {padding:0 6px;}
-.table-files .c-actions .btn > .icon {opacity: 0;}
-.table-files .c-actions .btn > .icon.text-yellow,
-.table-files tr:hover .c-actions .btn > .icon {opacity: 1;}
#docsTree li > a > .icon {opacity: .65;}
diff --git a/module/doc/js/browse.js b/module/doc/js/browse.js
index be2e21c800..240dfcabf5 100644
--- a/module/doc/js/browse.js
+++ b/module/doc/js/browse.js
@@ -17,12 +17,6 @@ function browseBySearch()
$('#queryBox').addClass('show');
}
-function setBrowseType(type)
-{
- $.cookie('browseType', type, {expires:config.cookieLife, path:config.webRoot});
- location.href = location.href;
-}
-
$(function(){
$('#' + browseType + 'Tab').addClass('active');
if(browseType == "bysearch")
diff --git a/module/doc/js/common.js b/module/doc/js/common.js
index b737d4b5e9..e2e3e42572 100644
--- a/module/doc/js/common.js
+++ b/module/doc/js/common.js
@@ -16,6 +16,12 @@ function toggleAcl(acl)
}
}
+function setBrowseType(type)
+{
+ $.cookie('browseType', type, {expires:config.cookieLife, path:config.webRoot});
+ location.href = location.href;
+}
+
$(document).ready(function()
{
$('.libs-group.sort').sortable(
diff --git a/module/doc/lang/en.php b/module/doc/lang/en.php
index 5687eaa540..79e8ab49f6 100644
--- a/module/doc/lang/en.php
+++ b/module/doc/lang/en.php
@@ -44,6 +44,7 @@ $lang->doc->acl = 'Right';
$lang->doc->groups = 'Groups';
$lang->doc->users = 'Users';
$lang->doc->item = ' Item';
+$lang->doc->num = 'Docs';
$lang->doc->searchResult = 'Search Result';
$lang->doc->moduleDoc = 'By Module';
diff --git a/module/doc/lang/zh-cn.php b/module/doc/lang/zh-cn.php
index 278af6fb23..4f2fd54078 100644
--- a/module/doc/lang/zh-cn.php
+++ b/module/doc/lang/zh-cn.php
@@ -44,6 +44,7 @@ $lang->doc->acl = '权限';
$lang->doc->groups = '分组';
$lang->doc->users = '用户';
$lang->doc->item = '项';
+$lang->doc->num = '文档数量';
$lang->doc->searchResult = '搜索结果';
$lang->doc->moduleDoc = '按模块浏览';
diff --git a/module/doc/model.php b/module/doc/model.php
index 3d7424e651..dc2d1e0045 100644
--- a/module/doc/model.php
+++ b/module/doc/model.php
@@ -562,12 +562,12 @@ class docModel extends model
->add('version', 1)
->setDefault('product,project,module', 0)
->stripTags($this->config->doc->editor->create['id'], $this->config->allowedTags)
- ->stripTags($this->config->doc->markdown->create['id'], $this->config->allowedTags)
->cleanInt('product,project,module')
->join('groups', ',')
->join('users', ',')
->remove('files,labels,uid')
->get();
+ $doc->contentMarkdown = strip_tags($this->post->contentMarkdown, $this->config->allowedTags);
if($doc->acl == 'private') $doc->users = $this->app->user->account;
$condition = "lib = '$doc->lib' AND module = $doc->module";
@@ -638,6 +638,7 @@ class docModel extends model
->join('users', ',')
->remove('comment,files,labels,uid')
->get();
+ if($doc->contentType == 'markdown') $doc->content = strip_tags($this->post->content, $this->config->allowedTags);
if($doc->acl == 'private') $doc->users = $oldDoc->addedBy;
$oldDocContent = $this->dao->select('*')->from(TABLE_DOCCONTENT)->where('doc')->eq($docID)->andWhere('version')->eq($oldDoc->version)->fetch();
diff --git a/module/doc/view/alllibs.html.php b/module/doc/view/alllibs.html.php
index a8c1074660..def2ed82a0 100644
--- a/module/doc/view/alllibs.html.php
+++ b/module/doc/view/alllibs.html.php
@@ -11,11 +11,14 @@
*/
?>
-app->user->feedback) && !$this->cookie->feedbackView && $this->from == 'doc') ? true : false;?>
+app->user->feedback) && !$this->cookie->feedbackView) ? true : false;?>
+ cookie->browseType == 'bylist'):?>
+
+
@@ -25,6 +28,12 @@
projectCommon;?>
+
@@ -36,7 +45,7 @@
- name;?>
+ collector, $this->app->user->account) !== false ? " " : '') . $lib->name;?>
id] . $lang->doc->item;?>
@@ -45,7 +54,9 @@
- id&objectType=lib", "
", 'hiddenwin', "title='{$lang->doc->collect}' class='btn btn-link'")?>
+ collector, ',' . $this->app->user->account . ',') !== false ? 'icon-star text-yellow' : 'icon-star-empty';?>
+ collector, ',' . $this->app->user->account . ',') !== false ? $lang->doc->cancelCollection : $lang->doc->collect;?>
+
id&objectType=doclib");?>" title="" class='btn btn-link ajaxCollect'>
id", "
", '', "title='{$lang->edit}' class='btn btn-link iframe'")?>
id", "
", 'hiddenwin', "title='{$lang->delete}' class='btn btn-link'")?>
id&type=doc", "
", '', "title='{$lang->tree->manage}' class='btn btn-link'")?>
@@ -58,5 +69,6 @@
+
diff --git a/module/doc/view/alllibsbylist.html.php b/module/doc/view/alllibsbylist.html.php
new file mode 100644
index 0000000000..fcd5c50f25
--- /dev/null
+++ b/module/doc/view/alllibsbylist.html.php
@@ -0,0 +1,68 @@
+
+
+
+
+
+ doc->custom;?>
+ productCommon;?>
+ projectCommon;?>
+
+
+
+
+
+
+
+
+
+ product->name;?>
+ project->name;?>
+ doc->libName;?>
+ |
+ doc->num;?> |
+
+ doc->addedBy;?> |
+ doc->addedDate;?> |
+
+ actions;?> |
+
+
+
+
+
+ createLink('doc', 'objectLibs', "type=$type&objectID=$lib->id") : $this->createLink('doc', 'browse', "libID=$lib->id");?>
+
+ | name);?> |
+
+
+ id] . $lang->doc->item;?>
+
+ id]) . $lang->doc->item;?>
+
+ |
+
+ createdBy) echo zget($users, $lib->createdBy);?> |
+ createdDate != '00-00-00 00:00:00') echo formatTime($lib->createdDate, 'm-d h:i');?> |
+
+
+ collector, ',' . $this->app->user->account . ',') !== false ? 'icon-star text-yellow' : 'icon-star-empty';?>
+ collector, ',' . $this->app->user->account . ',') !== false ? $lang->doc->cancelCollection : $lang->doc->collect;?>
+ id&objectType=doclib");?>" title="" class='btn btn-link ajaxCollect'>
+ id", "", '', "title='{$lang->edit}' class='btn btn-link iframe'")?>
+ id", "", 'hiddenwin', "title='{$lang->delete}' class='btn btn-link'")?>
+ id&type=doc", "", '', "title='{$lang->tree->manage}' class='btn btn-link'")?>
+ |
+
+
+
+
+
+
+
+
+
diff --git a/module/doc/view/objectlibs.html.php b/module/doc/view/objectlibs.html.php
index 8e3c4ceea9..36155a33b8 100644
--- a/module/doc/view/objectlibs.html.php
+++ b/module/doc/view/objectlibs.html.php
@@ -15,6 +15,9 @@
from == 'doc'):?>
+ cookie->browseType == 'bylist'):?>
+
+
@@ -22,6 +25,10 @@
name;?>
+
diff --git a/module/doc/view/objectlibsbylist.html.php b/module/doc/view/objectlibsbylist.html.php
new file mode 100644
index 0000000000..1e7768410d
--- /dev/null
+++ b/module/doc/view/objectlibsbylist.html.php
@@ -0,0 +1,74 @@
+
+
+
+
+ name;?>
+
+
+
+
+
+
+
+ | doc->libName;?> |
+ doc->num;?> |
+ actions;?> |
+
+
+
+ $lib):?>
+
+ doc->custom->objectLibs, 'files') === false && $libID == 'files') continue;?>
+ doc->custom->objectLibs, 'customFiles') === false && isset($lib->main) && !$lib->main) continue;?>
+
+
+ id");?>
+ id");?>
+
+ | name);?> |
+ allCount . $lang->doc->item;?> |
+
+
+ collector, ',' . $this->app->user->account . ',') !== false ? 'icon-star text-yellow' : 'icon-star-empty';?>
+ collector, ',' . $this->app->user->account . ',') !== false ? $lang->doc->cancelCollection : $lang->doc->collect;?>
+ " title="" class='btn btn-link ajaxCollect'>
+ ", '', "title='{$lang->edit}' class='btn btn-link iframe'")?>
+ main)) common::printLink('doc', 'deleteLib', "libID=$libID", "", 'hiddenwin', "title='{$lang->delete}' class='btn btn-link'")?>
+ ", '', "title='{$lang->doc->manageType}' class='btn btn-link'")?>
+
+ |
+
+
+
+
+
+
+
diff --git a/module/group/model.php b/module/group/model.php
index 1e28da57ce..3d33a35c9c 100644
--- a/module/group/model.php
+++ b/module/group/model.php
@@ -114,7 +114,7 @@ class groupModel extends model
*/
public function getPairs()
{
- return $this->dao->select('id, name')->from(TABLE_GROUP)->fetchPairs();
+ return $this->dao->select('id, name')->from(TABLE_GROUP)->orderBy('id')->fetchPairs();
}
/**
diff --git a/module/my/view/project.html.php b/module/my/view/project.html.php
index 98cc1f206c..72ccdf3df1 100644
--- a/module/my/view/project.html.php
+++ b/module/my/view/project.html.php
@@ -33,32 +33,34 @@
-
+
| idAB;?> |
- project->code;?> |
- project->name;?> |
- project->begin;?> |
- project->end;?> |
- statusAB;?> |
- team->role;?> |
- team->join;?> |
+ project->code;?> |
+ project->name;?> |
+ project->begin;?> |
+ project->end;?> |
+ statusAB;?> |
+ team->role;?> |
+ team->join;?> |
team->hours;?> |
createLink('project', 'browse', "projectID=$project->id");?>
-
+
| id);?> |
code;?> |
name);?> |
begin;?> |
end;?> |
- delay)):?>
- project->delayed;?> |
-
- project->statusList[$project->status];?> |
-
+
+ delay)):?>
+ project->delayed;?>
+
+ project->statusList, $project->status, '');?>
+
+ |
role;?> |
join;?> |
hours;?> |
diff --git a/module/product/control.php b/module/product/control.php
index 0536959547..e50f83637d 100644
--- a/module/product/control.php
+++ b/module/product/control.php
@@ -214,6 +214,7 @@ class product extends control
}
$rootID = key($this->products);
+ if($this->session->product) $rootID = $this->session->product;
$this->product->setMenu($this->products, $rootID);
$this->view->title = $this->lang->product->create;
@@ -382,9 +383,6 @@ class product extends control
$this->product->setMenu($this->products, $productID);
- $actions = $this->dao->select('*')->from(TABLE_ACTION)->where('product')->like("%,$productID,%")->orderBy('date_desc')->limit(6)->fetchAll();
- if($actions) $this->loadModel('action')->transformActions($actions);
-
$releases = $this->dao->select('*')->from(TABLE_RELEASE)->where('deleted')->eq(0)->andWhere('product')->eq($productID)->orderBy('date')->fetchAll();
$this->view->title = $product->name . $this->lang->colon . $this->lang->product->view;
@@ -396,7 +394,7 @@ class product extends control
$this->view->groups = $this->loadModel('group')->getPairs();
$this->view->lines = array('') + $this->loadModel('tree')->getLinePairs();
$this->view->branches = $this->loadModel('branch')->getPairs($productID);
- $this->view->actions = $actions;
+ $this->view->dynamics = $this->loadModel('action')->getDynamic('all', 'all', 'date_desc', $pager = null, $productID);
$this->view->releases = $releases;
$this->display();
@@ -464,7 +462,7 @@ class product extends control
public function dynamic($productID = 0, $type = 'today', $param = '', $recTotal = 0, $date = '', $direction = 'next')
{
/* Save session. */
- $uri = $this->app->getURI(true);
+ $uri = $this->app->getURI(true);
$this->session->set('productList', $uri);
$this->session->set('productPlanList', $uri);
$this->session->set('releaseList', $uri);
diff --git a/module/product/model.php b/module/product/model.php
index 8a88879390..971ff72fc7 100644
--- a/module/product/model.php
+++ b/module/product/model.php
@@ -352,11 +352,11 @@ class productModel extends model
public function create()
{
$product = fixer::input('post')
- ->setIF($this->post->acl != 'custom', 'whitelist', '')
- ->setDefault('status', 'normal')
- ->setDefault('createdBy', $this->app->user->account)
- ->setDefault('createdDate', helper::now())
- ->setDefault('createdVersion', $this->config->version)
+ ->setIF($this->post->acl != 'custom', 'whitelist', '')
+ ->setDefault('status', 'normal')
+ ->setDefault('createdBy', $this->app->user->account)
+ ->setDefault('createdDate', helper::now())
+ ->setDefault('createdVersion', $this->config->version)
->join('whitelist', ',')
->stripTags($this->config->product->editor->create['id'], $this->config->allowedTags)
->remove('uid')
diff --git a/module/product/view/view.html.php b/module/product/view/view.html.php
index 6655a6079c..e7f6766895 100644
--- a/module/product/view/view.html.php
+++ b/module/product/view/view.html.php
@@ -51,7 +51,7 @@
-
+
- major) echo "class='active'";?>>
date;?>
diff --git a/module/project/control.php b/module/project/control.php
index 6894c34c91..b95b6d502e 100644
--- a/module/project/control.php
+++ b/module/project/control.php
@@ -1090,6 +1090,12 @@ class project extends control
if(!isset($allProducts[$product->id])) $allProducts[$product->id] = $product->name;
if($product->branch) $linkedBranches[$product->branch] = $product->branch;
}
+ $this->loadModel('productplan');
+ $productPlans = array(0 => '');
+ foreach($linkedProducts as $product)
+ {
+ $productPlans[$product->id] = $this->productplan->getPairs($product->id);
+ }
$this->view->title = $title;
$this->view->position = $position;
@@ -1102,6 +1108,7 @@ class project extends control
$this->view->groups = $this->loadModel('group')->getPairs();
$this->view->allProducts = $allProducts;
$this->view->linkedProducts = $linkedProducts;
+ $this->view->productPlans = $productPlans;
$this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($linkedProducts), '', $linkedBranches);
$this->display();
@@ -1362,9 +1369,6 @@ class project extends control
$this->project->setMenu($this->projects, $project->id);
$this->app->loadLang('bug');
- $actions = $this->dao->select('*')->from(TABLE_ACTION)->where('project')->eq("$projectID")->orderBy('date_desc')->limit(6)->fetchAll();
- if($actions) $this->loadModel('action')->transformActions($actions);
-
list($dateList, $interval) = $this->project->getDateList($project->begin, $project->end, 'noweekend', 0, 'Y-m-d');
$chartData = $this->project->buildBurnData($projectID, $dateList, 'noweekend');
@@ -1377,7 +1381,8 @@ class project extends control
$this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($products), '', $linkedBranches);
$this->view->planGroups = $this->project->getPlans($products);
$this->view->groups = $this->loadModel('group')->getPairs();
- $this->view->actions = $actions;
+ $this->view->actions = $this->loadModel('action')->getList('project', $projectID);
+ $this->view->dynamics = $this->loadModel('action')->getDynamic('all', 'all', 'date_desc', $pager = null, 'all', $projectID);
$this->view->users = $this->loadModel('user')->getPairs('noletter');
$this->view->teamMembers = $this->project->getTeamMembers($projectID);
$this->view->docLibs = $this->loadModel('doc')->getLibsByObject('project', $projectID);
@@ -1656,7 +1661,7 @@ class project extends control
if($from == 'buildCreate' && $this->session->buildCreate) $browseProjectLink = $this->session->buildCreate;
$this->project->updateProducts($projectID);
- if(dao::isError()) dis(js::error(dao::getError()));
+ if(dao::isError()) die(js::error(dao::getError()));
die(js::locate($browseProjectLink));
}
@@ -2301,7 +2306,7 @@ class project extends control
public function importPlanStories($projectID, $planID)
{
$planStories = $planProducts = array();
- $planStory = $this->loadModel('story')->getPlanStories($planID);
+ $planStory = $this->loadModel('story')->getPlanStories($planID, 'changed,active,reviewing');
if(!empty($planStory))
{
$planStories = array_keys($planStory);
diff --git a/module/project/css/view.css b/module/project/css/view.css
index 6c88638b83..771b0e9847 100644
--- a/module/project/css/view.css
+++ b/module/project/css/view.css
@@ -7,3 +7,4 @@
#burnLegend > div:before {content: ' '; display: block; position: absolute; width: 20px; left: 0; top: 8px; height: 2px; background: #EEEEEE;}
#burnLegend > div.line-real:before {background: #006AF1;}
+.block-dynamic .panel-body {height: 230px; overflow: auto; position: relative;}
diff --git a/module/project/js/common.js b/module/project/js/common.js
index e0d57f4d37..db6009f509 100644
--- a/module/project/js/common.js
+++ b/module/project/js/common.js
@@ -177,7 +177,7 @@ function loadPlans(product, branchID)
{
if(typeof(planID) == 'undefined') planID = 0;
planID = $("select#plans" + productID).val() != '' ? $("select#plans" + productID).val() : planID;
- $.get(createLink('product', 'ajaxGetPlans', "productID=" + productID + '&branch=' + branchID + '&planID=' + planID + '&fieldID&needCreate=&expired=' + (config.currentMethod == 'create' ? 'unexpired' : '')), function(data)
+ $.get(createLink('product', 'ajaxGetPlans', "productID=" + productID + '&branch=' + branchID + '&planID=' + planID + '&fieldID&needCreate=&expired=' + ((config.currentMethod == 'create' || config.currentMethod == 'edit') ? 'unexpired' : '')), function(data)
{
if(data)
{
diff --git a/module/project/view/edit.html.php b/module/project/view/edit.html.php
index d2d71311ac..3fbf7b4483 100644
--- a/module/project/view/edit.html.php
+++ b/module/project/view/edit.html.php
@@ -133,6 +133,17 @@
+ global->flow == 'onlyTask') echo "class='hidden'";?>>
+ | project->linkPlan;?> |
+
+
+
+ id, array(0 => ''));?>
+ id . "]", $plans, $product->plan, "class='form-control chosen'");?>
+
+
+ |
+
| project->desc;?> |
desc), "rows='6' class='form-control kindeditor' hidefocus='true'");?> |
diff --git a/module/project/view/story.html.php b/module/project/view/story.html.php
index b3dabe6868..3e66d14f2d 100644
--- a/module/project/view/story.html.php
+++ b/module/project/view/story.html.php
@@ -46,16 +46,13 @@
else
{
echo "';
}
diff --git a/module/project/view/view.html.php b/module/project/view/view.html.php
index 4d2e0650a2..b4adbbe2a6 100644
--- a/module/project/view/view.html.php
+++ b/module/project/view/view.html.php
@@ -48,7 +48,7 @@
-
+
- major) echo "class='active'";?>>
date;?>
diff --git a/module/report/lang/en.php b/module/report/lang/en.php
index a5ced624c4..efd8cf87a5 100644
--- a/module/report/lang/en.php
+++ b/module/report/lang/en.php
@@ -38,11 +38,11 @@ $lang->report->singleColor[] = 'F6BD0F';
$lang->report->projectDeviation = $lang->projectCommon . ' Deviation';
$lang->report->productSummary = $lang->productCommon . ' Summary';
-$lang->report->bugCreate = 'Bug Submission Report';
-$lang->report->bugAssign = 'Bug Assignment Report';
-$lang->report->workload = 'Workload';
-$lang->report->workloadAB = 'Workload';
-$lang->report->bugOpenedDate = 'Bug Created From';
+$lang->report->bugCreate = 'Bug Reported Statement';
+$lang->report->bugAssign = 'Bug Assigned Statement';
+$lang->report->workload = 'Team Workload Statement';
+$lang->report->workloadAB = 'Workload Statement';
+$lang->report->bugOpenedDate = 'Bug reported from';
$lang->report->taskAssignedDate = 'From';
$lang->report->beginAndEnd = ' From';
$lang->report->dept = 'Dept';
@@ -50,9 +50,9 @@ $lang->report->deviationChart = $lang->projectCommon . ' Deviation Chart';
$lang->reportList->project->lists[10] = $lang->projectCommon . ' Deviation|report|projectdeviation';
$lang->reportList->product->lists[10] = $lang->productCommon . ' Summary|report|productsummary';
-$lang->reportList->test->lists[10] = 'Bugs Reported|report|bugcreate';
-$lang->reportList->test->lists[13] = 'Bugs Assigned|report|bugassign';
-$lang->reportList->staff->lists[10] = 'Workload|report|workload';
+$lang->reportList->test->lists[10] = 'Bugs Reported Statement|report|bugcreate';
+$lang->reportList->test->lists[13] = 'Bugs Assigned Statement|report|bugassign';
+$lang->reportList->staff->lists[10] = 'Team Workload Statement|report|workload';
$lang->report->id = 'ID';
$lang->report->project = $lang->projectCommon;
diff --git a/module/story/model.php b/module/story/model.php
index dcee73ecde..e6c801684f 100644
--- a/module/story/model.php
+++ b/module/story/model.php
@@ -1685,6 +1685,7 @@ class storyModel extends model
->leftJoin(TABLE_PRODUCT)->alias('t4')->on('t2.product = t4.id')
->where($storyQuery)
->andWhere('t1.project')->eq((int)$projectID)
+ ->andWhere('t2.deleted')->eq(0)
->orderBy($orderBy)
->page($pager, 't2.id')
->fetchAll('id');
diff --git a/module/task/model.php b/module/task/model.php
index bea8fd7a40..104e736e9e 100644
--- a/module/task/model.php
+++ b/module/task/model.php
@@ -822,6 +822,11 @@ class taskModel extends model
->setDefault('assignedDate', $now)
->remove('comment,showModule')
->get();
+ if($oldTask->status != 'done' and $oldTask->status != 'closed' and $task->left == 0)
+ {
+ dao::$errors[] = sprintf($this->lang->error->notempty, $this->lang->task->left);
+ return false;
+ }
if(!empty($oldTask->team))
{
diff --git a/module/task/view/assignto.html.php b/module/task/view/assignto.html.php
index dca7f7b55c..befb86256e 100644
--- a/module/task/view/assignto.html.php
+++ b/module/task/view/assignto.html.php
@@ -39,10 +39,12 @@
team) ? $lang->task->assign : $lang->task->transferTo;?> |
team) ? $task->assignedTo : $task->nextUser, "class='form-control chosen'");?> | |
+ status != 'done' and $task->status != 'closed'):?>
| task->left;?> |
left, "class='form-control' autocomplete='off'");?> task->hour;?> | |
+
| comment;?> |
|
diff --git a/module/testreport/model.php b/module/testreport/model.php
index 799300f20b..15742911e1 100644
--- a/module/testreport/model.php
+++ b/module/testreport/model.php
@@ -321,7 +321,7 @@ class testreportModel extends model
*/
public function getTaskCases($tasks, $idList = '')
{
- return $this->dao->select('t2.*,t1.assignedTo,t1.lastRunner,t1.lastRunDate,t1.lastRunResult,t1.status')->from(TABLE_TESTRUN)->alias('t1')
+ return $this->dao->select('t2.*,t1.task,t1.assignedTo,t1.lastRunner,t1.lastRunDate,t1.lastRunResult,t1.status')->from(TABLE_TESTRUN)->alias('t1')
->leftJoin(TABLE_CASE)->alias('t2')->on('t1.case=t2.id')
->where('t1.task')->in(array_keys($tasks))
->beginIF($idList)->andWhere('t2.id')->in($idList)->fi()
diff --git a/module/testreport/view/blockcases.html.php b/module/testreport/view/blockcases.html.php
index b9e474f395..2360790f06 100644
--- a/module/testreport/view/blockcases.html.php
+++ b/module/testreport/view/blockcases.html.php
@@ -19,7 +19,7 @@
| id) . html::hidden('cases[]', $case->id)?> |
testcase->priList, $case->pri);?> |
- createLink('testcase', 'view', "caseID=$case->id", '', true), $case->title, '', "data-toggle='modal' data-type='iframe' data-width='90%'");?> |
+ createLink('testcase', 'view', "caseID=$case->id&version=$case->version&from=testtask&taskID=$case->task", '', true), $case->title, '', "data-toggle='modal' data-type='iframe' data-width='90%'");?> |
testcase->typeList, $case->type);?> |
assignedTo);?> |
lastRunner);?> |
diff --git a/module/testtask/control.php b/module/testtask/control.php
index d31fb26907..54255159c9 100644
--- a/module/testtask/control.php
+++ b/module/testtask/control.php
@@ -260,9 +260,9 @@ class testtask extends control
if(!$task) die(js::error($this->lang->notFound) . js::locate('back'));
$productID = $task->product;
$this->testtask->setMenu($this->products, $productID, $task->branch, $taskID);
- setcookie('preProductID', $productID, $this->config->cookieLife, $this->config->webRoot);
+ setcookie('preTaskID', $taskID, $this->config->cookieLife, $this->config->webRoot);
- if($this->cookie->preProductID != $productID)
+ if($this->cookie->preTaskID != $taskID)
{
$_COOKIE['taskCaseModule'] = 0;
setcookie('taskCaseModule', 0, $this->config->cookieLife, $this->config->webRoot);
diff --git a/module/testtask/js/common.js b/module/testtask/js/common.js
index fcee896bf6..1c67ebf668 100644
--- a/module/testtask/js/common.js
+++ b/module/testtask/js/common.js
@@ -28,3 +28,19 @@ function adjustPriBoxWidth()
var addonWidth = $('#ownerAndPriBox .input-group-addon').outerWidth();
$('#pri,#pri_chosen .chosen-single').css('width', boxWidth - beginWidth -addonWidth);
}
+
+function createBug(obj)
+{
+ var $form = $(obj).closest('form');
+ var params = $form.data('params');
+ var stepIdList = '';
+ $form.find('.step .step-id :checkbox').each(function()
+ {
+ if($(this).prop('checked')) stepIdList += $(this).val() + '_';
+ });
+
+ var onlybody = config.onlybody;
+ config.onlybody = 'no';
+ window.open(createLink('bug', 'create', params + ',stepIdList=' + stepIdList), '_blank');
+ config.onlybody = onlybody;
+}
diff --git a/module/testtask/view/results.html.php b/module/testtask/view/results.html.php
index a8b2386b5b..5842848947 100644
--- a/module/testtask/view/results.html.php
+++ b/module/testtask/view/results.html.php
@@ -49,7 +49,7 @@
id,projectID=$testtask->project,buildID=$testtask->build" : '';?>
|
- |