Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms into sprint/master_lanzongjun_fixbug
This commit is contained in:
@@ -11,3 +11,14 @@ sonarqube:
|
||||
allow_failure: true
|
||||
only:
|
||||
- master # or the name of your main branch
|
||||
packages:
|
||||
script:
|
||||
- make cizip
|
||||
only:
|
||||
- merge_request
|
||||
- master
|
||||
- tags
|
||||
cleanup_packages:
|
||||
script:
|
||||
- make clean
|
||||
when: on_failure
|
||||
|
||||
@@ -143,8 +143,9 @@ zentaoxx:
|
||||
mkdir zentaoxx/tools; cp tools/cn2tw.php zentaoxx/tools; cd zentaoxx/tools; php cn2tw.php
|
||||
cp tools/en2de.php zentaoxx/tools; cd zentaoxx/tools; php en2de.php ../
|
||||
rm -rf zentaoxx/tools
|
||||
zip -rqm -9 zentaoxx.$(VERSION).zip zentaoxx/*
|
||||
rm -rf xuan.zip xuan zentaoxx
|
||||
#zip -rqm -9 zentaoxx.$(VERSION).zip zentaoxx/*
|
||||
#rm -rf xuan.zip xuan zentaoxx
|
||||
rm -rf xuan.zip xuan
|
||||
package:
|
||||
# change mode.
|
||||
chmod -R 777 zentaopms/tmp/
|
||||
@@ -244,18 +245,31 @@ ciCommon:
|
||||
|
||||
ifneq ($(XUANPATH), )
|
||||
make zentaoxx
|
||||
unzip zentaoxx.*.zip
|
||||
cp zentaoxx/* zentaopms/ -r
|
||||
rm -rf zentaoxx
|
||||
endif
|
||||
|
||||
make package
|
||||
zip -rq -9 ZenTaoPMS.$(VERSION).zip zentaopms
|
||||
rm -fr zentaopms zentaoxx zentaoxx.*.zip
|
||||
make en
|
||||
rm -fr zentaopms zentaoxx zentaoxx.*.zip
|
||||
# en
|
||||
cd zentaopms/; grep -rl 'zentao.net'|xargs sed -i 's/zentao.net/zentao.pm/g';
|
||||
cd zentaopms/; grep -rl 'http://www.zentao.pm'|xargs sed -i 's/http:\/\/www.zentao.pm/https:\/\/www.zentao.pm/g';
|
||||
cd zentaopms/config/; echo >> config.php; echo '$$config->isINT = true;' >> config.php
|
||||
mv zentaopms zentaoalm
|
||||
zip -r -9 ZenTaoALM.$(VERSION).int.zip zentaoalm
|
||||
rm -fr zentaoalm
|
||||
# move pms zip to build and release path.
|
||||
rm -f $(BUILD_PATH)/ZenTao*.zip $(RELEASE_PATH)/ZenTaoPMS.$(VERSION).zip $(RELEASE_PATH)/ZenTaoALM.$(VERSION).int.zip
|
||||
cp ZenTaoPMS.$(VERSION).zip $(BUILD_PATH)
|
||||
cp ZenTaoPMS.$(VERSION).zip ZenTaoALM.$(VERSION).int.zip $(RELEASE_PATH)
|
||||
cizip:
|
||||
make ciCommon
|
||||
php tools/packZip.php $(VERSION)
|
||||
sh zip.sh
|
||||
rm -rf tmp/ *.sh
|
||||
rm -rf zentaobiz* zentaomax* $(RELEASE_PATH)/ZenTaoALM.$(VERSION)*.zip $(RELEASE_PATH)/ZenTaoPMS.$(VERSION)*.zip $(RELEASE_PATH)/pmsPack/*.zip
|
||||
mv ZenTaoPMS.$(VERSION).zip ZenTaoALM.$(VERSION).int.zip $(RELEASE_PATH)
|
||||
mv ZenTaoALM.$(VERSION).int.php*.zip ZenTaoPMS.$(VERSION).php*.zip $(RELEASE_PATH)/pmsPack
|
||||
ci:
|
||||
make ciCommon
|
||||
php tools/packZip.php $(VERSION)
|
||||
@@ -267,7 +281,8 @@ ci:
|
||||
php tools/packRpm.php $(VERSION)
|
||||
sh rpm.sh
|
||||
rm -rf tmp/
|
||||
rm -f zentaobiz*.zip zentaomax*.zip $(RELEASE_PATH)/ZenTaoALM.$(VERSION)*.zip $(RELEASE_PATH)/ZenTaoPMS.$(VERSION)*.zip $(RELEASE_PATH)/*.deb $(RELEASE_PATH)/*.rpm *.sh $(RELEASE_PATH)/pmsPack/*.zip $(RELEASE_PATH)/pmsPack/deb/* $(RELEASE_PATH)/pmsPack/rpm/*
|
||||
rm -rf zentaobiz* zentaomax* $(RELEASE_PATH)/ZenTaoALM.$(VERSION)*.zip $(RELEASE_PATH)/ZenTaoPMS.$(VERSION)*.zip $(RELEASE_PATH)/*.deb $(RELEASE_PATH)/*.rpm *.sh $(RELEASE_PATH)/pmsPack/*.zip $(RELEASE_PATH)/pmsPack/deb/* $(RELEASE_PATH)/pmsPack/rpm/*
|
||||
mv ZenTaoPMS.$(VERSION).zip ZenTaoALM.$(VERSION).int.zip $(RELEASE_PATH)
|
||||
mv ZenTaoALM.$(VERSION).int.php*.zip ZenTaoPMS.$(VERSION).php*.zip $(RELEASE_PATH)/pmsPack
|
||||
mv *.deb $(RELEASE_PATH)/pmsPack/deb
|
||||
mv *.rpm $(RELEASE_PATH)/pmsPack/rpm
|
||||
|
||||
@@ -25,6 +25,8 @@ class feedbackCloseEntry extends Entry
|
||||
$fields = 'closedReason,comment';
|
||||
$this->batchSetPost($fields);
|
||||
|
||||
if(empty($_POST)) $this->setPost('status', 'closed');
|
||||
|
||||
$control = $this->loadController('feedback', 'close');
|
||||
$control->close($feedbackID);
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ class feedbacksEntry extends entry
|
||||
if(strpos(strtolower($this->param('fields')), 'moduleandproduct') !== false) return $this->getModuleAndProduct();
|
||||
|
||||
$control = $this->loadController('feedback', 'admin');
|
||||
$control->admin($this->param('status', 'unclosed'), 0, $this->param('orderBy', 'id_desc'), 0, $this->param('limit', 20), $this->param('page', 1));
|
||||
$control->admin($this->param('solution', 'unclosed'), 0, $this->param('orderBy', 'id_desc'), 0, $this->param('limit', 20), $this->param('page', 1));
|
||||
$data = $this->getData();
|
||||
|
||||
if(!$data or !isset($data->status)) return $this->sendError(400, 'error');
|
||||
@@ -34,7 +34,7 @@ class feedbacksEntry extends entry
|
||||
$result = array();
|
||||
foreach($feedbacks as $feedback)
|
||||
{
|
||||
$result[] = $this->format($feedback, 'openedBy:user,openedDate:time,reviewedBy:user,reviewedDate:time,processedBy:user,processedDate:time,closedBy:user,closedDate:time,editedBy:user,editedDate:time,mailto:userList,deleted:bool');
|
||||
$result[] = $this->format($feedback, 'openedBy:user,openedDate:time,reviewedBy:user,reviewedDate:time,processedBy:user,processedDate:time,closedBy:user,closedDate:time,editedBy:user,editedDate:time,assignedTo:user,mailto:userList,deleted:bool');
|
||||
}
|
||||
|
||||
$data = array();
|
||||
|
||||
@@ -102,7 +102,7 @@ class projectEntry extends entry
|
||||
$linkedProducts = $this->loadModel('product')->getProducts($projectID);
|
||||
|
||||
/* Set $_POST variables. */
|
||||
$fields = 'name,begin,end,acl,parent,desc,PM,whitelist';
|
||||
$fields = 'name,code,begin,end,acl,parent,desc,PM,whitelist,model';
|
||||
$this->batchSetPost($fields, $oldProject);
|
||||
|
||||
$products = array();
|
||||
|
||||
@@ -266,6 +266,7 @@ $lang->action->label->tostory = 'converted to Story ';
|
||||
$lang->action->label->frombug = 'converted from Bug ';
|
||||
$lang->action->label->fromlib = 'imported from Library ';
|
||||
$lang->action->label->totask = 'converted to Task ';
|
||||
$lang->action->label->converttotask = 'converted to Task ';
|
||||
$lang->action->label->svncommited = 'committed SVN ';
|
||||
$lang->action->label->gitcommited = 'committed Git ';
|
||||
$lang->action->label->linked2plan = 'linked to Plan ';
|
||||
|
||||
@@ -266,6 +266,7 @@ $lang->action->label->tostory = "转{$lang->SRCommon}";
|
||||
$lang->action->label->frombug = "转{$lang->SRCommon}";
|
||||
$lang->action->label->fromlib = '从用例库导入';
|
||||
$lang->action->label->totask = '转任务';
|
||||
$lang->action->label->converttotask = '转任务';
|
||||
$lang->action->label->svncommited = '提交代码';
|
||||
$lang->action->label->gitcommited = '提交代码';
|
||||
$lang->action->label->linked2plan = "关联计划";
|
||||
|
||||
@@ -40,12 +40,19 @@ $config->bug->list->exportFields = 'id, product, branch, module, project, execut
|
||||
if($config->systemMode == 'classic') $config->bug->list->exportFields = str_replace(' project,', '', $config->bug->list->exportFields);
|
||||
|
||||
$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';
|
||||
if($config->systemMode == 'new')
|
||||
{
|
||||
$config->bug->list->customBatchCreateFields = 'project,execution,steps,type,pri,deadline,severity,os,browser,keywords';
|
||||
}
|
||||
else
|
||||
{
|
||||
$config->bug->list->customBatchCreateFields = 'execution,steps,type,pri,deadline,severity,os,browser,keywords';
|
||||
}
|
||||
|
||||
$config->bug->custom = new stdclass();
|
||||
$config->bug->custom->createFields = $config->bug->list->customCreateFields;
|
||||
$config->bug->custom->batchCreateFields = 'execution,deadline,steps,type,severity,os,browser,%s';
|
||||
$config->bug->custom->batchCreateFields = 'project,execution,deadline,steps,type,severity,os,browser,%s';
|
||||
$config->bug->custom->batchEditFields = 'type,severity,pri,assignedTo,deadline,status,resolvedBy,resolution';
|
||||
|
||||
$config->bug->editor = new stdclass();
|
||||
|
||||
@@ -823,6 +823,8 @@ class bug extends control
|
||||
$this->view->stories = $stories;
|
||||
$this->view->builds = $builds;
|
||||
$this->view->users = $this->user->getPairs('devfirst|noclosed');
|
||||
$this->view->projects = array('' => '') + $this->product->getProjectPairsByProduct($productID, $branch ? "0,$branch" : 0, 'id_desc', $projectID);
|
||||
$this->view->projectID = $projectID;
|
||||
$this->view->executions = array('' => '') + $this->product->getExecutionPairsByProduct($productID, $branch ? "0,$branch" : 0, 'id_desc', $projectID);
|
||||
$this->view->executionID = $executionID;
|
||||
$this->view->moduleOptionMenu = $this->tree->getOptionMenu($productID, $viewType = 'bug', $startModuleID = 0, $branch === 'all' ? 0 : $branch);
|
||||
@@ -880,6 +882,8 @@ class bug extends control
|
||||
$product = $this->loadModel('product')->getByID($productID);
|
||||
$branches = $product->type == 'normal' ? array() : $this->loadModel('branch')->getPairs($bug->product);
|
||||
|
||||
$projects = $this->loadModel('product')->getProjectPairsByProduct($productID, $bug->branch);
|
||||
|
||||
$this->executeHooks($bugID);
|
||||
|
||||
/* Header and positon. */
|
||||
@@ -902,6 +906,8 @@ class bug extends control
|
||||
$this->view->preAndNext = $this->loadModel('common')->getPreAndNextObject('bug', $bugID);
|
||||
$this->view->product = $product;
|
||||
|
||||
$this->view->projects = array('' => '') + $projects;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -47,5 +47,7 @@ html[lang='en'] #deadlineTd .input-group-addon {padding: 5px 18px;}
|
||||
#branch_chosen {min-width: 90px;}
|
||||
#notifyEmailTd .input-group-addon, #deadlineTd .input-group-addon {border-radius: 2px 0px 2px 0px !important;}
|
||||
|
||||
#feedback.input-group + #notifyEmailLabel {position: relative; width: 50%; left: 48%}
|
||||
#executionLabel {position: relative; width: 50%; left: 48%}
|
||||
#feedback.input-group + #notifyEmailLabel {position: relative; width: 50%; left: 48%;}
|
||||
#executionLabel {display: inline; position: relative; width: 50%; left: 37%;}
|
||||
#projectLabel {display: inline;}
|
||||
#openedBuildLabel {display: inline; position: relative; width: 50%; left: 14%;}
|
||||
|
||||
@@ -60,17 +60,25 @@ function setLane(regionID, num)
|
||||
}
|
||||
|
||||
/**
|
||||
* Load execution builds
|
||||
* Load execution builds.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int $executionID
|
||||
* @param int $index
|
||||
* @param int $productID
|
||||
* @param int $executionID
|
||||
* @param int $index
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function loadExecutionBuilds(productID, executionID, index)
|
||||
{
|
||||
branch = $('#branches' + index).val();
|
||||
var branch = $('#branches' + index).val();
|
||||
if(executionID == 'ditto')
|
||||
{
|
||||
for(var i = index - 1; i > 0, executionID == 'ditto'; i--)
|
||||
{
|
||||
executionID = $('#executions' + i).val();
|
||||
}
|
||||
}
|
||||
|
||||
if(executionID != 0)
|
||||
{
|
||||
link = createLink('build', 'ajaxGetExecutionBuilds', 'executionID=' + executionID + '&productID=' + productID + "&varName=openedBuilds&build=&branch=" + branch + "&index=" + index);
|
||||
|
||||
+46
-3
@@ -339,6 +339,39 @@ function loadProductExecutions(productID, projectID = 0)
|
||||
projectID != 0 ? loadProjectBuilds(projectID) : loadProductBuilds(productID);
|
||||
}
|
||||
|
||||
/**
|
||||
* Load executions of product and project.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int $projectID
|
||||
* @param int $num
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function loadProductExecutionsByProject(productID, projectID = 0, num = 0)
|
||||
{
|
||||
var branch = $('#branches' + num).val();
|
||||
if(typeof(branch) == 'undefined') branch = 0;
|
||||
|
||||
if(projectID == 'ditto')
|
||||
{
|
||||
for(var i = num - 1; i > 0, projectID == 'ditto'; i--)
|
||||
{
|
||||
projectID = $('#projects' + i).val();
|
||||
}
|
||||
}
|
||||
|
||||
var link = createLink('product', 'ajaxGetExecutionsByProject', 'productID=' + productID + '&projectID=' + projectID + '&branch=' + branch + '&number=' + num);
|
||||
$.get(link, function(executions)
|
||||
{
|
||||
if(!executions) executions = '<select id="executions' + num + '" name="executions[' + num + ']" class="form-control"></select>';
|
||||
$('#executions' + num).replaceWith(executions);
|
||||
$("#executions" + num + "_chosen").remove();
|
||||
$("#executions" + num).next('.picker').remove();
|
||||
$("#executions" + num).chosen();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Load product plans.
|
||||
*
|
||||
@@ -761,7 +794,7 @@ function notice()
|
||||
function setBranchRelated(branchID, productID, num)
|
||||
{
|
||||
var currentModuleID = config.currentMethod == 'batchedit' ? $('#modules' + num).val() : 0;
|
||||
moduleLink = createLink('tree', 'ajaxGetModules', 'productID=' + productID + '&viewType=bug&branch=' + branchID + '&num=' + num + '¤tModuleID=' + currentModuleID);
|
||||
var moduleLink = createLink('tree', 'ajaxGetModules', 'productID=' + productID + '&viewType=bug&branch=' + branchID + '&num=' + num + '¤tModuleID=' + currentModuleID);
|
||||
$.get(moduleLink, function(modules)
|
||||
{
|
||||
if(!modules) modules = '<select id="modules' + num + '" name="modules[' + num + ']" class="form-control"></select>';
|
||||
@@ -771,7 +804,17 @@ function setBranchRelated(branchID, productID, num)
|
||||
$("#modules" + num).chosen();
|
||||
});
|
||||
|
||||
executionLink = createLink('product', 'ajaxGetExecutions', 'productID=' + productID + '&projectID=0&branch=' + branchID + '&num=' + num);
|
||||
var projectLink = createLink('product', 'ajaxGetProjectsByBranch', 'productID=' + productID + '&branch=' + branchID + '&num=' + num);
|
||||
$.get(projectLink, function(projects)
|
||||
{
|
||||
if(!projects) projects = '<select id="projects' + num + '" name="projects[' + num + ']" class="form-control"></select>';
|
||||
$('#projects' + num).replaceWith(projects);
|
||||
$("#projects" + num + "_chosen").remove();
|
||||
$("#projects" + num).next('.picker').remove();
|
||||
$("#projects" + num).chosen();
|
||||
});
|
||||
|
||||
var executionLink = createLink('product', 'ajaxGetExecutions', 'productID=' + productID + '&projectID=0&branch=' + branchID + '&num=' + num);
|
||||
$.get(executionLink, function(executions)
|
||||
{
|
||||
if(!executions) executions = '<select id="executions' + num + '" name="executions[' + num + ']" class="form-control"></select>';
|
||||
@@ -781,7 +824,7 @@ function setBranchRelated(branchID, productID, num)
|
||||
$("#executions" + num).chosen();
|
||||
});
|
||||
|
||||
buildLink = createLink('build', 'ajaxGetProductBuilds', 'productID=' + productID + "&varName=openedBuilds&build=&branch=" + branchID + "&index=" + num);
|
||||
var buildLink = createLink('build', 'ajaxGetProductBuilds', 'productID=' + productID + "&varName=openedBuilds&build=&branch=" + branchID + "&index=" + num);
|
||||
|
||||
/* If the branch of the current row is inconsistent with the one below, clear the module and execution of the nex row. */
|
||||
if(config.currentMethod == 'batchcreate')
|
||||
|
||||
@@ -7,3 +7,49 @@ $('#tostory').click(function()
|
||||
{
|
||||
if(!confirm(confrimToStory)) return false;
|
||||
});
|
||||
|
||||
/**
|
||||
* Load Product executions in html.
|
||||
*
|
||||
* @param int productID
|
||||
* @param int projectID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function loadProductExecutions(productID, projectID)
|
||||
{
|
||||
link = createLink('product', 'ajaxGetExecutions', 'productID=' + productID + '&projectID=' + projectID +'&branch=' + branchID + '&number=&executionID=0&from=bugToTask');
|
||||
|
||||
$('#executionBox').load(link, function()
|
||||
{
|
||||
$(this).find('select').chosen();
|
||||
});
|
||||
}
|
||||
|
||||
$('#toTaskButton').on('click', function()
|
||||
{
|
||||
var projectID = $('#taskProjects').val();
|
||||
var executionID = $('#execution').val();
|
||||
var executionID = executionID ? executionID : 0;
|
||||
|
||||
if(systemMode == 'new' && projectID && executionID != 0)
|
||||
{
|
||||
$('#cancelButton').click();
|
||||
link = createLink('task', 'create', 'executionID=' + executionID + '&storyID=0&moduleID=0&taskID=0&todoID=0&extra=projectID=' + projectID + '&bugID=' + bugID);
|
||||
window.parent.$.apps.open(link, 'execution');
|
||||
}
|
||||
else if(systemMode == 'classic' && executionID)
|
||||
{
|
||||
$('#cancelButton').click();
|
||||
link = createLink('task', 'create', 'executionID=' + executionID + '&storyID=0&moduleID=0&taskID=0&todoID=0&extra=projectID=0&bugID=' + bugID);
|
||||
window.parent.$.apps.open(link, 'execution');
|
||||
}
|
||||
else if(executionID == 0)
|
||||
{
|
||||
alert(errorNoExecution);
|
||||
}
|
||||
else
|
||||
{
|
||||
alert(errorNoProject);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -95,6 +95,10 @@ $lang->bug->toCase = 'To Case';
|
||||
$lang->bug->colorTag = 'Color';
|
||||
$lang->bug->fixedRate = 'Fixed Rate';
|
||||
$lang->bug->noticefeedbackBy = 'NoticeFeedbackBy';
|
||||
$lang->bug->selectProjects = 'Select Projects';
|
||||
$lang->bug->nextStep = 'Next Step';
|
||||
$lang->bug->noProject = 'Haven’t chosen a project yet';
|
||||
$lang->bug->noExecution = 'Haven’t chosen a execution yet';
|
||||
|
||||
/* Method list. */
|
||||
$lang->bug->index = 'Bug Home';
|
||||
@@ -405,6 +409,7 @@ $lang->bug->action = new stdclass();
|
||||
$lang->bug->action->resolved = array('main' => '$date, resolved by <strong>$actor</strong> and the resolution is <strong>$extra</strong> $appendLink.', 'extra' => 'resolutionList');
|
||||
$lang->bug->action->tostory = array('main' => '$date, converted by <strong>$actor</strong> to <strong>Story</strong> with ID <strong>$extra</strong>.');
|
||||
$lang->bug->action->totask = array('main' => '$date, imported by <strong>$actor</strong> as <strong>Task</strong> with ID <strong>$extra</strong>.');
|
||||
$lang->bug->action->converttotask = array('main' => '$date, imported by <strong>$actor</strong> as <strong>Task</strong>,with ID <strong>$extra</strong>。');
|
||||
$lang->bug->action->linked2plan = array('main' => '$date, linked by <strong>$actor</strong> to Plan <strong>$extra</strong>.');
|
||||
$lang->bug->action->unlinkedfromplan = array('main' => '$date, deleted by <strong>$actor</strong> from Plan <strong>$extra</strong>.');
|
||||
$lang->bug->action->linked2build = array('main' => '$date, linked by <strong>$actor</strong> to Build <strong>$extra</strong>.');
|
||||
|
||||
@@ -95,6 +95,10 @@ $lang->bug->toCase = '生成用例';
|
||||
$lang->bug->colorTag = '颜色标签';
|
||||
$lang->bug->fixedRate = '修复率';
|
||||
$lang->bug->noticefeedbackBy = '通知反馈者';
|
||||
$lang->bug->selectProjects = '选择项目';
|
||||
$lang->bug->nextStep = '下一步';
|
||||
$lang->bug->noProject = '还没有选择项目!';
|
||||
$lang->bug->noExecution = '还没有选择执行!';
|
||||
|
||||
/* 方法列表。*/
|
||||
$lang->bug->index = '首页';
|
||||
@@ -405,6 +409,7 @@ $lang->bug->action = new stdclass();
|
||||
$lang->bug->action->resolved = array('main' => '$date, 由 <strong>$actor</strong> 解决,方案为 <strong>$extra</strong> $appendLink。', 'extra' => 'resolutionList');
|
||||
$lang->bug->action->tostory = array('main' => '$date, 由 <strong>$actor</strong> 转为<strong> ' . $lang->SRCommon . '</strong>,编号为 <strong>$extra</strong>。');
|
||||
$lang->bug->action->totask = array('main' => '$date, 由 <strong>$actor</strong> 导入为<strong>任务</strong>,编号为 <strong>$extra</strong>。');
|
||||
$lang->bug->action->converttotask = array('main' => '$date, 由 <strong>$actor</strong> 转为<strong>任务</strong>,编号为 <strong>$extra</strong>。');
|
||||
$lang->bug->action->linked2plan = array('main' => '$date, 由 <strong>$actor</strong> 关联到计划 <strong>$extra</strong>。');
|
||||
$lang->bug->action->unlinkedfromplan = array('main' => '$date, 由 <strong>$actor</strong> 从计划 <strong>$extra</strong> 移除。');
|
||||
$lang->bug->action->linked2build = array('main' => '$date, 由 <strong>$actor</strong> 关联到版本 <strong>$extra</strong>。');
|
||||
|
||||
@@ -159,6 +159,7 @@ class bugModel extends model
|
||||
while($module = $stmt->fetch()) $moduleOwners[$module->id] = $module->owner;
|
||||
|
||||
$module = 0;
|
||||
$project = 0;
|
||||
$execution = 0;
|
||||
$type = '';
|
||||
$pri = 0;
|
||||
@@ -167,6 +168,7 @@ class bugModel extends model
|
||||
foreach($data->title as $i => $title)
|
||||
{
|
||||
if($data->modules[$i] != 'ditto') $module = (int)$data->modules[$i];
|
||||
if($data->projects[$i] != 'ditto') $project = (int)$data->projects[$i];
|
||||
if($data->executions[$i] != 'ditto') $execution = (int)$data->executions[$i];
|
||||
if($data->types[$i] != 'ditto') $type = $data->types[$i];
|
||||
if($data->pris[$i] != 'ditto') $pri = $data->pris[$i];
|
||||
@@ -174,6 +176,7 @@ class bugModel extends model
|
||||
if($data->browsers[$i] != 'ditto') $browser = $data->browsers[$i];
|
||||
|
||||
$data->modules[$i] = (int)$module;
|
||||
$data->projects[$i] = (int)$project;
|
||||
$data->executions[$i] = (int)$execution;
|
||||
$data->types[$i] = $type;
|
||||
$data->pris[$i] = $pri;
|
||||
@@ -196,6 +199,7 @@ class bugModel extends model
|
||||
$bug->product = (int)$productID;
|
||||
$bug->branch = isset($data->branches) ? (int)$data->branches[$i] : 0;
|
||||
$bug->module = (int)$data->modules[$i];
|
||||
$bug->project = (int)$data->projects[$i];
|
||||
$bug->execution = (int)$data->executions[$i];
|
||||
$bug->openedBuild = implode(',', $data->openedBuilds[$i]);
|
||||
$bug->color = $data->color[$i];
|
||||
@@ -3385,6 +3389,7 @@ class bugModel extends model
|
||||
if($type == 'view' && $this->app->tab != 'product')
|
||||
{
|
||||
$menu .= $this->buildMenu('bug', 'toStory', $toStoryParams, $bug, $type, $this->lang->icons['story'], '', '', '', "data-app='product' id='tostory'", $this->lang->bug->toStory);
|
||||
if(common::hasPriv('task', 'create')) $menu .= html::a('#toTask', "<i class='icon icon-check'></i><span class='text'>{$this->lang->bug->toTask}</span>", '', "data-app='qa' data-toggle='modal' class='btn btn-link'");
|
||||
$menu .= $this->buildMenu('bug', 'createCase', $convertParams, $bug, $type, 'sitemap');
|
||||
}
|
||||
if($type == 'view')
|
||||
|
||||
@@ -55,6 +55,9 @@ js::set('requiredFields', $config->bug->create->requiredFields);
|
||||
<th class='c-id'><?php echo $lang->idAB;?></th>
|
||||
<th class='c-branch<?php echo zget($visibleFields, $product->type, ' hidden')?>'> <?php echo $lang->product->branch;?></th>
|
||||
<th class='c-module<?php echo zget($requiredFields, 'module', '', ' required');?>'> <?php echo $lang->bug->module;?></th>
|
||||
<?php if($config->systemMode == 'new'):?>
|
||||
<th class='c-project<?php echo zget($visibleFields, 'project', ' hidden') . zget($requiredFields, 'project', '', ' required');?>'><?php echo (isset($project->model) and $project->model == 'kanban') ? $lang->bug->kanban : $lang->bug->project;?></th>
|
||||
<?php endif;?>
|
||||
<th class='c-execution<?php echo zget($visibleFields, 'execution', ' hidden') . zget($requiredFields, 'execution', '', ' required');?>'><?php echo (isset($project->model) and $project->model == 'kanban') ? $lang->bug->kanban : $lang->bug->execution;?></th>
|
||||
<th class='c-build required'><?php echo $lang->bug->openedBuild;?></th>
|
||||
<th class='c-title required'><?php echo $lang->bug->title;?></th>
|
||||
@@ -83,6 +86,7 @@ js::set('requiredFields', $config->bug->create->requiredFields);
|
||||
<tbody>
|
||||
<?php
|
||||
$moduleOptionMenu += array('ditto' => $lang->bug->ditto);
|
||||
$projects += array('ditto' => $lang->bug->ditto);
|
||||
$executions += array('ditto' => $lang->bug->ditto);
|
||||
$lang->bug->typeList += array('ditto' => $lang->bug->ditto);
|
||||
$lang->bug->priList += array('ditto' => $lang->bug->ditto);
|
||||
@@ -94,6 +98,7 @@ js::set('requiredFields', $config->bug->create->requiredFields);
|
||||
<?php foreach($titles as $bugTitle => $fileName):?>
|
||||
<?php
|
||||
$moduleID = $i == 1 ? $moduleID : 'ditto';
|
||||
$projectID = $i == 1 ? $projectID : 'ditto';
|
||||
$executionID = $i == 1 ? $executionID : 'ditto';
|
||||
$type = $i == 1 ? '' : 'ditto';
|
||||
$pri = $i == 1 ? 0 : 'ditto';
|
||||
@@ -104,6 +109,9 @@ js::set('requiredFields', $config->bug->create->requiredFields);
|
||||
<td class='text-center'><?php echo $i;?></td>
|
||||
<td class='<?php echo zget($visibleFields, $product->type, ' hidden')?>' style='overflow:visible'><?php echo html::select("branches[$i]", $branches, $branch, "class='form-control chosen' onchange='setBranchRelated(this.value, $productID, $i)'");?></td>
|
||||
<td><?php echo html::select("modules[$i]", $moduleOptionMenu, $moduleID, "class='form-control chosen'");?></td>
|
||||
<?php if($config->systemMode == 'new'):?>
|
||||
<td class='<?php echo zget($visibleFields, 'project', ' hidden')?>' style='overflow:visible'><?php echo html::select("projects[$i]", $projects, $projectID, "class='form-control chosen' onchange = 'loadProductExecutionsByProject($productID, this.value, $i)'");?></td>
|
||||
<?php endif;?>
|
||||
<td class='<?php echo zget($visibleFields, 'execution', ' hidden')?>' style='overflow:visible'><?php echo html::select("executions[$i]", $executions, $executionID, "class='form-control chosen' onchange='loadExecutionBuilds($productID, this.value, $i)'");?></td>
|
||||
<td id='buildBox<?php echo $i;?>'><?php echo html::select("openedBuilds[$i][]", $builds, 'trunk', "class='form-control chosen' multiple");?></td>
|
||||
<td>
|
||||
@@ -144,6 +152,7 @@ js::set('requiredFields', $config->bug->create->requiredFields);
|
||||
<?php for($i = $nextStart; $i <= $config->bug->batchCreate; $i++):?>
|
||||
<?php
|
||||
$moduleID = $i - $nextStart == 0 ? $moduleID : 'ditto';
|
||||
$projectID = $i - $nextStart == 0 ? $projectID : 'ditto';
|
||||
$executionID = $i - $nextStart == 0 ? $executionID : 'ditto';
|
||||
$type = $i - $nextStart == 0 ? '' : 'ditto';
|
||||
$pri = $i - $nextStart == 0 ? 0 : 'ditto';
|
||||
@@ -154,6 +163,9 @@ js::set('requiredFields', $config->bug->create->requiredFields);
|
||||
<td><?php echo $i;?></td>
|
||||
<td class='<?php echo zget($visibleFields, $product->type, ' hidden')?>' style='overflow:visible'><?php echo html::select("branches[$i]", $branches, $branch, "class='form-control chosen' onchange='setBranchRelated(this.value, $productID, $i)'");?></td>
|
||||
<td><?php echo html::select("modules[$i]", $moduleOptionMenu, $moduleID, "class='form-control chosen'");?></td>
|
||||
<?php if($config->systemMode == 'new'):?>
|
||||
<td class='<?php echo zget($visibleFields, 'project', ' hidden')?>' style='overflow:visible'><?php echo html::select("projects[$i]", $projects, $projectID, "class='form-control chosen' onchange = 'loadProductExecutionsByProject($productID, this.value, $i)'");?></td>
|
||||
<?php endif;?>
|
||||
<td class='<?php echo zget($visibleFields, 'execution', ' hidden')?>' style='overflow:visible'><?php echo html::select("executions[$i]", $executions, $executionID, "class='form-control chosen' onchange='loadExecutionBuilds($productID, this.value, $i)'");?></td>
|
||||
<td id='buildBox<?php echo $i;?>'><?php echo html::select("openedBuilds[$i][]", $builds, '', "class='form-control chosen' multiple");?></td>
|
||||
<td>
|
||||
@@ -207,6 +219,9 @@ js::set('requiredFields', $config->bug->create->requiredFields);
|
||||
<td>%s</td>
|
||||
<td class='<?php echo zget($visibleFields, $product->type, ' hidden')?>' style='overflow:visible'><?php echo html::select("branches[%s]", $branches, $branch, "class='form-control chosen' onchange='setBranchRelated(this.value, $productID, \"%s\")'");?></td>
|
||||
<td><?php echo html::select("modules[%s]", $moduleOptionMenu, $moduleID, "class='form-control'");?></td>
|
||||
<?php if($config->systemMode == 'new'):?>
|
||||
<td class='<?php echo zget($visibleFields, 'project', ' hidden')?>' style='overflow:visible'><?php echo html::select("projects[%s]", $projects, $projectID, "class='form-control chosen' onchange = 'loadProductExecutionsByProject($productID, this.value, \"%s\")'");?></td>
|
||||
<?php endif;?>
|
||||
<td class='<?php echo zget($visibleFields, 'execution', ' hidden')?>' style='overflow:visible'><?php echo html::select("executions[%s]", $executions, $executionID, "class='form-control chosen' onchange='loadExecutionBuilds($productID, this.value, \"%s\")'");?></td>
|
||||
<td id='buildBox%s'><?php echo html::select("openedBuilds[%s][]", $builds, '', "class='form-control chosen' multiple");?></td>
|
||||
<td>
|
||||
|
||||
@@ -14,6 +14,12 @@
|
||||
<?php include '../../common/view/kindeditor.html.php';?>
|
||||
<?php js::set('sysurl', common::getSysUrl());?>
|
||||
<?php js::set('confrimToStory', $lang->bug->confirmToStory);?>
|
||||
<?php js::set('systemMode', $config->systemMode);?>
|
||||
<?php js::set('tab', $app->tab);?>
|
||||
<?php js::set('bugID', $bug->id);?>
|
||||
<?php js::set('branchID', $bug->branch);?>
|
||||
<?php js::set('errorNoExecution', $lang->bug->noExecution);?>
|
||||
<?php js::set('errorNoProject', $lang->bug->noProject);?>
|
||||
<?php $browseLink = $app->session->bugList ? $app->session->bugList : inlink('browse', "productID=$bug->product");?>
|
||||
<?php if(strpos($_SERVER["QUERY_STRING"], 'isNotice=1') === false):?>
|
||||
<div id="mainMenu" class="clearfix">
|
||||
@@ -425,6 +431,40 @@
|
||||
<div id="mainActions" class='main-actions'>
|
||||
<?php common::printPreAndNext($preAndNext);?>
|
||||
</div>
|
||||
<div class="modal fade" id="toTask">
|
||||
<div class="modal-dialog mw-500px">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title"><?php echo $lang->bug->selectProjects;?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<table class='table table-form'>
|
||||
<?php if($this->config->systemMode == 'new'):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->bug->project;?></th>
|
||||
<td class='required'><?php echo html::select('taskProjects', $projects, '', "class='form-control chosen' onchange='loadProductExecutions({$productID}, this.value)'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th id='executionHead'><?php echo $lang->bug->execution;?></th>
|
||||
<td id='executionBox' class='required'><?php echo html::select('execution', '', '', "class='form-control chosen'");?></td>
|
||||
</tr>
|
||||
<?php else:?>
|
||||
<tr>
|
||||
<th><?php echo $lang->execution->common;?></th>
|
||||
<td><?php echo html::select('execution', $projects, '', "class='form-control chosen'");?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<td colspan='2' class='text-center'>
|
||||
<?php echo html::commonButton($lang->bug->nextStep, "id='toTaskButton'", 'btn btn-primary btn-wide');?>
|
||||
<?php echo html::commonButton($lang->cancel, "id='cancelButton' data-dismiss='modal'", 'btn btn-default btn-wide');?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function handleLinkButtonClick()
|
||||
{
|
||||
|
||||
@@ -1920,7 +1920,7 @@ EOD;
|
||||
if(strtolower($key) == 'closeddate' && $value == '') continue;
|
||||
if(strtolower($key) == 'actualcloseddate' && $value == '') continue;
|
||||
|
||||
if(array_key_exists($key, $old) and $value != stripslashes($old->$key))
|
||||
if(isset($old->$key) and $value != stripslashes($old->$key))
|
||||
{
|
||||
$diff = '';
|
||||
if(substr_count($value, "\n") > 1 or
|
||||
|
||||
@@ -811,7 +811,7 @@ class doc extends control
|
||||
->orderBy('`order` asc')
|
||||
->fetchPairs();
|
||||
|
||||
return print(html::select('doc', $docs, '', "class='form-control chosen'"));
|
||||
return print(html::select('doc', array('' => '') + $docs, '', "class='form-control chosen'"));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -3842,10 +3842,10 @@ class execution extends control
|
||||
$enterTime = date('Y-m-d H:i:s', $enterTime);
|
||||
$lastEditedTime = $this->dao->select("max(lastEditedTime) as lastEditedTime")->from(TABLE_KANBANLANE)->where('execution')->eq($executionID)->fetch('lastEditedTime');
|
||||
|
||||
if($from == 'execution') $this->session->set('taskSearchValue', $searchValue);
|
||||
if($from == 'RD') $this->session->set('rdSearchValue', $searchValue);
|
||||
if($lastEditedTime > $enterTime or $groupBy != 'default' or !empty($searchValue))
|
||||
{
|
||||
if($from == 'execution') $this->session->set('taskSearchValue', $searchValue);
|
||||
if($from == 'RD') $this->session->set('rdSearchValue', $searchValue);
|
||||
$kanbanGroup = $from == 'execution' ? $this->loadModel('kanban')->getExecutionKanban($executionID, $browseType, $groupBy, $searchValue) : $this->loadModel('kanban')->getRDKanban($executionID, $browseType, 'id_asc', 0, $groupBy, $searchValue);
|
||||
return print(json_encode($kanbanGroup));
|
||||
}
|
||||
|
||||
@@ -1674,6 +1674,7 @@ function searchCards(value)
|
||||
if(rdSearchValue != '' && groupBy == 'default' && data.laneCount != 0) $(this).parent().show();
|
||||
if(rdSearchValue != '' && groupBy == 'default' && data.laneCount == 0) $(this).parent().hide();
|
||||
|
||||
$(this).empty();
|
||||
hideAll = !updateRegion(regionID, data) && hideAll;
|
||||
});
|
||||
|
||||
|
||||
@@ -197,29 +197,27 @@ if($config->systemMode == 'new')
|
||||
$lang->resource->program->unlinkStakeholder = 'unlinkStakeholder';
|
||||
$lang->resource->program->batchUnlinkStakeholders = 'batchUnlinkStakeholders';
|
||||
$lang->resource->program->unbindWhitelist = 'unbindWhitelist';
|
||||
$lang->resource->program->export = 'export';
|
||||
$lang->resource->program->updateOrder = 'updateOrder';
|
||||
|
||||
$lang->program->methodOrder[5] = 'browse';
|
||||
$lang->program->methodOrder[10] = 'kanban';
|
||||
$lang->program->methodOrder[15] = 'view';
|
||||
$lang->program->methodOrder[20] = 'product';
|
||||
$lang->program->methodOrder[25] = 'create';
|
||||
$lang->program->methodOrder[30] = 'edit';
|
||||
$lang->program->methodOrder[35] = 'view';
|
||||
$lang->program->methodOrder[40] = 'start';
|
||||
$lang->program->methodOrder[45] = 'suspend';
|
||||
$lang->program->methodOrder[50] = 'activate';
|
||||
$lang->program->methodOrder[55] = 'close';
|
||||
$lang->program->methodOrder[60] = 'delete';
|
||||
$lang->program->methodOrder[65] = 'project';
|
||||
$lang->program->methodOrder[70] = 'stakeholder';
|
||||
$lang->program->methodOrder[75] = 'createStakeholder';
|
||||
$lang->program->methodOrder[80] = 'unlinkStakeholder';
|
||||
$lang->program->methodOrder[85] = 'batchUnlinkStakeholders';
|
||||
$lang->program->methodOrder[90] = 'unbindWhitelist';
|
||||
$lang->program->methodOrder[95] = 'export';
|
||||
$lang->program->methodOrder[100] = 'updateOrder';
|
||||
$lang->program->methodOrder[5] = 'browse';
|
||||
$lang->program->methodOrder[10] = 'kanban';
|
||||
$lang->program->methodOrder[15] = 'view';
|
||||
$lang->program->methodOrder[20] = 'product';
|
||||
$lang->program->methodOrder[25] = 'create';
|
||||
$lang->program->methodOrder[30] = 'edit';
|
||||
$lang->program->methodOrder[35] = 'view';
|
||||
$lang->program->methodOrder[40] = 'start';
|
||||
$lang->program->methodOrder[45] = 'suspend';
|
||||
$lang->program->methodOrder[50] = 'activate';
|
||||
$lang->program->methodOrder[55] = 'close';
|
||||
$lang->program->methodOrder[60] = 'delete';
|
||||
$lang->program->methodOrder[65] = 'project';
|
||||
$lang->program->methodOrder[70] = 'stakeholder';
|
||||
$lang->program->methodOrder[75] = 'createStakeholder';
|
||||
$lang->program->methodOrder[80] = 'unlinkStakeholder';
|
||||
$lang->program->methodOrder[85] = 'batchUnlinkStakeholders';
|
||||
$lang->program->methodOrder[90] = 'unbindWhitelist';
|
||||
$lang->program->methodOrder[95] = 'updateOrder';
|
||||
|
||||
/* Program plan. */
|
||||
$lang->resource->programplan = new stdclass();
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
echo html::a(inlink($app->rawMethod, "mode=requirement&type=reviewBy¶m=$param&orderBy=$orderBy&recTotal=$recTotal&recPerPage=$recPerPage&pagerID=$pageID"), "<span class='text'>{$lang->my->storyMenu->reviewByMe}</span>" . ($type == 'reviewBy' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'reviewBy' ? ' btn-active-text' : '') . "'");
|
||||
}
|
||||
?>
|
||||
<a class="btn btn-link querybox-toggle" id='bysearchTab'><i class="icon icon-search muted"></i><?php $this->loadModel('search');echo $lang->search->common;?></a>
|
||||
<a class="btn btn-link querybox-toggle" id='bysearchTab'><i class="icon icon-search muted"></i> <?php $this->loadModel('search');echo $lang->search->common;?></a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="mainContent">
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
echo html::a(inlink($app->rawMethod, "mode=story&type=reviewBy¶m=$param&orderBy=$orderBy&recTotal=$recTotal&recPerPage=$recPerPage&pagerID=$pageID"), "<span class='text'>{$lang->my->storyMenu->reviewByMe}</span>" . ($type == 'reviewBy' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'reviewBy' ? ' btn-active-text' : '') . "'");
|
||||
}
|
||||
?>
|
||||
<a class="btn btn-link querybox-toggle" id='bysearchTab'><i class="icon icon-search muted"></i><?php $this->loadModel('search');echo $lang->search->common;?></a>
|
||||
<a class="btn btn-link querybox-toggle" id='bysearchTab'><i class="icon icon-search muted"></i> <?php $this->loadModel('search');echo $lang->search->common;?></a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="mainContent">
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
echo html::a(inlink($app->rawMethod, "mode=$mode&type=assigntome"), "<span class='text'>{$lang->my->assignedToMe}</span>" . ($type == 'assigntome' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'assigntome' ? ' btn-active-text' : '') . "'");
|
||||
}
|
||||
?>
|
||||
<a class="btn btn-link querybox-toggle" id='bysearchTab'><i class="icon icon-search muted"></i><?php $this->loadModel('search');echo $lang->search->common;?></a>
|
||||
<a class="btn btn-link querybox-toggle" id='bysearchTab'><i class="icon icon-search muted"></i> <?php $this->loadModel('search');echo $lang->search->common;?></a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="mainContent">
|
||||
|
||||
@@ -69,7 +69,7 @@ $config->product->search['params']['estimate'] = array('operator' => '=',
|
||||
$config->product->search['params']['source'] = array('operator' => '=', 'control' => 'select', 'values' => $lang->story->sourceList);
|
||||
$config->product->search['params']['sourceNote'] = array('operator' => 'include', 'control' => 'input', 'values' => '');
|
||||
$config->product->search['params']['fromBug'] = array('operator' => '=', 'control' => 'input', 'values' => '');
|
||||
$config->product->search['params']['category'] = array('operator' => '=', 'control' => 'select', 'values' => $lang->story->categoryList);
|
||||
$config->product->search['params']['category'] = array('operator' => '=', 'control' => 'select', 'values' => array('' => '') + $lang->story->categoryList);
|
||||
|
||||
$config->product->search['params']['openedBy'] = array('operator' => '=', 'control' => 'select', 'values' => 'users');
|
||||
$config->product->search['params']['reviewedBy'] = array('operator' => 'include', 'control' => 'select', 'values' => 'users');
|
||||
|
||||
@@ -963,6 +963,23 @@ class product extends control
|
||||
return print(html::select('project', $projects, $projectID, "class='form-control' onchange='loadProductExecutions({$productID}, this.value)'"));
|
||||
}
|
||||
|
||||
/**
|
||||
* AJAX: get projects of a product in html select.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int $branch
|
||||
* @param int $number
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxGetProjectsByBranch($productID, $branch = 0, $number = 0)
|
||||
{
|
||||
$projects = array('' => '');
|
||||
$projects += $this->product->getProjectPairsByProduct($productID, $branch);
|
||||
|
||||
return print(html::select('projects' . "[$number]", array('' => '') + $projects, 0, "class='form-control' onchange='loadProductExecutionsByProject($productID, this.value, $number)'"));
|
||||
}
|
||||
|
||||
/**
|
||||
* AJAX: get executions of a product in html select.
|
||||
*
|
||||
@@ -983,12 +1000,14 @@ class product extends control
|
||||
if($execution->type == 'kanban') $projectID = $execution->project;
|
||||
}
|
||||
|
||||
$executions = $from == 'showImport' ? $this->product->getAllExecutionPairsByProduct($productID, $branch, $projectID) : $this->product->getExecutionPairsByProduct($productID, $branch, 'id_desc', $projectID, empty($this->config->CRExecution) ? 'noclosed' : '');
|
||||
$notClosed = ($from == 'bugToTask' or empty($this->config->CRExecution)) ? 'noclosed' : '';
|
||||
$executions = $from == 'showImport' ? $this->product->getAllExecutionPairsByProduct($productID, $branch, $projectID) : $this->product->getExecutionPairsByProduct($productID, $branch, 'id_desc', $projectID, $notClosed);
|
||||
if($this->app->getViewType() == 'json') return print(json_encode($executions));
|
||||
|
||||
if($number === '')
|
||||
{
|
||||
return print(html::select('execution', array('' => '') + $executions, $executionID, "class='form-control' onchange='loadExecutionRelated(this.value)'"));
|
||||
$event = $from == 'bugToTask' ? '' : " onchange='loadExecutionRelated(this.value)'";
|
||||
return print(html::select('execution', array('' => '') + $executions, $executionID, "class='form-control' $event"));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -999,6 +1018,22 @@ class product extends control
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* AJAX: get executions of a product in html select.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int $projectID
|
||||
* @param int $branch
|
||||
* @param int $number
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxGetExecutionsByProject($productID, $projectID = 0, $branch = 0, $number = 0)
|
||||
{
|
||||
$executions = $this->product->getExecutionPairsByProduct($productID, $branch, 'id_desc', $projectID, '');
|
||||
return print(html::select('executions' . "[$number]", array('' => '') + $executions, 0, "class='form-control' onchange='loadExecutionBuilds($productID, this.value, $number)'"));
|
||||
}
|
||||
|
||||
/**
|
||||
* AJAX: get plans of a product in html select.
|
||||
*
|
||||
|
||||
@@ -89,6 +89,7 @@ $lang->product->programChangeTip = "The projects linked with this {$lang->pr
|
||||
$lang->product->notChangeProgramTip = "The {$lang->SRCommon} of {$lang->productCommon} has been linked to the following projects, please cancel the link before proceeding";
|
||||
$lang->product->confirmChangeProgram = "The projects linked with this {$lang->productCommon}: %s is also linked with other products, whether to transfer projects to the modified program set.";
|
||||
$lang->product->changeProgramError = "The {$lang->SRCommon} of this {$lang->productCommon} has been linked to the project, please unlink it before proceeding";
|
||||
$lang->product->changeLineError = "Products already exist under the product line, so the program within them cannot be modified.";
|
||||
$lang->product->programEmpty = 'Program should not be empty!';
|
||||
$lang->product->nameIsDuplicate = "『%s』 product line already exists, please reset!";
|
||||
$lang->product->nameIsDuplicated = "Product Line『%s』 exists. Go to Admin->System->Data->Recycle Bin to restore it, if you are sure it is deleted.";
|
||||
|
||||
@@ -89,6 +89,7 @@ $lang->product->programChangeTip = "如下项目只关联了该{$lang->produ
|
||||
$lang->product->notChangeProgramTip = "该{$lang->productCommon}的{$lang->SRCommon}已经关联到如下项目,请取消关联后再操作";
|
||||
$lang->product->confirmChangeProgram = "如下项目既关联了该{$lang->productCommon}又关联了其他{$lang->productCommon},请确认是否继续关联该{$lang->productCommon},勾选后将取消与其他{$lang->productCommon}的关联关系,同时转移至新项目集下。";
|
||||
$lang->product->changeProgramError = "该{$lang->productCommon}的{$lang->SRCommon}已经关联到项目,请取消关联后再操作";
|
||||
$lang->product->changeLineError = "产品线下已有产品,不可修改所属项目集";
|
||||
$lang->product->programEmpty = '项目集不能为空';
|
||||
$lang->product->nameIsDuplicate = "『%s』产品线已经存在,请重新设置!";
|
||||
$lang->product->nameIsDuplicated = "产品线已经有『%s』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。";
|
||||
|
||||
@@ -913,7 +913,19 @@ class productModel extends model
|
||||
*/
|
||||
public function manageLine()
|
||||
{
|
||||
$data = fixer::input('post')->get();
|
||||
$oldLines = $this->getLines();
|
||||
$data = fixer::input('post')->get();
|
||||
|
||||
/* When there are products under the line, the program cannot be modified */
|
||||
foreach($oldLines as $oldLine)
|
||||
{
|
||||
$oldLineID = 'id' . $oldLine->id;
|
||||
if($data->programs[$oldLineID] != $oldLine->root)
|
||||
{
|
||||
$product = $this->dao->select('*')->from(TABLE_PRODUCT)->where('line')->eq($oldLine->id)->fetch();
|
||||
if(!empty($product)) return print(js::error($this->lang->product->changeLineError));
|
||||
}
|
||||
}
|
||||
|
||||
$line = new stdClass();
|
||||
$line->type = 'line';
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
{
|
||||
$this->app->loadLang('kanban');
|
||||
echo '<li>';
|
||||
common::printLink('execution', 'edit', "executionID={$kanbanID}", '<i class="icon icon-edit"></i> ' . $lang->kanban->edit, '', "class='iframe' data-width='75%'", '', true);
|
||||
common::printLink('execution', 'edit', "executionID={$kanbanID}", '<i class="icon icon-edit"></i>' . $lang->kanban->edit, '', "class='iframe' data-width='75%'", '', true);
|
||||
echo '</li>';
|
||||
}
|
||||
if(!empty($executionActions[$kanbanID]))
|
||||
|
||||
@@ -526,7 +526,7 @@ $(function()
|
||||
{
|
||||
if(!$searchForm.find('#value' + i).hasClass('picker-select')) $searchForm.find('#value' + i).val('').trigger('chosen:updated');
|
||||
if($searchForm.find('#value' + i).hasClass('picker-select')) $searchForm.find('#value' + i).data('zui.picker').setValue('');
|
||||
$searchForm.find('#value' + i).val('').attr('placeholder','');
|
||||
$searchForm.find('#value' + i + '.date').val('').attr('placeholder', '');
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -4137,7 +4137,7 @@ class storyModel extends model
|
||||
$canView = common::hasPriv($module, 'view');
|
||||
$tab = $this->app->tab;
|
||||
$executionID = empty($execution) ? $this->session->execution : $execution->id;
|
||||
$storyLink = $tab == 'execution' ? helper::createLink('story', 'view', "storyID=$story->id&version=$story->version&from=execution¶m=$executionID") : helper::createLink($module, 'view', "storyID=$story->id");
|
||||
$storyLink = $tab == 'execution' ? helper::createLink('story', 'view', "storyID=$story->id&version=$story->version¶m=$executionID") : helper::createLink($module, 'view', "storyID=$story->id");
|
||||
$account = $this->app->user->account;
|
||||
|
||||
/* Check the product is closed. */
|
||||
|
||||
+11
-2
@@ -38,7 +38,7 @@ class task extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function create($executionID = 0, $storyID = 0, $moduleID = 0, $taskID = 0, $todoID = 0, $extra = '')
|
||||
public function create($executionID = 0, $storyID = 0, $moduleID = 0, $taskID = 0, $todoID = 0, $extra = '', $bugID = 0)
|
||||
{
|
||||
if(empty($this->app->user->view->sprints) and !$executionID) $this->locate($this->createLink('execution', 'create'));
|
||||
$extra = str_replace(array(',', ' '), array('&', ''), $extra);
|
||||
@@ -83,6 +83,15 @@ class task extends control
|
||||
$task->desc = $todo->desc;
|
||||
}
|
||||
|
||||
if($bugID > 0)
|
||||
{
|
||||
$bug = $this->loadModel('bug')->getById($bugID);
|
||||
$task->name = $bug->title;
|
||||
$task->pri = $bug->pri;
|
||||
$task->pri = !empty($bug->pri) ? $bug->pri : '3';
|
||||
$task->assignedTo = array($bug->assignedTo);
|
||||
}
|
||||
|
||||
$execution = $this->execution->getById($executionID);
|
||||
$taskLink = $this->createLink('execution', 'browse', "executionID=$executionID&tab=task");
|
||||
|
||||
@@ -111,7 +120,7 @@ class task extends control
|
||||
if($this->post->execution) $executionID = (int)$this->post->execution;
|
||||
|
||||
/* Create task here. */
|
||||
$tasksID = $this->task->create($executionID);
|
||||
$tasksID = $this->task->create($executionID, $bugID);
|
||||
if(dao::isError())
|
||||
{
|
||||
$response['result'] = 'fail';
|
||||
|
||||
@@ -20,7 +20,7 @@ class taskModel extends model
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function create($executionID)
|
||||
public function create($executionID, $bugID)
|
||||
{
|
||||
if((float)$this->post->estimate < 0)
|
||||
{
|
||||
@@ -146,6 +146,12 @@ class taskModel extends model
|
||||
|
||||
$taskID = $this->dao->lastInsertID();
|
||||
|
||||
if($bugID > 0)
|
||||
{
|
||||
$this->dao->update(TABLE_TASK)->set('fromBug')->eq($bugID)->where('id')->eq($taskID)->exec();
|
||||
$this->loadModel('action')->create('bug', $bugID, 'converttotask', '', $taskID);
|
||||
}
|
||||
|
||||
/* Mark design version.*/
|
||||
if(isset($task->design) && !empty($task->design))
|
||||
{
|
||||
|
||||
Executable → Regular
+5
-4
@@ -3,8 +3,9 @@
|
||||
* This file is used to compress css and js files.
|
||||
*/
|
||||
|
||||
$baseDir = dirname(dirname(__FILE__));
|
||||
$jarPath = getenv('JAR_YUI_PATH');
|
||||
$baseDir = dirname(dirname(__FILE__));
|
||||
$miniCSSTool = getenv('MINIFY_CSS_PATH');
|
||||
$miniJSTool = getenv('MINIFY_JS_PATH');
|
||||
|
||||
//--------------------------------- PROCESS JS FILES ------------------------------ //
|
||||
|
||||
@@ -26,7 +27,7 @@ foreach($jsFiles as $jsFile) $jsCode .= "\n". str_replace('/*!', '/*', file_get_
|
||||
file_put_contents($allJSFile, $jsCode);
|
||||
|
||||
/* Compress it. */
|
||||
`java -jar $jarPath/yuicompressor.jar --type js $allJSFile -o $allJSFile`;
|
||||
`php $miniJSTool $allJSFile $allJSFile`;
|
||||
|
||||
//-------------------------------- PROCESS CSS FILES ------------------------------ //
|
||||
|
||||
@@ -79,6 +80,6 @@ foreach($langs as $lang)
|
||||
file_put_contents($cssFile, $cssCode);
|
||||
|
||||
/* Compress it. */
|
||||
`java -jar $jarPath/yuicompressor.jar --type css $cssFile -o $cssFile`;
|
||||
`php $miniCSSTool $cssFile $cssFile`;
|
||||
}
|
||||
}
|
||||
|
||||
+18
-17
@@ -28,6 +28,15 @@ $fileList[] = "{$basePath}/zentaomax.php7.2_7.4.zip";
|
||||
|
||||
foreach($fileList as $file) if(!file_exists($file)) echo basename($file) . " is not exists\n";
|
||||
|
||||
`unzip {$basePath}/zentaobiz.php5.4_5.6.zip; mv biz zentaobiz.php5.4_5.6`;
|
||||
`unzip {$basePath}/zentaobiz.php7.0.zip; mv biz zentaobiz.php7.0`;
|
||||
`unzip {$basePath}/zentaobiz.php7.1.zip; mv biz zentaobiz.php7.1`;
|
||||
`unzip {$basePath}/zentaobiz.php7.2_7.4.zip; mv biz zentaobiz.php7.2_7.4`;
|
||||
`unzip {$basePath}/zentaomax.php5.4_5.6.zip; mv max zentaomax.php5.4_5.6`;
|
||||
`unzip {$basePath}/zentaomax.php7.0.zip; mv max zentaomax.php7.0`;
|
||||
`unzip {$basePath}/zentaomax.php7.1.zip; mv max zentaomax.php7.1`;
|
||||
`unzip {$basePath}/zentaomax.php7.2_7.4.zip; mv max zentaomax.php7.2_7.4`;
|
||||
|
||||
/* Create shells to make zip format packages. */
|
||||
$shellList = array();
|
||||
foreach(array('zh-cn', 'en') as $langType)
|
||||
@@ -36,36 +45,28 @@ foreach(array('zh-cn', 'en') as $langType)
|
||||
$packPrefix = $langType == 'zh-cn' ? 'ZenTaoPMS' : 'ZenTaoALM';
|
||||
$version = $langType == 'zh-cn' ? $pmsVersion : $pmsVersion . '.int';
|
||||
$dirName = $langType == 'zh-cn' ? 'zentaopms' : 'zentaoalm';
|
||||
if(!empty($liteVersion)) $liteVersionAB = $langType == 'zh-cn' ? $liteVersion : $liteVersion . '.int';
|
||||
|
||||
/* Cycle the php versions. */
|
||||
foreach(array('5.4_5.6', '7.0', '7.1', '7.2_7.4', '8.0') as $phpVersion)
|
||||
{
|
||||
/* File name. */
|
||||
$workDir = "tmp/$packPrefix.{$version}.{$phpVersion}/";
|
||||
$shellName = $workDir . "make.sh";
|
||||
$workDir = "tmp/$packPrefix.{$version}.{$phpVersion}/";
|
||||
$shellName = $workDir . "make.sh";
|
||||
$encryptedPhpVersion = $phpVersion == '8.0' ? '7.2_7.4' : $phpVersion;
|
||||
echo "Creating $shellName\n";
|
||||
|
||||
mkdir($workDir, 0777, true);
|
||||
|
||||
/* The commands of the shell. */
|
||||
$command = "cd $workDir\n";
|
||||
$command .= "if [ ! -d ../$dirName ]; then unzip ../../$packPrefix.{$version}.zip -d ../ ; fi\n";
|
||||
$command .= "cp -raf ../$dirName .\n";
|
||||
$command .= "unzip ../../zentaobiz.php{$phpVersion}.zip\n";
|
||||
$command .= "unzip ../../zentaomax.php{$phpVersion}.zip\n";
|
||||
$command .= "cp -rf biz/* $dirName/\n";
|
||||
$command .= "cp -rf max/* $dirName/\n";
|
||||
//$command .= "if [ ! -d ../$dirName ]; then unzip ../../$packPrefix.{$version}.zip -d ../ ; fi\n";
|
||||
$command .= "unzip ../../$packPrefix.{$version}.zip\n";
|
||||
//$command .= "cp -raf ../$dirName .\n";
|
||||
$command .= "cp -rf ../../zentaobiz.php$encryptedPhpVersion/* $dirName/\n";
|
||||
$command .= "cp -rf ../../zentaomax.php$encryptedPhpVersion/* $dirName/\n";
|
||||
$command .= "zip -r ../../$packPrefix.{$version}.php{$phpVersion}.zip $dirName\n";
|
||||
|
||||
if(!empty($liteVersion))
|
||||
{
|
||||
$command .= "cd $dirName/config/ext; touch visions.php; echo '<?php\n\$config->visions = \",lite,\";' > visions.php\n";
|
||||
$command .= "echo $liteVersionAB > $dirName/VERSION\n";
|
||||
$command .= "zip -r ../../$packPrefix.{$liteVersionAB}.php{$phpVersion}.zip $dirName\n";
|
||||
}
|
||||
|
||||
$command .= "rm -rf $dirName/ biz/ max/\n";
|
||||
$command .= "rm -rf $dirName/\n";
|
||||
|
||||
file_put_contents($shellName, $command);
|
||||
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
/*!
|
||||
<<<<<<< HEAD
|
||||
* ZUI: ZUI for Zentao - v1.10.0 - 2022-05-27
|
||||
=======
|
||||
* ZUI: ZUI for Zentao - v1.10.0 - 2022-06-01
|
||||
>>>>>>> sprint/sunhao/fix_picker
|
||||
* http://openzui.com
|
||||
* GitHub: https://github.com/easysoft/zui.git
|
||||
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
|
||||
|
||||
Reference in New Issue
Block a user