Merge branch 'pailei' into 'pailei_sunhuawei_story_30528'

# Conflicts:
#   module/execution/control.php
#   module/execution/view/kanban.html.php
This commit is contained in:
李玉春
2022-03-02 05:34:15 +00:00
310 changed files with 3805 additions and 857 deletions
+59 -117
View File
@@ -3,6 +3,9 @@ XUANPATH = $(shell head -n 1 XUANPATH)
XUANVERSION = $(shell head -n 1 XUANVERSION)
XVERSION = $(shell head -n 1 XVERSION)
BUILD_PATH := $(if $(ZENTAO_BUILD_PATH), $(ZENTAO_BUILD_PATH), $(shell pwd))
RELEASE_PATH := $(if $(ZENTAO_RELEASE_PATH), $(ZENTAO_RELEASE_PATH), $(shell pwd))
all: pms
clean:
rm -fr zentaopms
@@ -13,6 +16,7 @@ clean:
rm -fr *.zip
rm -fr build/linux/lampp
rm -fr lampp
rm -fr zentaoxx
common:
mkdir zentaopms
cp -fr api zentaopms/
@@ -23,8 +27,9 @@ common:
cp -fr framework zentaopms/
cp -fr lib zentaopms/
cp -fr module zentaopms/
cp -fr extension zentaopms/
cp -fr sdk zentaopms/
cp -fr www zentaopms && rm -fr zentaopms/www/data/ && mkdir -p zentaopms/www/data/upload
cp -fr www zentaopms && rm -fr zentaopms/www/data/ && mkdir -p zentaopms/www/data/upload && mkdir zentaopms/www/data/course
mkdir zentaopms/tmp
mkdir zentaopms/tmp/cache/
mkdir zentaopms/tmp/extension/
@@ -50,11 +55,11 @@ zentaoxx:
#xuanxuan
mkdir -p zentaoxx/config/ext
mkdir -p zentaoxx/lib
mkdir -p zentaoxx/module
mkdir -p zentaoxx/extension/xuan
mkdir -p zentaoxx/framework
mkdir -p zentaoxx/db
mkdir -p zentaoxx/www
mkdir -p zentaoxx/module/common/ext/model/
mkdir -p zentaoxx/extension/xuan/common/ext/model/
cd $(XUANPATH); git archive --format=zip --prefix=xuan/ $(XUANVERSION) > xuan.zip
mv $(XUANPATH)/xuan.zip .
unzip xuan.zip
@@ -62,25 +67,25 @@ zentaoxx:
cp -r xuan/xxb/lib/phpaes zentaoxx/lib/
cp -r xuan/xxb/framework/xuanxuan.class.php zentaoxx/framework/
cp -r xuan/xxb/db/*.sql zentaoxx/db/
cp -r xuan/xxb/module/im zentaoxx/module/
cp -r xuan/xxb/module/client zentaoxx/module/
cp -r xuan/xxb/module/license zentaoxx/module/
cp -r xuan/xxb/module/owt zentaoxx/module/
mkdir -p zentaoxx/module/common/view
cp -r xuan/xxb/module/common/view/header.modal.html.php zentaoxx/module/common/view
cp -r xuan/xxb/module/common/view/marked.html.php zentaoxx/module/common/view
cp -r xuan/xxb/module/common/view/footer.modal.html.php zentaoxx/module/common/view
cp -r xuan/xxb/module/common/view/version.html.php zentaoxx/module/common/view
cp -r xuan/xxb/module/license zentaoxx/module/
cp -r xuan/xxb/module/im zentaoxx/extension/xuan/
cp -r xuan/xxb/module/client zentaoxx/extension/xuan/
cp -r xuan/xxb/module/license zentaoxx/extension/xuan/
cp -r xuan/xxb/module/owt zentaoxx/extension/xuan/
mkdir -p zentaoxx/extension/xuan/common/view
cp -r xuan/xxb/module/common/view/header.modal.html.php zentaoxx/extension/xuan/common/view
cp -r xuan/xxb/module/common/view/marked.html.php zentaoxx/extension/xuan/common/view
cp -r xuan/xxb/module/common/view/footer.modal.html.php zentaoxx/extension/xuan/common/view
cp -r xuan/xxb/module/common/view/version.html.php zentaoxx/extension/xuan/common/view
cp -r xuan/xxb/module/license zentaoxx/extension/xuan/
mkdir -p zentaoxx/www/js/
cp -r xuan/xxb/www/js/markedjs zentaoxx/www/js/
cp -r xuan/xxb/www/js/version.js zentaoxx/www/js/
cp -r xuan/xxb/www/x.php zentaoxx/www/
mkdir zentaoxx/module/action
cp -r xuan/xxb/module/action/ext zentaoxx/module/action
mkdir zentaoxx/extension/xuan/action
cp -r xuan/xxb/module/action/ext zentaoxx/extension/xuan/action
cp -r xuan/xxb/config/ext/_1_maps.php zentaoxx/config/ext/
cp -r xuanxuan/config/* zentaoxx/config/
cp -r xuanxuan/module/* zentaoxx/module/
cp -r xuanxuan/extension/xuan/* zentaoxx/extension/xuan/
cp -r xuanxuan/www/* zentaoxx/www/
mv zentaoxx/db/ zentaoxx/db_bak
mkdir zentaoxx/db/
@@ -88,40 +93,40 @@ zentaoxx:
rm -rf zentaoxx/db_bak/
sed -i 's/XXBVERSION/$(XVERSION)/g' zentaoxx/config/ext/_0_xuanxuan.php
sed -i "/\$$config->xuanxuan->backend /c\\\$$config->xuanxuan->backend = 'zentao';" zentaoxx/config/ext/_0_xuanxuan.php
sed -i 's/site,//' zentaoxx/module/im/model/user.php
sed -i 's/admin, g/g/' zentaoxx/module/im/model/user.php
sed -i '/password = md5/d' zentaoxx/module/im/model/user.php
sed -i 's/md5(\$$user->password.*$$/\$$user->password;/g' zentaoxx/module/im/model/user.php
sed -i '/getSignedTime/d' zentaoxx/module/im/control.php
sed -i "/loadModel('push')/d" zentaoxx/module/im/control.php
sed -i "/this->push/d" zentaoxx/module/im/control.php
sed -i "s/(int)(microtime/(double)(microtime/" zentaoxx/module/im/control.php
sed -i "s/'yahoo', //g" zentaoxx/module/im/config.php
sed -i "s/'gtalk', //g" zentaoxx/module/im/config.php
sed -i "s/'wangwang', //g" zentaoxx/module/im/config.php
sed -i "s/'site', //g" zentaoxx/module/im/config.php
sed -i "s/'reload'/inlink('browse')/g" zentaoxx/module/client/control.php
sed -i 's/tree/dept/' zentaoxx/module/im/model.php
sed -i 's/tree/dept/' zentaoxx/module/im/control.php
sed -i 's/site,//' zentaoxx/extension/xuan/im/model/user.php
sed -i 's/admin, g/g/' zentaoxx/extension/xuan/im/model/user.php
sed -i '/password = md5/d' zentaoxx/extension/xuan/im/model/user.php
sed -i 's/md5(\$$user->password.*$$/\$$user->password;/g' zentaoxx/extension/xuan/im/model/user.php
sed -i '/getSignedTime/d' zentaoxx/extension/xuan/im/control.php
sed -i "/loadModel('push')/d" zentaoxx/extension/xuan/im/control.php
sed -i "/this->push/d" zentaoxx/extension/xuan/im/control.php
sed -i "s/(int)(microtime/(double)(microtime/" zentaoxx/extension/xuan/im/control.php
sed -i "s/'yahoo', //g" zentaoxx/extension/xuan/im/config.php
sed -i "s/'gtalk', //g" zentaoxx/extension/xuan/im/config.php
sed -i "s/'wangwang', //g" zentaoxx/extension/xuan/im/config.php
sed -i "s/'site', //g" zentaoxx/extension/xuan/im/config.php
sed -i "s/'reload'/inlink('browse')/g" zentaoxx/extension/xuan/client/control.php
sed -i 's/tree/dept/' zentaoxx/extension/xuan/im/model.php
sed -i 's/tree/dept/' zentaoxx/extension/xuan/im/control.php
sed -i 's/im_/zt_im_/g' zentaoxx/db/*.sql
sed -i 's/xxb_user/zt_user/g' zentaoxx/db/*.sql
sed -i 's/xxb_file/zt_file/g' zentaoxx/db/*.sql
sed -i '/xxb_entry/d' zentaoxx/db/*.sql
sed -i '/deviceToken/d' zentaoxx/db/*.sql
sed -i '/deviceType/d' zentaoxx/db/*.sql
sed -i "/fetch('push', 'pushMessage');/d" zentaoxx/module/im/control.php
#sed -i "s/marked\.html\.php';?>/marked\.html\.php';?>\n<div id='mainMenu' class='clearfix'><div class='btn-toolbar pull-left'><?php common::printAdminSubMenu('xuanxuan');?><\/div><\/div>/g" zentaoxx/module/client/view/checkupgrade.html.php
sed -i '/var serverVersions/d' zentaoxx/module/client/js/checkupgrade.js
sed -i '/var currentVersion/d' zentaoxx/module/client/js/checkupgrade.js
sed -i '/setRequiredFields(/d' zentaoxx/module/common/view/header.modal.html.php
sed -i 's/header.html.php/header.lite.html.php/g' zentaoxx/module/common/view/header.modal.html.php
sed -i 's/footer.html.php/footer.lite.html.php/g' zentaoxx/module/common/view/footer.modal.html.php
sed -i 's/v\.//g' zentaoxx/module/im/js/debug.js
sed -i "/fetch('push', 'pushMessage');/d" zentaoxx/extension/xuan/im/control.php
#sed -i "s/marked\.html\.php';?>/marked\.html\.php';?>\n<div id='mainMenu' class='clearfix'><div class='btn-toolbar pull-left'><?php common::printAdminSubMenu('xuanxuan');?><\/div><\/div>/g" zentaoxx/extension/xuan/client/view/checkupgrade.html.php
sed -i '/var serverVersions/d' zentaoxx/extension/xuan/client/js/checkupgrade.js
sed -i '/var currentVersion/d' zentaoxx/extension/xuan/client/js/checkupgrade.js
sed -i '/setRequiredFields(/d' zentaoxx/extension/xuan/common/view/header.modal.html.php
sed -i 's/header.html.php/header.lite.html.php/g' zentaoxx/extension/xuan/common/view/header.modal.html.php
sed -i 's/footer.html.php/footer.lite.html.php/g' zentaoxx/extension/xuan/common/view/footer.modal.html.php
sed -i 's/v\.//g' zentaoxx/extension/xuan/im/js/debug.js
sed -i 's/helper::jsonEncode(/json_encode(/g' zentaoxx/framework/xuanxuan.class.php
sed -i "s/lang->goback,/lang->goback, '',/g" zentaoxx/module/im/view/debug.html.php
sed -i 's/v\.//g' zentaoxx/module/client/js/checkupgrade.js
sed -i 's/commonModel::getLicensePropertyValue/extCommonModel::getLicensePropertyValue/g' zentaoxx/module/im/control.php
sed -i 's/commonModel::getLicensePropertyValue/extCommonModel::getLicensePropertyValue/g' zentaoxx/module/im/model/conference.php
sed -i "s/lang->goback,/lang->goback, '',/g" zentaoxx/extension/xuan/im/view/debug.html.php
sed -i 's/v\.//g' zentaoxx/extension/xuan/client/js/checkupgrade.js
sed -i 's/commonModel::getLicensePropertyValue/extCommonModel::getLicensePropertyValue/g' zentaoxx/extension/xuan/im/control.php
sed -i 's/commonModel::getLicensePropertyValue/extCommonModel::getLicensePropertyValue/g' zentaoxx/extension/xuan/im/model/conference.php
sed -i 's/xxb_/zt_/g' zentaoxx/db/*.sql
echo "ALTER TABLE \`zt_user\` ADD \`pinyin\` varchar(255) NOT NULL DEFAULT '' AFTER \`realname\`;" >> zentaoxx/db/xuanxuan.sql
mkdir zentaoxx/tools; cp tools/cn2tw.php zentaoxx/tools; cd zentaoxx/tools; php cn2tw.php
@@ -134,11 +139,12 @@ package:
chmod -R 777 zentaopms/tmp/
chmod -R 777 zentaopms/www/data
chmod -R 777 zentaopms/config
chmod -R 777 zentaopms/extension/custom
chmod 777 zentaopms/module
chmod 777 zentaopms/www
chmod a+rx zentaopms/bin/*
if [ ! -d "zentaopms/config/ext" ]; then mkdir zentaopms/config/ext; fi
for module in `ls zentaopms/module/`; do if [ ! -d "zentaopms/module/$$module/ext" ]; then mkdir zentaopms/module/$$module/ext; fi done
for module in `ls zentaopms/module/`; do if [ -d "zentaopms/module/$$module" ] && [ ! -d "zentaopms/module/$$module/ext" ]; then mkdir zentaopms/module/$$module/ext; fi done
find zentaopms/ -name ext |xargs chmod -R 777
mkdir zentaopms/tools; cp tools/cn2tw.php zentaopms/tools; cd zentaopms/tools; php cn2tw.php
#rm -r zentaopms/module/misc/ext
@@ -152,78 +158,14 @@ pms:
make package
zip -rq -9 ZenTaoPMS.$(VERSION).zip zentaopms
rm -fr zentaopms zentaoxx zentaoxx.*.zip
deb:
mkdir buildroot
cp -r build/debian/DEBIAN buildroot
sed -i '/^Version/cVersion: ${VERSION}' buildroot/DEBIAN/control
mkdir buildroot/opt
mkdir buildroot/etc/apache2/sites-enabled/ -p
cp build/debian/zentaopms.conf buildroot/etc/apache2/sites-enabled/
cp ZenTaoPMS.${VERSION}.zip buildroot/opt
cd buildroot/opt; unzip ZenTaoPMS.${VERSION}.zip; mv zentaopms zentao; rm ZenTaoPMS.${VERSION}.zip
sed -i 's/index.php/\/zentao\/index.php/' buildroot/opt/zentao/www/.htaccess
sudo dpkg -b buildroot/ ZenTaoPMS_${VERSION}_1_all.deb
rm -rf buildroot
rpm:
mkdir ~/rpmbuild/SPECS -p
cp build/rpm/zentaopms.spec ~/rpmbuild/SPECS
sed -i '/^Version/cVersion:${VERSION}' ~/rpmbuild/SPECS/zentaopms.spec
mkdir ~/rpmbuild/SOURCES
cp ZenTaoPMS.${VERSION}.zip ~/rpmbuild/SOURCES
mkdir ~/rpmbuild/SOURCES/etc/httpd/conf.d/ -p
cp build/debian/zentaopms.conf ~/rpmbuild/SOURCES/etc/httpd/conf.d/
mkdir ~/rpmbuild/SOURCES/opt/ -p
cd ~/rpmbuild/SOURCES; unzip ZenTaoPMS.${VERSION}.zip; mv zentaopms opt/zentao;
sed -i 's/index.php/\/zentao\/index.php/' ~/rpmbuild/SOURCES/opt/zentao/www/.htaccess
cd ~/rpmbuild/SOURCES; tar -czvf zentaopms-${VERSION}.tar.gz etc opt; rm -rf ZenTaoPMS.${VERSION}.zip etc opt;
rpmbuild -ba ~/rpmbuild/SPECS/zentaopms.spec
cp ~/rpmbuild/RPMS/noarch/zentaopms-${VERSION}-1.noarch.rpm ./
rm -rf ~/rpmbuild
en:
ci:
git pull
make common
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
make zentaoxx
unzip zentaoxx.*.zip
cp zentaoxx/* zentaopms/ -r
cat zentaoxx/db/xuanxuan.sql >> zentaopms/db/zentao.sql
make package
mv zentaopms zentaoalm
zip -r -9 ZenTaoALM.$(VERSION).int.zip zentaoalm
rm -fr zentaoalm
echo $(VERSION).int > VERSION
make endeb
make enrpm
echo $(VERSION) > VERSION
endeb:
mkdir buildroot
cp -r build/debian/DEBIAN buildroot
sed -i '/^Version/cVersion: ${VERSION}' buildroot/DEBIAN/control
mkdir buildroot/opt
mkdir buildroot/etc/apache2/sites-enabled/ -p
cp build/debian/zentaopms.conf buildroot/etc/apache2/sites-enabled/
cp ZenTaoALM.${VERSION}.zip buildroot/opt
cd buildroot/opt; unzip ZenTaoALM.${VERSION}.zip; mv zentaoalm zentao; rm ZenTaoALM.${VERSION}.zip
sed -i 's/index.php/\/zentao\/index.php/' buildroot/opt/zentao/www/.htaccess
sudo dpkg -b buildroot/ ZenTaoALM_${VERSION}_1_all.deb
rm -rf buildroot
enrpm:
mkdir ~/rpmbuild/SPECS -p
cp build/rpm/zentaopms.spec ~/rpmbuild/SPECS
sed -i '/^Version/cVersion:${VERSION}' ~/rpmbuild/SPECS/zentaopms.spec
sed -i '/^Name:/cName:zentaoalm' ~/rpmbuild/SPECS/zentaopms.spec
mkdir ~/rpmbuild/SOURCES
cp ZenTaoALM.${VERSION}.zip ~/rpmbuild/SOURCES
mkdir ~/rpmbuild/SOURCES/etc/httpd/conf.d/ -p
cp build/debian/zentaopms.conf ~/rpmbuild/SOURCES/etc/httpd/conf.d/zentaoalm.conf
mkdir ~/rpmbuild/SOURCES/opt/ -p
cd ~/rpmbuild/SOURCES; unzip ZenTaoALM.${VERSION}.zip; mv zentaoalm opt/zentao;
sed -i 's/index.php/\/zentao\/index.php/' ~/rpmbuild/SOURCES/opt/zentao/www/.htaccess
cd ~/rpmbuild/SOURCES; tar -czvf zentaoalm-${VERSION}.tar.gz etc opt; rm -rf ZenTaoALM.${VERSION}.zip etc opt;
rpmbuild -ba ~/rpmbuild/SPECS/zentaopms.spec
cp ~/rpmbuild/RPMS/noarch/zentaoalm-${VERSION}-1.noarch.rpm ./
rm -rf ~/rpmbuild
patchphpdoc:
sudo cp misc/doc/phpdoc/*.tpl /usr/share/php/data/PhpDocumentor/phpDocumentor/Converters/HTML/frames/templates/phphtmllib/templates/
phpdoc:
phpdoc -d bin,framework,config,lib,module,www -t api -o HTML:frames:phphtmllib -ti ZenTaoPMSAPI参考手册 -s on -pp on -i *test*
phpdoc -d bin,framework,config,lib,module,www -t api.chm -o chm:default:default -ti ZenTaoPMSAPI参考手册 -s on -pp on -i *test*
doxygen:
doxygen doc/doxygen/doxygen.conf
if [ -d $(BUILD_PATH)/zentaopms ]; then rm -r $(BUILD_PATH)/zentaopms; fi
mv zentaopms $(BUILD_PATH)
rm -fr zentaopms zentaoxx zentaoxx.*.zip
+3 -1
View File
@@ -23,4 +23,6 @@ ALTER TABLE `zt_story` ADD `activatedDate` datetime NOT NULL AFTER `closedReason
ALTER TABLE `zt_task` MODIFY `activatedDate` datetime NOT NULL AFTER `lastEditedDate`;
ALTER TABLE `zt_user` ADD `visions` varchar(20) NOT NULL AFTER `visits`;
UPDATE `zt_user` SET `visions`='rnd,lite';
UPDATE `zt_user` SET `visions`='rnd,lite';
ALTER TABLE `zt_productplan` ADD `closedReason` varchar(20) NOT NULL AFTER `order`;
+2
View File
@@ -983,6 +983,7 @@ CREATE TABLE IF NOT EXISTS `zt_productplan` (
`begin` date NOT NULL,
`end` date NOT NULL,
`order` text NOT NULL,
`closedReason` varchar(20) NOT NULL
`deleted` enum('0','1') NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `product` (`product`),
@@ -1611,6 +1612,7 @@ CREATE TABLE IF NOT EXISTS `zt_user` (
`strategy` text NOT NULL,
`join` date NOT NULL default '0000-00-00',
`visits` mediumint(8) unsigned NOT NULL default '0',
`visions` varchar(20) NOT NULL,
`ip` char(15) NOT NULL default '',
`last` int(10) unsigned NOT NULL default '0',
`fails` tinyint(5) NOT NULL default '0',
@@ -10,7 +10,7 @@ $('#pageNav .btn-group #dropMenu .table-col .list-group a[href*="showFiles"]').r
</script>
<?php endif;?>
<?php if(!empty($doc) and !$doc->deleted and $doc->version > 1 and common::hasPriv('doc', 'diff')):?>
<?php if(!empty($doc) and !$doc->deleted and $doc->version > 1 and common::hasPriv('doc', 'diff') and $config->edition != 'open'):?>
<?php
$versions = array();
$i = 1;
@@ -1,4 +1,6 @@
<?php include dirname(dirname(__FILE__)) . '/lang/' . $this->app->getClientLang() . '/lite.php';?>
<script>
$('#aclprivate').closest('td').html(<?php echo json_encode(html::radio('acl', $lang->execution->aclList, $execution->acl, "onclick='setWhite(this.value);'", 'block'));?>)
$('#begin').closest('tr').hide();
$('#days').closest('tr').hide();
$('#productsBox').closest('tr').hide();
@@ -938,6 +938,8 @@ if($config->edition == 'biz' or $config->edition == 'max')
$lang->resource->feedback->close = 'closeAction';
$lang->resource->feedback->export = 'exportAction';
if($config->visions == ',lite,') unset($lang->resource->feedback);
/* Faq. */
$lang->resource->faq = new stdclass();
$lang->resource->faq->browse = 'browse';
@@ -0,0 +1,6 @@
<script>
$(function()
{
$('#name').attr("disabled", true);
})
</script>
@@ -138,7 +138,7 @@ class product extends control
$actionURL = $this->createLink($rawModule, $rawMethod, $params . "productID=$productID&branch=$branch&browseType=bySearch&queryID=myQueryID&storyType=$storyType");
$this->config->product->search['onMenuBar'] = 'yes';
$this->product->buildSearchForm($productID, $this->products, $queryID, $actionURL, $branch);
$this->product->buildSearchForm(0, $this->products, $queryID, $actionURL, $branch);
$showModule = !empty($this->config->datatable->productBrowse->showModule) ? $this->config->datatable->productBrowse->showModule : '';
+1 -1
View File
@@ -1,6 +1,6 @@
<?php
$config->story->list->exportFields = '
id, module, title, spec, verify, keywords,
id, module, title, spec, keywords,
pri, estimate, status,
openedBy, openedDate, assignedTo, assignedDate, mailto,
reviewedBy, reviewedDate,
+7
View File
@@ -1,3 +1,10 @@
<?php
$config->task->customBatchCreateFields .= ',lane,region';
$config->task->custom->batchCreateFields .= ',lane,region';
$config->task->datatable->defaultField = array('id', 'pri', 'name', 'status', 'assignedTo', 'lane', 'finishedBy', 'estimate', 'consumed', 'left', 'progress', 'deadline', 'actions');
$config->task->datatable->fieldList['lane']['title'] = 'lane';
$config->task->datatable->fieldList['lane']['fixed'] = 'no';
$config->task->datatable->fieldList['lane']['width'] = '90';
$config->task->datatable->fieldList['lane']['required'] = 'no';
$config->task->datatable->fieldList['lane']['sort'] = 'no';
+110
View File
@@ -0,0 +1,110 @@
<?php
/**
* Get tasks of a execution.
*
* @param int $executionID
* @param int $productID
* @param string $type
* @param string $modules
* @param string $orderBy
* @param null $pager
*
* @access public
* @return array|void
*/
public function getExecutionTasks($executionID, $productID = 0, $type = 'all', $modules = 0, $orderBy = 'status_asc, id_desc', $pager = null)
{
if(is_string($type)) $type = strtolower($type);
$tasks = $this->dao->select('DISTINCT t1.*, t2.id AS storyID, t2.title AS storyTitle, t2.product, t2.branch, t2.version AS latestStoryVersion, t2.status AS storyStatus, t3.realname AS assignedToRealName')
->from(TABLE_TASK)->alias('t1')
->leftJoin(TABLE_STORY)->alias('t2')->on('t1.story = t2.id')
->leftJoin(TABLE_USER)->alias('t3')->on('t1.assignedTo = t3.account')
->leftJoin(TABLE_TEAM)->alias('t4')->on('t4.root = t1.id')
->leftJoin(TABLE_MODULE)->alias('t5')->on('t1.module = t5.id')
->where('t1.execution')->eq((int)$executionID)
->beginIF($type == 'myinvolved')
->andWhere("((t4.`account` = '{$this->app->user->account}' AND t4.`type` = 'task') OR t1.`assignedTo` = '{$this->app->user->account}' OR t1.`finishedby` = '{$this->app->user->account}')")
->fi()
->beginIF($productID)->andWhere("((t5.root=" . (int)$productID . " and t5.type='story') OR t2.product=" . (int)$productID . ")")->fi()
->beginIF($type == 'undone')->andWhere('t1.status')->notIN('done,closed')->fi()
->beginIF($type == 'needconfirm')->andWhere('t2.version > t1.storyVersion')->andWhere("t2.status = 'active'")->fi()
->beginIF($type == 'assignedtome')->andWhere('t1.assignedTo')->eq($this->app->user->account)->fi()
->beginIF($type == 'finishedbyme')
->andWhere('t1.finishedby', 1)->eq($this->app->user->account)
->orWhere('t1.finishedList')->like("%,{$this->app->user->account},%")
->markRight(1)
->fi()
->beginIF($type == 'delayed')->andWhere('t1.deadline')->gt('1970-1-1')->andWhere('t1.deadline')->lt(date(DT_DATE1))->andWhere('t1.status')->in('wait,doing')->fi()
->beginIF(is_array($type) or strpos(',all,undone,needconfirm,assignedtome,delayed,finishedbyme,myinvolved,', ",$type,") === false)->andWhere('t1.status')->in($type)->fi()
->beginIF($modules)->andWhere('t1.module')->in($modules)->fi()
->andWhere('t1.deleted')->eq(0)
->orderBy($orderBy)
->page($pager, 't1.id')
->fetchAll('id');
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'task', ($productID or in_array($type, array('myinvolved', 'needconfirm'))) ? false : true);
if(empty($tasks)) return array();
$taskList = array_keys($tasks);
$taskTeam = $this->dao->select('*')->from(TABLE_TEAM)->where('root')->in($taskList)->andWhere('type')->eq('task')->fetchGroup('root');
if(!empty($taskTeam))
{
foreach($taskTeam as $taskID => $team) $tasks[$taskID]->team = $team;
}
$parents = array();
foreach($tasks as $task)
{
if($task->parent > 0) $parents[$task->parent] = $task->parent;
}
$parents = $this->dao->select('*')->from(TABLE_TASK)->where('id')->in($parents)->fetchAll('id');
$lanes = array();
$cardsWhere = '';
foreach($tasks as $task)
{
if(empty($cardsWhere))
{
$cardsWhere = "cards like '%,{$task->id},%'";
}
else
{
$cardsWhere .= " or cards like '%,{$task->id},%'";
}
}
$lanes = $this->dao->select('t1.lane,t2.name,t1.cards')
->from(TABLE_KANBANCELL)->alias('t1')
->leftJoin(TABLE_KANBANLANE)->alias('t2')->on('t1.lane = t2.id')
->where('t1.kanban')->eq($executionID)
->andWhere("($cardsWhere)")
->fetchAll();
foreach($tasks as $task)
{
if($task->parent > 0)
{
if(isset($tasks[$task->parent]))
{
$tasks[$task->parent]->children[$task->id] = $task;
unset($tasks[$task->id]);
}
else
{
$parent = $parents[$task->parent];
$task->parentName = $parent->name;
}
}
$task->lane = '';
if(!empty($lanes))
{
foreach($lanes as $lane)
{
if(strpos($lane->cards, ",{$task->id},") !== false) $task->lane = $lane->name;
}
}
}
return $this->processTasks($tasks);
}
+9 -3
View File
@@ -1,7 +1,13 @@
<?php
$lang->tree->all = '所有目录';
$lang->tree->allMenu = $lang->tree->all;
$lang->tree->manageMenu = '维护目录';
$lang->tree->all = '所有目录';
$lang->tree->allMenu = $lang->tree->all;
$lang->tree->manageMenu = '维护目录';
$lang->tree->manage = '维护目录';
$lang->tree->common = '目录维护';
$lang->tree->manageExecution = "维护{$lang->executionCommon}视图目录";
$lang->tree->manageTaskChild = "维护{$lang->executionCommon}子目录";
$lang->tree->name = '目录名称';
global $app;
if($app->rawModule == 'tree' and $app->rawMethod == 'browse')
@@ -1,6 +1,6 @@
<script>
$('#mainMenu .btn-toolbar > a[href*="bug"], a[href*="testtask"], a[href*="testcase"], a[href*="issue"], a[href*="risk"], a[href*="requirement"]').remove();
<?php if($this->config->edition != 'open'):?>
<?php if($this->config->edition != 'open' and common::hasPriv('user', 'todocalendar')):?>
$('#mainMenu .btn-toolbar > a:first').attr('href', createLink('user', 'todocalendar', 'userID=<?php echo $user->id?>'));
<?php endif;?>
</script>
@@ -1,4 +1,6 @@
<script>
$('#submit').after('<input type="hidden" id="vision" name="vision" value="<?php echo $this->config->vision;?>">');
$("#name").parent().addClass('required');
$("#datasource").addClass('required');
</script>
<?php include $this->app->getExtensionRoot() . 'biz/workflowdatasource/ext/view/' . basename(__FILE__);?>
@@ -0,0 +1,4 @@
<script>
$("#name").parent().addClass('required');
$("#rule").parent().addClass('required');
</script>
+1 -1
View File
@@ -261,7 +261,7 @@ class baseModel
if(!empty($moduleExtPath['site'])) $extensionFile = $moduleExtPath['site'] . 'class/' . $extensionName . '.class.php';
if(!isset($extensionFile) or !file_exists($extensionFile)) $extensionFile = $moduleExtPath['custom'] . 'class/' . $extensionName . '.class.php';
if(!isset($extensionFile) or !file_exists($extensionFile)) $extensionFile = $moduleExtPath['vision'] . 'class/' . $extensionName . '.class.php';
if(!isset($extensionFile) or !file_exists($extensionFile)) $extensionFile = $moduleExtPath['xuan'] . 'class/' . $extensionName . '.class.php';
if(!isset($extensionFile) or !file_exists($extensionFile)) $extensionFile = $moduleExtPath['xuan'] . 'class/' . $extensionName . '.class.php';
if(!isset($extensionFile) or !file_exists($extensionFile)) $extensionFile = $moduleExtPath['common'] . 'class/' . $extensionName . '.class.php';
/* 设置扩展类的名字。Set the extension class name. */
+64 -10
View File
@@ -697,10 +697,17 @@ class baseRouter
if(empty($account) and isset($_POST['account'])) $account = $_POST['account'];
if(empty($account) and isset($_GET['account'])) $account = $_GET['account'];
$vision = '';
if($this->config->installed) $vision = $this->dbh->query("SELECT * FROM " . TABLE_CONFIG . " WHERE owner = '$account' AND `key` = 'vision' LIMIT 1")->fetch();
if($vision) $vision = $vision->value;
if(!empty($_SESSION['user']->visions) and empty($vision)) list($vision) = explode(',', $_SESSION['user']->visions);
$vision = '';
if($this->config->installed)
{
$vision = $this->dbh->query("SELECT * FROM " . TABLE_CONFIG . " WHERE owner = '$account' AND `key` = 'vision' LIMIT 1")->fetch();
if($vision) $vision = $vision->value;
if(empty($vision))
{
$user = $this->dbh->query("SELECT * FROM " . TABLE_USER . " WHERE account = '$account' AND deleted = '0' LIMIT 1")->fetch();
if(!empty($user->visions)) list($vision) = explode(',', $user->visions);
}
}
list($defaultVision) = explode(',', trim($this->config->visions, ','));
if($vision and strpos($this->config->visions, ",{$vision},") === false) $vision = $defaultVision;
@@ -1377,21 +1384,25 @@ class baseRouter
$modulePath = $this->getModuleRoot($appName) . $moduleName . DS;
if(is_dir($modulePath)) return $modulePath;
/* 2. 尝试查找商业版本是否有此模块。 Try to find the module in other editon. */
/* 2. 尝试查找喧喧是否有此模块。 Try to find the module in xuan. */
$modulePath = $this->getExtensionRoot() . 'xuan' . DS . $moduleName . DS;
if(is_dir($modulePath)) return $modulePath;
/* 3. 尝试查找商业版本是否有此模块。 Try to find the module in other editon. */
if($this->config->edition != 'open')
{
$modulePath = $this->getExtensionRoot() . $this->config->edition . DS . $moduleName . DS;
if(is_dir($modulePath)) return $modulePath;
}
/* 3. 如果设置过vision,尝试在vision中查找。 If vision is set, try to find the module in the vision. */
/* 4. 如果设置过vision,尝试在vision中查找。 If vision is set, try to find the module in the vision. */
if($this->config->vision != 'rnd')
{
$modulePath = $this->getExtensionRoot() . $this->config->vision . DS . $moduleName . DS;
if(is_dir($modulePath)) return $modulePath;
}
/* 4. 最后尝试在定制开发中寻找。 Finally, try to find the module in the custom dir. */
/* 5. 最后尝试在定制开发中寻找。 Finally, try to find the module in the custom dir. */
return $this->getExtensionRoot() . 'custom' . DS . $moduleName . DS;
}
}
@@ -1646,7 +1657,7 @@ class baseRouter
/* 开始拼装代码。Prepare the codes. */
$modelLines = "<?php\n";
$modelLines .= "global \$app;\n";
$modelLines .= "helper::import(\$app->getBasePath() . '" . str_replace($this->getBasePath(), '', $this->getModulePath($this->appName, $moduleName)) . "model.php');\n";
$modelLines .= "helper::import(\$app->getModulePath('', '$moduleName') . " . "'model.php');\n";
$modelLines .= "class $tmpModelClass extends $modelClass \n{\n";
/* 将扩展文件的代码合并到代码中。Cycle all the extension files and merge them into model lines. */
@@ -2387,6 +2398,48 @@ class baseRouter
echo json_encode($view);
}
/**
* 获取主语言文件。
* Get main lang file.
*
* @param string $moduleName the module name
* @param string $appName the app name
* @access public
* @return string.
*/
private function getMainLangFile($moduleName, $appName = '')
{
$path = $moduleName . DS . 'lang' . DS . $this->clientLang . '.php';
/* 1. 如果通用版本里有此模块,优先使用。 If module is in the open edition, use it. */
$modulePath = $this->getModuleRoot($appName);
if(file_exists($modulePath . $path)) return $modulePath . $path;
/* 2. 尝试查找喧喧是否有此模块。 Try to find the module in other editon. */
$modulePath = $this->getExtensionRoot() . 'xuan' . DS;
if(file_exists($modulePath . $path)) return $modulePath . $path;
/* 3. 尝试查找商业版本是否有此模块。 Try to find the module in other editon. */
if($this->config->edition != 'open')
{
$modulePath = $this->getExtensionRoot() . $this->config->edition . DS;
if(file_exists($modulePath . $path)) return $modulePath . $path;
}
/* 4. 如果设置过vision,尝试在vision中查找。 If vision is set, try to find the module in the vision. */
if($this->config->vision != 'rnd')
{
$modulePath = $this->getExtensionRoot() . $this->config->vision . DS;
if(file_exists($modulePath . $path)) return $modulePath . $path;
}
/* 5. 最后尝试在定制开发中寻找。 Finally, try to find the module in the custom dir. */
$modulePath = $this->getExtensionRoot() . 'custom' . DS;
if(file_exists($modulePath . $path)) return $modulePath . $path;
return '';
}
/**
* 加载语言文件,返回全局$lang对象。
* Load lang and return it as the global lang object.
@@ -2404,8 +2457,8 @@ class baseRouter
$langFilesToLoad = array();
/* 判断主语言文件是否存在。Whether the main lang file exists or not. */
$mainLangFile = $modulePath . 'lang' . DS . $this->clientLang . '.php';
if(file_exists($mainLangFile)) $langFilesToLoad[] = $mainLangFile;
$mainLangFile = $this->getMainLangFile($moduleName, $appName);
if($mainLangFile) $langFilesToLoad[] = $mainLangFile;
/* 获取扩展语言文件。If extensionLevel > 0, get extension lang files. */
if($this->config->framework->extensionLevel > 0)
@@ -2417,6 +2470,7 @@ class baseRouter
if($this->config->framework->extensionLevel >= 1)
{
if(!empty($extLangPath['common'])) $commonExtLangFiles = helper::ls($extLangPath['common'] . $this->clientLang, '.php');
if(!empty($extLangPath['xuan'])) $commonExtLangFiles = array_merge($commonExtLangFiles, helper::ls($extLangPath['xuan'] . $this->clientLang, '.php'));
if(!empty($extLangPath['vision'])) $commonExtLangFiles = array_merge($commonExtLangFiles, helper::ls($extLangPath['vision'] . $this->clientLang, '.php'));
if(!empty($extLangPath['custom'])) $commonExtLangFiles = array_merge($commonExtLangFiles, helper::ls($extLangPath['custom'] . $this->clientLang, '.php'));
}
+7 -1
View File
@@ -173,6 +173,7 @@ class control extends baseControl
if(!empty($viewExtPath))
{
$commonExtViewFile = $viewExtPath['common'] . $this->devicePrefix . $methodName . ".{$viewType}.php";
$xuanExtViewFile = $viewExtPath['xuan'] . $this->devicePrefix . $methodName . ".{$viewType}.php";
$visionExtViewFile = $viewExtPath['vision'] . $this->devicePrefix . $methodName . ".{$viewType}.php";
$customExtViewFile = $viewExtPath['custom'] . $this->devicePrefix . $methodName . ".{$viewType}.php";
$siteExtViewFile = empty($viewExtPath['site']) ? '' : $viewExtPath['site'] . $this->devicePrefix . $methodName . ".{$viewType}.php";
@@ -190,6 +191,10 @@ class control extends baseControl
{
$viewFile = $visionExtViewFile;
}
else if(file_exists($xuanExtViewFile))
{
$viewFile = $xuanExtViewFile;
}
else if(file_exists($commonExtViewFile))
{
$viewFile = $commonExtViewFile;
@@ -206,10 +211,11 @@ class control extends baseControl
{
$commonExtHookFiles = glob($viewExtPath['vision'] . $this->devicePrefix . $methodName . ".*.{$viewType}.hook.php");
}
$xuanExtHookFiles = glob($viewExtPath['xuan'] . $this->devicePrefix . $methodName . ".*.{$viewType}.hook.php");
$customExtHookFiles = glob($viewExtPath['custom'] . $this->devicePrefix . $methodName . ".*.{$viewType}.hook.php");
$siteExtHookFiles = empty($viewExtPath['site']) ? '' : glob($viewExtPath['site'] . $this->devicePrefix . $methodName . ".*.{$viewType}.hook.php");
$extHookFiles = array_merge((array)$commonExtHookFiles, (array)$customExtHookFiles, (array)$siteExtHookFiles);
$extHookFiles = array_merge((array)$commonExtHookFiles, (array)$xuanExtHookFiles, (array)$customExtHookFiles, (array)$siteExtHookFiles);
}
if(!empty($extHookFiles)) return array('viewFile' => $viewFile, 'hookFiles' => $extHookFiles);
+2 -2
View File
@@ -73,7 +73,7 @@ class feishuapi
$pageToken = '';
while(true)
{
$response = $this->queryAPI($this->apiUrl . "contact/v3/users?department_id={$deptID}" . ($pageToken ? "&page_token={$pageToken}" : ''), '', array(CURLOPT_CUSTOMREQUEST => "GET"));
$response = $this->queryAPI($this->apiUrl . "contact/v3/users?department_id={$deptID}&page_size=50" . ($pageToken ? "&page_token={$pageToken}" : ''), '', array(CURLOPT_CUSTOMREQUEST => "GET"));
if(isset($response->data->items))
{
foreach($response->data->items as $user) $users[$user->name] = $user->open_id;
@@ -164,7 +164,7 @@ class feishuapi
$index = 0;
while(true)
{
$response = $this->queryAPI($this->apiUrl . "contact/v3/departments?parent_department_id=0" . ($pageToken ? "&page_token={$pageToken}" : '') . "&fetch_child=true", '', array(CURLOPT_CUSTOMREQUEST => "GET"));
$response = $this->queryAPI($this->apiUrl . "contact/v3/departments?parent_department_id=0" . ($pageToken ? "&page_token={$pageToken}" : '') . "&fetch_child=true&page_size=50", '', array(CURLOPT_CUSTOMREQUEST => "GET"));
if(isset($response->data->items))
{
foreach($response->data->items as $key => $dept)
+44 -15
View File
@@ -240,11 +240,11 @@ class gitlab
{
if(!scm::checkRevision($revision)) return array();
$path = ltrim($path, DIRECTORY_SEPARATOR);
$path = urlencode($path);
$api = "files/$path/blame";
$path = ltrim($path, DIRECTORY_SEPARATOR);
$path = urlencode($path);
$api = "files/$path/blame";
$param = new stdclass;
$param->ref = $this->branch;
$param->ref = ($revision and $revision != 'HEAD') ? $revision : $this->branch;
$results = $this->fetch($api, $param);
$blames = array();
@@ -262,13 +262,13 @@ class gitlab
$line['lines'] = count($blame->lines);
$line['content'] = array_shift($blame->lines);
$blames[] = $line;
$blames[$lineNumber] = $line;
$lineNumber ++;
foreach($blame->lines as $line)
{
$blames[] = array('line' => $lineNumber, 'content' => $line);
$blames[$lineNumber] = array('line' => $lineNumber, 'content' => $line);
$lineNumber ++;
}
}
@@ -282,13 +282,15 @@ class gitlab
* @param string $path
* @param string $fromRevision
* @param string $toRevision
* @param string $fromProject
* @param string $extra
* @access public
* @return array
*/
public function diff($path, $fromRevision, $toRevision, $fromProject = '')
public function diff($path, $fromRevision, $toRevision, $fromProject = '', $extra = '')
{
if(!scm::checkRevision($fromRevision)) return array();
if(!scm::checkRevision($toRevision)) return array();
if(!scm::checkRevision($fromRevision) and $extra != 'isBranchOrTag') return array();
if(!scm::checkRevision($toRevision) and $extra != 'isBranchOrTag') return array();
$api = "compare";
$params = array('from' => $fromRevision, 'to' => $toRevision);
@@ -296,6 +298,8 @@ class gitlab
if($toRevision == 'HEAD' and $this->branch) $params['to'] = $this->branch;
$results = $this->fetch($api, $params);
if(!isset($results->diffs)) return array();
foreach($results->diffs as $key => $diff)
{
if($path != '' and strpos($diff->new_path, $path) === false) unset($results->diffs[$key]);
@@ -361,7 +365,7 @@ class gitlab
$commits = $this->getCommitsByPath($entry);
if(!empty($commits)) $file->revision = zget($commits[0], 'id', '');
$info->kind = $file->type == 'tree' ? 'dir' : 'file';
$info->kind = (isset($file->type) and $file->type == 'tree') ? 'dir' : 'file';
}
return $info;
@@ -395,7 +399,8 @@ class gitlab
$endLine = end($lines);
if(strpos($endLine, '\ No newline at end of file') === 0) $num -= 1;
$newFile = false;
$newFile = false;
$allFiles = array();
for($i = 0; $i < $num; $i ++)
{
$diffFile = new stdclass();
@@ -403,6 +408,11 @@ class gitlab
{
$fileInfo = explode(' ',$lines[$i]);
$fileName = substr($fileInfo[2], strpos($fileInfo[2], '/') + 1);
/* Prevent duplicate display of files. */
if(in_array($fileName, $allFiles)) continue;
$allFiles[] = $fileName;
$diffFile->fileName = $fileName;
for($i++; $i < $num; $i ++)
{
@@ -531,10 +541,31 @@ class gitlab
public function getCommits($version = '', $count = 0, $branch = '')
{
if(!scm::checkRevision($version)) return array();
$api = "commits";
$api = "commits";
$commits = array();
$files = array();
if(empty($count)) $count = 10;
if(!empty($version) and $count == 1)
{
$api .= '/' . $version;
$commit = $this->fetch($api);
if(isset($commit->id))
{
$log = new stdclass;
$log->committer = $commit->committer_name;
$log->revision = $commit->id;
$log->comment = $commit->message;
$log->time = date('Y-m-d H:i:s', strtotime($commit->created_at));
$commits[$commit->id] = $log;
$files[$commit->id] = $this->getFilesByCommit($log->revision);
return array('commits' => $commits, 'files' => $files);
}
}
$params = array();
$params['ref_name'] = $branch;
$params['per_page'] = $count;
@@ -564,8 +595,6 @@ class gitlab
$list = $this->fetch($api, $params);
$commits = array();
$files = array();
foreach($list as $commit)
{
if(!is_object($commit)) continue;
@@ -617,7 +646,7 @@ class gitlab
$param = new stdclass();
$param->path = urldecode($path);
$param->ref_name = $this->branch;
$param->ref_name = $fromRevision ? $fromRevision : $this->branch;
$fromDate = $this->getCommittedDate($fromRevision);
$toDate = $this->getCommittedDate($toRevision);
+11 -4
View File
@@ -261,13 +261,14 @@ class GitRepo
* @param string $path
* @param string $fromRevision
* @param string $toRevision
* @param string $extra
* @access public
* @return array
*/
public function diff($path, $fromRevision, $toRevision)
public function diff($path, $fromRevision, $toRevision, $extra = '')
{
if(!scm::checkRevision($fromRevision)) return array();
if(!scm::checkRevision($toRevision)) return array();
if(!scm::checkRevision($fromRevision) and $extra != 'isBranchOrTag') return array();
if(!scm::checkRevision($toRevision) and $extra != 'isBranchOrTag') return array();
$path = ltrim($path, DIRECTORY_SEPARATOR);
chdir($this->root);
@@ -372,7 +373,8 @@ class GitRepo
$endLine = end($lines);
if(strpos($endLine, '\ No newline at end of file') === 0) $num -= 1;
$newFile = false;
$newFile = false;
$allFiles = array();
for($i = 0; $i < $num; $i ++)
{
$diffFile = new stdclass();
@@ -380,6 +382,11 @@ class GitRepo
{
$fileInfo = explode(' ',$lines[$i]);
$fileName = substr($fileInfo[2], strpos($fileInfo[2], '/') + 1);
/* Prevent duplicate display of files. */
if(in_array($fileName, $allFiles)) continue;
$allFiles[] = $fileName;
$diffFile->fileName = $fileName;
for($i++; $i < $num; $i ++)
{
+8 -4
View File
@@ -115,11 +115,15 @@ class scm
*/
public function diff($path, $fromRevision = 0, $toRevision = 'HEAD', $parse = 'yes', $extra = '')
{
if(!scm::checkRevision($fromRevision)) return array();
if(!scm::checkRevision($toRevision)) return array();
if(!scm::checkRevision($fromRevision) and $extra != 'isBranchOrTag') return array();
if(!scm::checkRevision($toRevision) and $extra != 'isBranchOrTag') return array();
if(!$extra) $diffs = $this->engine->diff($path, $fromRevision, $toRevision);
if($extra) $diffs = $this->engine->diff($path, $fromRevision, $toRevision, $extra);
if($extra)
{
if(get_class($this->engine) == 'gitlab') $diffs = $this->engine->diff($path, $fromRevision, $toRevision, '', $extra);
if(get_class($this->engine) != 'gitlab') $diffs = $this->engine->diff($path, $fromRevision, $toRevision, $extra);
}
if($parse != 'yes') return implode("\n", $diffs);
return $this->engine->parseDiff($diffs);
@@ -226,7 +230,7 @@ class scm
*/
public static function checkRevision($revision)
{
if(preg_match('/[^a-z0-9\^]/i', $revision)) return false;
if(preg_match('/[^a-z0-9\-_\.\^]/i', $revision)) return false;
return true;
}
}
+1
View File
@@ -818,6 +818,7 @@ $lang->action->label->repocreated = "create and review";
$lang->action->dynamicAction->task['gitcommited'] = 'Git Commit';
$lang->action->dynamicAction->bug['repocreated'] = $lang->action->label->repocreated;
$lang->action->desc->createmr = '$extra';
$lang->action->desc->deletemr = '$date, <strong>$actor</strong> unlink <a href="$extra">merge request</a>。';
$lang->action->desc->mergedmr = '$date, <strong>$actor</strong> merged <a href="$extra">code</a>.';
$lang->action->desc->approve = '$date, <strong>$actor</strong> approved.';
$lang->action->desc->reject = '$date, <strong>$actor</strong> rejected.';
+1
View File
@@ -818,6 +818,7 @@ $lang->action->label->repocreated = "创建评审";
$lang->action->dynamicAction->task['gitcommited'] = 'git提交';
$lang->action->dynamicAction->bug['repocreated'] = '创建代码评审';
$lang->action->desc->createmr = '$extra';
$lang->action->desc->deletemr = '$date, 由 <strong>$actor</strong> 取消关联了 <a href="$extra">合并请求</a>。';
$lang->action->desc->mergedmr = '$date, 由 <strong>$actor</strong> 合并了 <a href="$extra">代码</a>。';
$lang->action->desc->approve = '$date, 由 <strong>$actor</strong> 审核通过。';
$lang->action->desc->reject = '$date, 由 <strong>$actor</strong> 拒绝。';
+9 -4
View File
@@ -48,7 +48,7 @@ class actionModel extends model
$action->action = $actionType;
$action->date = helper::now();
$action->extra = $extra;
$action->vision = $this->config->vision;
if(!defined('IN_UPGRADE')) $action->vision = $this->config->vision;
if($objectType == 'story' and strpos(',reviewpassed,reviewrejected,reviewclarified,', ",$actionType,") !== false) $action->actor = $this->lang->action->system;
@@ -733,7 +733,12 @@ class actionModel extends model
{
$desc = $this->lang->$objectType->action->changebychild;
}
elseif(isset($this->config->maxVersion) and strpos($this->config->action->assetType, $action->objectType) !== false and $action->action == 'approved')
elseif($action->action == 'createmr' and strpos($action->extra, '::') !== false)
{
list($mrCreatedDate, $mrActor, $mrLink) = explode('::', $action->extra);
$desc = sprintf($this->lang->mr->createAction, $mrCreatedDate, $mrActor, $mrLink);
}
elseif($this->config->edition == 'max' and strpos($this->config->action->assetType, $action->objectType) !== false and $action->action == 'approved')
{
$desc = empty($this->lang->action->approve->{$action->extra}) ? '' : $this->lang->action->approve->{$action->extra};
}
@@ -1232,7 +1237,7 @@ class actionModel extends model
if(is_array($objectLabel) and isset($objectLabel[$actionType])) $actionObjectLabel = $objectLabel[$actionType];
}
if(isset($this->config->maxVersion) and $objectType == 'assetlib')
if($this->config->edition == 'max' and $objectType == 'assetlib')
{
$libType = $this->dao->select('type')->from(TABLE_ASSETLIB)->where('id')->eq($objectID)->fetch('type');
if(strpos('story,issue,risk,opportunity,practice,component', $libType) !== false) $actionObjectLabel = $this->lang->action->label->{$libType . 'assetlib'};
@@ -1265,7 +1270,7 @@ class actionModel extends model
$action->objectLabel = $objectLabel;
$action->product = trim($action->product, ',');
if(isset($this->config->maxVersion)
if($this->config->edition == 'max'
and strpos($this->config->action->assetType, $action->objectType) !== false
and empty($action->project) and empty($action->product) and empty($action->execution))
{
+4 -4
View File
@@ -1706,17 +1706,17 @@ class block extends control
if(common::hasPriv('todo', 'view')) $hasViewPriv['todo'] = true;
if(common::hasPriv('task', 'view')) $hasViewPriv['task'] = true;
if(common::hasPriv('bug', 'view')) $hasViewPriv['bug'] = true;
if(common::hasPriv('risk', 'view') and isset($this->config->maxVersion)) $hasViewPriv['risk'] = true;
if(common::hasPriv('issue', 'view') and isset($this->config->maxVersion)) $hasViewPriv['issue'] = true;
if(common::hasPriv('meeting', 'view') and isset($this->config->maxVersion)) $hasViewPriv['meeting'] = true;
if(common::hasPriv('story', 'view')) $hasViewPriv['story'] = true;
if(common::hasPriv('risk', 'view') and $this->config->edition == 'max') $hasViewPriv['risk'] = true;
if(common::hasPriv('issue', 'view') and $this->config->edition == 'max') $hasViewPriv['issue'] = true;
if(common::hasPriv('meeting', 'view') and $this->config->edition == 'max') $hasViewPriv['meeting'] = true;
$params = $this->get->param;
$params = json_decode(base64_decode($params));
$count = array();
$objectList = array('todo' => 'todos', 'task' => 'tasks', 'bug' => 'bugs', 'story' => 'stories');
$objectCountList = array('todo' => 'todoCount', 'task' => 'taskCount', 'bug' => 'bugCount', 'story' => 'storyCount');
if(isset($this->config->maxVersion))
if($this->config->edition == 'max')
{
$objectList += array('risk' => 'risks', 'issue' => 'issues');
$objectCountList += array('risk' => 'riskCount', 'issue' => 'issueCount');
+5 -5
View File
@@ -67,8 +67,8 @@ $lang->block->createdDocs = 'Docs Created';
$lang->block->allExecutions = 'All ' . $lang->executionCommon;
$lang->block->doingExecution = 'Doning ' . $lang->executionCommon;
$lang->block->finishExecution = 'Finish ' . $lang->executionCommon;
$lang->block->estimatedHours = 'Estimated Hours';
$lang->block->consumedHours = 'Consumed Hours';
$lang->block->estimatedHours = 'Estimated';
$lang->block->consumedHours = 'Cost';
$lang->block->time = 'No';
$lang->block->week = 'Week';
$lang->block->month = 'Month';
@@ -93,15 +93,15 @@ $lang->block->cannotPlaceInLeft = 'Kann den Block nicht auf der linken Seite pl
$lang->block->cannotPlaceInRight = 'Kann den Block nicht auf der rechten Seite platzieren.';
$lang->block->productName = $lang->productCommon . ' Name';
$lang->block->totalStory = 'The Total ' . $lang->SRCommon;
$lang->block->totalBug = 'The Total Bug';
$lang->block->totalStory = 'Total Story';
$lang->block->totalBug = 'Total Bug';
$lang->block->totalRelease = 'Release The Number';
$lang->block->totalInvestment = 'Total investment';
$lang->block->totalPeople = 'Total number';
$lang->block->spent = 'Has Been Spent';
$lang->block->budget = 'Budget';
$lang->block->left = 'Residuals';
$lang->block->left = 'Remain';
$lang->block->default['waterfall']['project']['3']['title'] = 'Plan Gantt Chart';
$lang->block->default['waterfall']['project']['3']['block'] = 'waterfallgantt';
+5 -5
View File
@@ -69,8 +69,8 @@ $lang->block->createdDocs = 'Docs Created';
$lang->block->allExecutions = 'All ' . $lang->executionCommon;
$lang->block->doingExecution = 'Doning ' . $lang->executionCommon;
$lang->block->finishExecution = 'Finish ' . $lang->executionCommon;
$lang->block->estimatedHours = 'Estimated Hours';
$lang->block->consumedHours = 'Consumed Hours';
$lang->block->estimatedHours = 'Estimated';
$lang->block->consumedHours = 'Cost';
$lang->block->time = 'No';
$lang->block->week = 'Week';
$lang->block->month = 'Month';
@@ -96,8 +96,8 @@ $lang->block->cannotPlaceInLeft = 'Cannot place the block at left side.';
$lang->block->cannotPlaceInRight = 'Cannot place the block at right side.';
$lang->block->productName = $lang->productCommon . ' Name';
$lang->block->totalStory = 'The Total ' . $lang->SRCommon;
$lang->block->totalBug = 'The Total Bug';
$lang->block->totalStory = 'Total Story';
$lang->block->totalBug = 'Total Bug';
$lang->block->totalRelease = 'Release The Number';
$lang->block->totalTask = 'The Total ' . $lang->task->common;
@@ -105,7 +105,7 @@ $lang->block->totalInvestment = 'Total investment';
$lang->block->totalPeople = 'Total number';
$lang->block->spent = 'Has Been Spent';
$lang->block->budget = 'Budget';
$lang->block->left = 'Residuals';
$lang->block->left = 'Remain';
$lang->block->default['waterfall']['project']['3']['title'] = 'Plan Gantt Chart';
$lang->block->default['waterfall']['project']['3']['block'] = 'waterfallgantt';
+5 -5
View File
@@ -67,8 +67,8 @@ $lang->block->createdDocs = 'Docs Created';
$lang->block->allExecutions = 'All ' . $lang->executionCommon;
$lang->block->doingExecution = 'Doning ' . $lang->executionCommon;
$lang->block->finishExecution = 'Finish ' . $lang->executionCommon;
$lang->block->estimatedHours = 'Estimated Hours';
$lang->block->consumedHours = 'Consumed Hours';
$lang->block->estimatedHours = 'Estimated';
$lang->block->consumedHours = 'Cost';
$lang->block->time = 'No';
$lang->block->week = 'Week';
$lang->block->month = 'Month';
@@ -93,15 +93,15 @@ $lang->block->cannotPlaceInLeft = 'Impossible de placer le bloc à gauche.';
$lang->block->cannotPlaceInRight = 'Impossible de placer le bloc à droite.';
$lang->block->productName = $lang->productCommon . ' Name';
$lang->block->totalStory = 'The Total ' . $lang->SRCommon;
$lang->block->totalBug = 'The Total Bug';
$lang->block->totalStory = 'Total';
$lang->block->totalBug = 'Total Bug';
$lang->block->totalRelease = 'Release The Number';
$lang->block->totalInvestment = 'Total investment';
$lang->block->totalPeople = 'Total number';
$lang->block->spent = 'Has Been Spent';
$lang->block->budget = 'Budget';
$lang->block->left = 'Residuals';
$lang->block->left = 'Remain';
$lang->block->default['waterfall']['project']['3']['title'] = 'Plan Gantt Chart';
$lang->block->default['waterfall']['project']['3']['block'] = 'waterfallgantt';
+5 -5
View File
@@ -67,8 +67,8 @@ $lang->block->createdDocs = 'Docs Created';
$lang->block->allExecutions = 'All ' . $lang->executionCommon;
$lang->block->doingExecution = 'Doning ' . $lang->executionCommon;
$lang->block->finishExecution = 'Finish ' . $lang->executionCommon;
$lang->block->estimatedHours = 'Estimated Hours';
$lang->block->consumedHours = 'Consumed Hours';
$lang->block->estimatedHours = 'Estimated';
$lang->block->consumedHours = 'Cost';
$lang->block->time = 'No';
$lang->block->week = 'Week';
$lang->block->month = 'Month';
@@ -93,15 +93,15 @@ $lang->block->cannotPlaceInLeft = 'Khối này không thể được đặt ở
$lang->block->cannotPlaceInRight = 'Khối này không thể được đặt ở bên phải.';
$lang->block->productName = $lang->productCommon . ' Name';
$lang->block->totalStory = 'The Total ' . $lang->SRCommon;
$lang->block->totalBug = 'The Total Bug';
$lang->block->totalStory = 'Total';
$lang->block->totalBug = 'Total Bug';
$lang->block->totalRelease = 'Release The Number';
$lang->block->totalInvestment = 'Total investment';
$lang->block->totalPeople = 'Total number';
$lang->block->spent = 'Has Been Spent';
$lang->block->budget = 'Budget';
$lang->block->left = 'Residuals';
$lang->block->left = 'Remain';
$lang->block->default['waterfall']['project']['3']['title'] = 'Plan Gantt Chart';
$lang->block->default['waterfall']['project']['3']['block'] = 'waterfallgantt';
+1 -2
View File
@@ -175,7 +175,6 @@ class blockModel extends model
->orWhere('t3.status')->ne('suspended')
->markRight(1)
->andWhere('t1.deleted')->eq('0')
->beginIF($this->config->systemMode == 'new')->andWhere('t2.deleted')->eq('0')->fi()
->andWhere('t3.deleted')->eq('0')
->fetchAll('id');
$data['tasks'] = isset($tasks) ? count($tasks) : 0;
@@ -750,7 +749,7 @@ class blockModel extends model
$params->bugCount['default'] = 20;
$params->bugCount['control'] = 'input';
if(isset($this->config->maxVersion))
if($this->config->edition == 'max')
{
$params->riskCount['name'] = $this->lang->block->riskCount;
$params->riskCount['default'] = 20;
+1 -1
View File
@@ -32,7 +32,7 @@
<div class="tile-title"><?php echo $lang->block->createdCases;?></div>
<div class="tile-amount"><?php echo empty($data['createdCases']) ? 0 : html::a($this->createLink('my', 'contribute', 'mode=testcase&type=openedbyme'), (int)$data['createdCases']);?></div>
</div>
<?php if(isset($config->maxVersion)):?>
<?php if($this->config->edition == 'max'):?>
<div class="col-xs-4 tile">
<div class="tile-title"><?php echo $lang->block->createdRisks;?></div>
<div class="tile-amount"><?php echo empty($data['createdRisks']) ? 0 : html::a($this->createLink('my', 'contribute', 'mode=risk'), (int)$data['createdRisks']);?></div>
@@ -44,13 +44,11 @@
<div class='col'>
<div class='panel-content'>
<div class='panel-heading not-move-handler'>
<?php if(isset($config->maxVersion)):?>
<?php if($project->model === 'waterfall'): ?>
<span class='project-type-label label label-warning label-outline'><?php echo $lang->project->waterfall; ?></span>
<?php else: ?>
<span class='project-type-label label label-info label-outline'><?php echo $lang->project->scrum; ?></span>
<?php endif; ?>
<?php endif; ?>
<strong class='project-name' title='<?php echo $project->name;?>'> <?php echo html::a($viewLink, $project->name);?> </strong>
<nav class='panel-actions nav nav-default'>
<li class='dropdown'>
+100 -3
View File
@@ -85,8 +85,6 @@ class branchModel extends model
$mainBranch->desc = sprintf($this->lang->branch->mainBranch, $this->lang->product->branchName[$product->type]);
$mainBranch->order = 0;
if($productID) $product = $this->loadModel('product')->getById($productID);
if(isset($product) and $product->type == 'normal') return $branchList;
return array($mainBranch) + $branchList;
}
@@ -351,16 +349,115 @@ class branchModel extends model
/**
* Unlink branches for projects when product type is normal.
*
* @param int $productIDList
* @param int|array $productIDList
* @access public
* @return void
*/
public function unlinkBranch4Project($productIDList)
{
$productLinkedProject = $this->dao->select('*')->from(TABLE_PROJECTPRODUCT)
->where('product')->in($productIDList)
->andWhere('branch')->gt(0)
->fetchGroup('product', 'project');
$this->dao->delete()->from(TABLE_PROJECTPRODUCT)
->where('product')->in($productIDList)
->andWhere('branch')->gt(0)
->exec();
foreach($productLinkedProject as $productID => $projectList)
{
foreach($projectList as $projectID => $project)
{
$data = new stdClass();
$data->product = $productID;
$data->project = $projectID;
$data->branch = 0;
$data->plan = 0;
$this->dao->replace(TABLE_PROJECTPRODUCT)->data($data)->exec();
}
}
}
/**
* Link branches for projects when product type is not normal.
*
* @param int $productID
* @access public
* @return void
*/
public function linkBranch4Project($productID)
{
if(is_array($productID))
{
foreach($productID as $id) $this->linkBranch4Project($id);
}
$linkedBranchProject = array();
$storyLinkedBranchProject = $this->dao->select('project,branch')->from(TABLE_PROJECTSTORY)
->where('product')->eq($productID)
->andWhere('branch')->gt(0)
->fetchGroup('project', 'branch');
foreach($storyLinkedBranchProject as $projectID => $branchList)
{
foreach($branchList as $branchID => $branch) $linkedBranchProject[$projectID][$branchID] = $branchID;
}
$bugLinkedBranchProject = $this->dao->select('project,branch')->from(TABLE_BUG)
->where('product')->eq($productID)
->andWhere('branch')->gt(0)
->andWhere('project')->ne(0)
->fetchGroup('project', 'branch');
foreach($bugLinkedBranchProject as $projectID => $branchList)
{
foreach($branchList as $branchID => $branch) $linkedBranchProject[$projectID][$branchID] = $branchID;
}
$bugLinkedBranchExecution = $this->dao->select('execution,branch')->from(TABLE_BUG)
->where('product')->eq($productID)
->andWhere('branch')->gt(0)
->andWhere('execution')->ne(0)
->fetchGroup('execution', 'branch');
foreach($bugLinkedBranchExecution as $executionID => $branchList)
{
foreach($branchList as $branchID => $branch) $linkedBranchProject[$executionID][$branchID] = $branchID;
}
$caseLinkedBranchProject = $this->dao->select('project,branch')->from(TABLE_CASE)
->where('product')->eq($productID)
->andWhere('branch')->gt(0)
->andWhere('project')->ne(0)
->fetchGroup('project', 'branch');
foreach($caseLinkedBranchProject as $projectID => $branchList)
{
foreach($branchList as $branchID => $branch) $linkedBranchProject[$projectID][$branchID] = $branchID;
}
$caseLinkedBranchExecution = $this->dao->select('execution,branch')->from(TABLE_CASE)
->where('product')->eq($productID)
->andWhere('branch')->gt(0)
->andWhere('execution')->ne(0)
->fetchGroup('execution', 'branch');
foreach($caseLinkedBranchExecution as $executionID => $branchList)
{
foreach($branchList as $branchID => $branch) $linkedBranchProject[$executionID][$branchID] = $branchID;
}
foreach($linkedBranchProject as $projectID => $branchList)
{
foreach($branchList as $branchID)
{
$data = new stdClass();
$data->product = $productID;
$data->project = $projectID;
$data->branch = $branchID;
$data->plan = 0;
$this->dao->replace(TABLE_PROJECTPRODUCT)->data($data)->exec();
}
}
}
/**
+1
View File
@@ -164,6 +164,7 @@ $config->bug->datatable->fieldList['severity']['title'] = 'severityAB';
$config->bug->datatable->fieldList['severity']['fixed'] = 'left';
$config->bug->datatable->fieldList['severity']['width'] = '50';
$config->bug->datatable->fieldList['severity']['required'] = 'no';
$config->bug->datatable->fieldList['severity']['name'] = $lang->bug->severity;
$config->bug->datatable->fieldList['pri']['title'] = 'P';
$config->bug->datatable->fieldList['pri']['fixed'] = 'left';
+88 -58
View File
@@ -89,16 +89,23 @@ class bug extends control
$this->loadModel('datatable');
$productID = $this->product->saveState($productID, $this->products);
$product = $this->product->getById($productID);
if($product->type != 'normal')
{
/* Set productID, moduleID, queryID and branch. */
$branch = ($this->cookie->preBranch !== '' and $branch === '') ? $this->cookie->preBranch : $branch;
setcookie('preProductID', $productID, $this->config->cookieLife, $this->config->webRoot, '', $this->config->cookieSecure, true);
setcookie('preBranch', $branch, $this->config->cookieLife, $this->config->webRoot, '', $this->config->cookieSecure, true);
}
else
{
$branch = 'all';
}
$this->qa->setMenu($this->products, $productID, $branch);
/* Set browse type. */
$browseType = strtolower($browseType);
/* Set productID, moduleID, queryID and branch. */
$branch = ($this->cookie->preBranch !== '' and $branch === '') ? $this->cookie->preBranch : $branch;
setcookie('preProductID', $productID, $this->config->cookieLife, $this->config->webRoot, '', $this->config->cookieSecure, true);
setcookie('preBranch', $branch, $this->config->cookieLife, $this->config->webRoot, '', $this->config->cookieSecure, true);
if($this->cookie->preProductID != $productID or $this->cookie->preBranch != $branch or $browseType == 'bybranch')
{
$_COOKIE['bugModule'] = 0;
@@ -191,19 +198,22 @@ class bug extends control
$showModule = !empty($this->config->datatable->bugBrowse->showModule) ? $this->config->datatable->bugBrowse->showModule : '';
$productName = ($productID and isset($this->products[$productID])) ? $this->products[$productID] : $this->lang->product->allProduct;
$product = $this->product->getById($productID);
/* Display of branch label. */
$showBranch = $this->loadModel('branch')->showBranch($productID);
/* Display status of branch. */
$branches = $this->loadModel('branch')->getList($productID, 0, 'all');
$showBranch = false;
$branchOption = array();
$branchTagOption = array();
foreach($branches as $branchInfo)
if($product and $product->type != 'normal')
{
$branchOption[$branchInfo->id] = $branchInfo->name;
$branchTagOption[$branchInfo->id] = $branchInfo->name . ($branchInfo->status == 'closed' ? ' (' . $this->lang->branch->statusList['closed'] . ')' : '');
/* Display of branch label. */
$showBranch = $this->loadModel('branch')->showBranch($productID);
/* Display status of branch. */
$branches = $this->loadModel('branch')->getList($productID, 0, 'all');
foreach($branches as $branchInfo)
{
$branchOption[$branchInfo->id] = $branchInfo->name;
$branchTagOption[$branchInfo->id] = $branchInfo->name . ($branchInfo->status == 'closed' ? ' (' . $this->lang->branch->statusList['closed'] . ')' : '');
}
}
/* Set view. */
@@ -743,6 +753,18 @@ class bug extends control
$projectID = $this->lang->navGroup->bug == 'project' ? $this->session->project : (isset($execution) ? $execution->project : 0);
/* Get branches. */
if($executionID)
{
$productBranches = $product->type != 'normal' ? $this->execution->getBranchByProduct($productID, $executionID) : array();
$branches = isset($productBranches[$productID]) ? $productBranches[$productID] : array();
$branch = key($branches);
}
else
{
$branches = $product->type != 'normal' ? $this->loadModel('branch')->getPairs($productID, 'active') : array();
}
$this->view->customFields = $customFields;
$this->view->showFields = $showFields;
@@ -761,7 +783,7 @@ class bug extends control
$this->view->moduleOptionMenu = $this->tree->getOptionMenu($productID, $viewType = 'bug', $startModuleID = 0, $branch === 'all' ? 0 : $branch);
$this->view->moduleID = $moduleID;
$this->view->branch = $branch;
$this->view->branches = $this->loadModel('branch')->getPairs($productID, 'active');
$this->view->branches = $branches;
$this->display();
}
@@ -985,13 +1007,16 @@ class bug extends control
$branchTagOption[$branchInfo->id] = $branchInfo->name . ($branchInfo->status == 'closed' ? ' (' . $this->lang->branch->statusList['closed'] . ')' : '');
}
$moduleOptionMenu = $this->tree->getOptionMenu($productID, $viewType = 'bug', $startModuleID = 0, $bug->branch);
if(!isset($moduleOptionMenu[$bug->module])) $moduleOptionMenu += $this->tree->getModulesName($bug->module);
$this->view->bug = $bug;
$this->view->productID = $productID;
$this->view->product = $product;
$this->view->productName = $this->products[$productID];
$this->view->plans = $this->loadModel('productplan')->getPairs($productID, $bug->branch, '', true);
$this->view->projects = array(0 => '') + $this->product->getProjectPairsByProduct($productID, $bug->branch, $bug->project);
$this->view->moduleOptionMenu = $this->tree->getOptionMenu($productID, $viewType = 'bug', $startModuleID = 0, $bug->branch);
$this->view->moduleOptionMenu = $moduleOptionMenu;
$this->view->currentModuleID = $currentModuleID;
$this->view->executions = array(0 => '') + $this->product->getExecutionPairsByProduct($bug->product, $bug->branch, 'id_desc', $bug->project);
$this->view->stories = $bug->execution ? $this->story->getExecutionStoryPairs($bug->execution) : $this->story->getProductStoryPairs($bug->product, $bug->branch);
@@ -1065,57 +1090,58 @@ class bug extends control
$plans = array('' => '', 'ditto' => $this->lang->bug->ditto) + $plans;
/* Set branches and modules. */
$branches = array();
$branches = 0;
$branchTagOption = array();
$modules = array();
$modules = array();
if($product->type != 'normal')
{
$branches = $this->loadModel('branch')->getList($productID, 0 ,'all');
foreach($branches as $branchInfo)
{
$branchTagOption[$branchInfo->id] = $branchInfo->name . ($branchInfo->status == 'closed' ? ' (' . $this->lang->branch->statusList['closed'] . ')' : '');
}
foreach($branchTagOption as $branchID => $branchName)
{
$modules[$productID][$branchID] = $this->tree->getOptionMenu($productID, 'bug', 0, $branchID);
}
}
else
{
$modules[$productID][0] = $this->tree->getOptionMenu($productID, 'bug');
foreach($branches as $branchInfo) $branchTagOption[$productID][$branchInfo->id] = $branchInfo->name . ($branchInfo->status == 'closed' ? ' (' . $this->lang->branch->statusList['closed'] . ')' : '');
$branches = array_keys($branches);
}
$modulePairs = $this->tree->getOptionMenu($productID, 'bug', 0, $branches);
$modules[$productID] = $product->type != 'normal' ? $modulePairs : array(0 => $modulePairs);
/* Set product menu. */
$this->qa->setMenu($this->products, $productID, $branch);
$this->view->title = $product->name . $this->lang->colon . "BUG" . $this->lang->bug->batchEdit;
$this->view->position[] = html::a($this->createLink('bug', 'browse', "productID=$productID&branch=$branch"), $this->products[$productID]);
$this->view->plans = $plans;
$this->view->branchTagOption = $branchTagOption;
$this->view->modules = $modules;
$this->view->title = $product->name . $this->lang->colon . "BUG" . $this->lang->bug->batchEdit;
$this->view->position[] = html::a($this->createLink('bug', 'browse', "productID=$productID&branch=$branch"), $this->products[$productID]);
$this->view->plans = $plans;
}
/* The bugs of my. */
else
{
$branchProduct = false;
$productIdList = array();
$branchProduct = false;
$productIdList = array();
$branchTagOption = array();
foreach($bugs as $bug) $productIdList[$bug->product] = $bug->product;
$products = $this->product->getByIdList($productIdList);
foreach($products as $product)
$productList = $this->product->getByIdList($productIdList);
foreach($productList as $product)
{
$branches = 0;
if($product->type != 'normal')
{
$branches = $this->loadModel('branch')->getList($product->id, 0 ,'all');
foreach($branches as $branchInfo) $branchTagOption[$product->id][$branchInfo->id] = '/' . $product->name . '/' . $branchInfo->name . ($branchInfo->status == 'closed' ? ' (' . $this->lang->branch->statusList['closed'] . ')' : '');
$branches = array_keys($branches);
$branchProduct = true;
break;
}
$modulePairs = $this->tree->getOptionMenu($product->id, 'bug', 0, $branches);
$modules[$product->id] = $product->type != 'normal' ? $modulePairs : array(0 => $modulePairs);
}
$this->app->loadLang('my');
$this->lang->task->menu = $this->lang->my->menu->work;
$this->lang->my->menu->work['subModule'] = 'bug';
$this->view->position[] = html::a($this->createLink('my', 'bug'), $this->lang->my->bug);
$this->view->title = "BUG" . $this->lang->bug->batchEdit;
$this->view->position[] = html::a($this->createLink('my', 'bug'), $this->lang->my->bug);
$this->view->title = "BUG" . $this->lang->bug->batchEdit;
$this->view->plans = $this->loadModel('productplan')->getPairs($product->id, $branch);
$this->view->productList = $productList;
}
/* Judge whether the editedBugs is too large and set session. */
@@ -1134,25 +1160,29 @@ class bug extends control
{
$appendUsers[$bug->assignedTo] = $bug->assignedTo;
$appendUsers[$bug->resolvedBy] = $bug->resolvedBy;
if(!isset($modules[$bug->product][$bug->branch])) $modules[$bug->product][$bug->branch] = $modules[$bug->product][0] + $this->tree->getModulesName($bug->module);
}
$users = $this->user->getPairs('devfirst', $appendUsers, $this->config->maxCount);
$users = array('' => '', 'ditto' => $this->lang->bug->ditto) + $users;
/* Assign. */
$this->view->position[] = $this->lang->bug->common;
$this->view->position[] = $this->lang->bug->batchEdit;
$this->view->productID = $productID;
$this->view->branchProduct = $branchProduct;
$this->view->severityList = array('ditto' => $this->lang->bug->ditto) + $this->lang->bug->severityList;
$this->view->typeList = array('' => '', 'ditto' => $this->lang->bug->ditto) + $this->lang->bug->typeList;
$this->view->priList = array('0' => '', 'ditto' => $this->lang->bug->ditto) + $this->lang->bug->priList;
$this->view->resolutionList = array('' => '', 'ditto' => $this->lang->bug->ditto) + $this->lang->bug->resolutionList;
$this->view->statusList = array('' => '', 'ditto' => $this->lang->bug->ditto) + $this->lang->bug->statusList;
$this->view->osList = array('' => '', 'ditto' => $this->lang->bug->ditto) + $this->lang->bug->osList;
$this->view->browserList = array('' => '', 'ditto' => $this->lang->bug->ditto) + $this->lang->bug->browserList;
$this->view->bugs = $bugs;
$this->view->branch = $branch;
$this->view->users = $users;
$this->view->position[] = $this->lang->bug->common;
$this->view->position[] = $this->lang->bug->batchEdit;
$this->view->productID = $productID;
$this->view->branchProduct = $branchProduct;
$this->view->severityList = array('ditto' => $this->lang->bug->ditto) + $this->lang->bug->severityList;
$this->view->typeList = array('' => '', 'ditto' => $this->lang->bug->ditto) + $this->lang->bug->typeList;
$this->view->priList = array('0' => '', 'ditto' => $this->lang->bug->ditto) + $this->lang->bug->priList;
$this->view->resolutionList = array('' => '', 'ditto' => $this->lang->bug->ditto) + $this->lang->bug->resolutionList;
$this->view->statusList = array('' => '', 'ditto' => $this->lang->bug->ditto) + $this->lang->bug->statusList;
$this->view->osList = array('' => '', 'ditto' => $this->lang->bug->ditto) + $this->lang->bug->osList;
$this->view->browserList = array('' => '', 'ditto' => $this->lang->bug->ditto) + $this->lang->bug->browserList;
$this->view->bugs = $bugs;
$this->view->branch = $branch;
$this->view->users = $users;
$this->view->modules = $modules;
$this->view->branchTagOption = $branchTagOption;
$this->display();
}
@@ -2113,7 +2143,7 @@ class bug extends control
}
if(!(in_array('platform', $productsType) or in_array('branch', $productsType))) unset($fields['branch']);// If products's type are normal, unset branch field.
if(isset($this->config->bizVersion)) list($fields, $bugs) = $this->loadModel('workflowfield')->appendDataFromFlow($fields, $bugs);
if($this->config->edition != 'open') list($fields, $bugs) = $this->loadModel('workflowfield')->appendDataFromFlow($fields, $bugs);
$this->post->set('fields', $fields);
$this->post->set('rows', $bugs);
+1 -1
View File
@@ -2840,7 +2840,7 @@ class bugModel extends model
if(strpos(',type,execution,story,plan,task,openedBuild,', ",{$id},") !== false) $class .= ' text-ellipsis';
echo "<td class='" . $class . "' $title>";
if(isset($this->config->bizVersion)) $this->loadModel('flow')->printFlowCell('bug', $bug, $id);
if($this->config->edition != 'open') $this->loadModel('flow')->printFlowCell('bug', $bug, $id);
switch($id)
{
case 'id':
+3 -22
View File
@@ -74,24 +74,6 @@
<?php foreach($bugs as $bugID => $bug):?>
<?php
if(!empty($this->config->user->moreLink)) $this->config->moreLinks["assignedTos[$bugID]"] = $this->config->user->moreLink;
if(!$productID)
{
$branchTagOption = array();
$product = $this->product->getByID($bug->product);
$plans = $this->loadModel('productplan')->getPairs($bug->product, $branch);
$branches = $product->type == 'normal' ? array() : $this->loadModel('branch')->getList($product->id, 0 ,'all');
foreach($branches as $branchInfo)
{
$branchTagOption[$branchInfo->id] = $branchInfo->name . ($branchInfo->status == 'closed' ? ' (' . $this->lang->branch->statusList['closed'] . ')' : '');
}
$modules[$bug->product][0] = $this->tree->getOptionMenu($bug->product, 'bug');
if($product->type != 'normal')
{
foreach($branchTagOption as $branchID => $branchName) $branchTagOption[$branchID] = '/' . $product->name . '/' . $branchName;
$modules[$bug->product][$bug->branch] = $this->tree->getOptionMenu($bug->product, 'bug', 0, $bug->branch);
}
}
?>
<tr>
<td><?php echo $bugID . html::hidden("bugIDList[$bugID]", $bugID);?></td>
@@ -114,12 +96,11 @@
</td>
<?php if($branchProduct):?>
<td style='overflow:visible'>
<?php $branchProductID = $productID ? $productID : $product->id;?>
<?php $disabled = (isset($product) and $product->type == 'normal') ? "disabled='disabled'" : '';?>
<?php echo html::select("branches[$bugID]", $branchTagOption, $bug->branch, "class='form-control chosen' $disabled onchange='setBranchRelated(this.value, $bug->product, $bug->id)'");?>
<?php $disabled = (isset($productList) and $productList[$bug->product]->type == 'normal') ? "disabled='disabled'" : '';?>
<?php echo html::select("branches[$bugID]", !empty($disabled) ? array() : $branchTagOption[$bug->product], $bug->branch, "class='form-control chosen' $disabled onchange='setBranchRelated(this.value, $bug->product, $bug->id)'");?>
</td>
<?php endif;?>
<td><?php echo html::select("modules[$bugID]", $modules[$bug->product][$bug->branch], $bug->module, "class='form-control chosen'");?></td>
<td><?php echo html::select("modules[$bugID]", isset($modules[$bug->product][$bug->branch]) ? $modules[$bug->product][$bug->branch] : array(0 => '/'), $bug->module, "class='form-control chosen'");?></td>
<td class='<?php echo zget($visibleFields, 'productplan', ' hidden')?>' style='overflow:visible'><?php echo html::select("plans[$bugID]", $plans, $bug->plan, "class='form-control chosen'");?></td>
<td class='<?php echo zget($visibleFields, 'assignedTo', ' hidden')?>' style='overflow:visible'><?php echo html::select("assignedTos[$bugID]", $users, $bug->assignedTo, "class='form-control chosen'");?></td>
<td class='<?php echo zget($visibleFields, 'deadline', ' hidden')?>' style='overflow:visible'><?php echo html::input("deadlines[$bugID]", $bug->deadline, "class='form-control form-date'");?></td>
+1 -1
View File
@@ -244,7 +244,7 @@ tbody tr td:first-child input {display: none;}
<thead>
<tr class='text-center'>
<th class='c-id text-left'><?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
<th class='c-status'> <?php common::printOrderLink('severity', $orderBy, $vars, $lang->bug->severityAB);?></th>
<th class='c-status' title=<?php echo $lang->bug->severity;?>><?php common::printOrderLink('severity', $orderBy, $vars, $lang->bug->severityAB);?></th>
<th class='text-left'><?php common::printOrderLink('title', $orderBy, $vars, $lang->bug->title);?></th>
<th class='c-status'> <?php common::printOrderLink('status', $orderBy, $vars, $lang->bug->status);?></th>
<th class='c-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
+1 -1
View File
@@ -59,7 +59,7 @@ class ciModel extends model
* @access public
* @return void
*/
public function syncCompileStatus($compile, $notCompileMR)
public function syncCompileStatus($compile, $notCompileMR = array())
{
$MRID = array_search($compile->job, $notCompileMR);
+1 -1
View File
@@ -540,7 +540,7 @@ $lang->admin->menu->system['subMenu']->safe = array('link' => "$lang->sec
$lang->admin->menu->system['subMenu']->cron = array('link' => "{$lang->admin->cron}|cron|index", 'subModule' => 'cron');
$lang->admin->menu->system['subMenu']->timezone = array('link' => "$lang->timezone|custom|timezone");
$lang->admin->menu->system['subMenu']->buildIndex = array('link' => "{$lang->admin->buildIndex}|search|buildindex|");
$lang->admin->menu->system['subMenu']->convertJira = array('link' => "{$lang->convert->importJira}|convert|convertjira|", 'subModule' => 'convert');
if(version_compare(phpversion(), 5.6) > 0) $lang->admin->menu->system['subMenu']->convertJira = array('link' => "{$lang->convert->importJira}|convert|convertjira|", 'subModule' => 'convert');
$lang->admin->dividerMenu = ',company,message,system,';
+3 -3
View File
@@ -482,7 +482,7 @@ class commonModel extends model
if(count($userVisions) < 2) return print("<div>{$lang->visionList[$currentVision]}</div>");
echo "<ul class='dropdown-menu pull-right'>";
echo "<li class='text-gray'>{$lang->switchTo}</li>";
echo "<li class='text-gray switchTo'>{$lang->switchTo}</li>";
foreach($userVisions as $vision)
{
echo ($currentVision == $vision ? '<li class="active">' : '<li>') . html::a(helper::createLink('my', 'ajaxSwitchVision', "vision=$vision"), $lang->visionList[$vision], '', "data-type='ajax'") . '</li>';
@@ -527,7 +527,7 @@ class commonModel extends model
/* Check whether the creation permission is available, and print create buttons. */
foreach($lang->createIcons as $objectType => $objectIcon)
{
if(!isset($config->proVersion) and $objectType == 'effort') continue;
if($config->edition == 'open' and $objectType == 'effort') continue;
if($config->systemMode == 'classic' and strpos('project|program', $objectType) !== false) continue;
if(!empty($_COOKIE['feedbackView']) and strpos('todo|effort', $objectType) === false) continue;
@@ -1780,7 +1780,7 @@ EOD;
* 当主状态改变并且未设置子状态的值时把子状态的值设置为默认值并记录日志。
* Change sub status when status is changed and sub status is not set, and record the changes.
*/
if(isset($config->bizVersion))
if($config->edition != 'open')
{
$oldID = zget($old, 'id', '');
$oldStatus = zget($old, 'status', '');
+1 -1
View File
@@ -5,7 +5,7 @@
padding:0 7px;
position: absolute;
right: -10px;
top: -5px;
top: -3px;
display: block;
width: 20px;
text-align: center;
+3 -3
View File
@@ -300,6 +300,7 @@ class convert extends control
}
else
{
$this->convert->deleteJiraFile();
$jiraFilePath = $this->app->getTmpRoot() . 'jirafile/';
if(!is_readable($jiraFilePath) or !is_writable($jiraFilePath))
{
@@ -454,9 +455,8 @@ class convert extends control
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
if(isset($result['finished']) and $result['finished'])
{
$message = $method == 'db' ? $this->lang->convert->jira->importSuccessfully : $this->lang->convert->jira->importSuccessfully . sprintf($this->lang->convert->jira->removeFile, $this->app->getTmpRoot() . 'jirafile/');
return print $this->send(array('result' => 'finished', 'message' => $message));
}
return print $this->send(array('result' => 'finished', 'message' => $this->lang->convert->jira->importSuccessfully));
}
else
{
$type = zget($this->lang->convert->jira->objectList, $result['type'], $result['type']);
-1
View File
@@ -156,7 +156,6 @@ $lang->convert->jira->importResult = "Import <strong class='text-red'>%s</
$lang->convert->jira->importing = 'Data is being imported, please do not switch to other pages.';
$lang->convert->jira->importingAB = 'Data Import';
$lang->convert->jira->imported = 'Data Import Complete';
$lang->convert->jira->removeFile = "Please remove <strong class='text-red'>%s</strong>";
$lang->convert->jira->zentaoObjectList[''] = '';
$lang->convert->jira->zentaoObjectList['task'] = 'Task';
-1
View File
@@ -156,7 +156,6 @@ $lang->convert->jira->importResult = "导入 <strong class='text-red'>%s</
$lang->convert->jira->importing = '数据导入中,请不要切换其它页面';
$lang->convert->jira->importingAB = '数据导入中';
$lang->convert->jira->imported = '数据导入完成';
$lang->convert->jira->removeFile = "请手动清空 <strong class='text-red'>%s</strong> 下的文件";
$lang->convert->jira->zentaoObjectList[''] = '';
$lang->convert->jira->zentaoObjectList['task'] = '任务';
+21 -2
View File
@@ -478,7 +478,7 @@ class convertModel extends model
}
}
$this->afterExec();
$this->afterExec('file');
return array('finished' => true);
}
@@ -1446,10 +1446,11 @@ EOT;
/**
* After exec.
*
* @param string $method
* @access public
* @return void
*/
public function afterExec()
public function afterExec($method = 'db')
{
/* Set project min start date. */
$minDate = date('Y-m-d', time() - 30 * 24 * 3600);
@@ -1463,7 +1464,25 @@ EOT;
$minOpenedDate = helper::isZeroDate($minOpenedDate) ? $minDate : $minOpenedDate;
$this->dao->update(TABLE_PROJECT)->set('begin')->eq($minOpenedDate)->where('id')->eq($projectID)->orWhere('id')->eq($executionID)->exec();
}
if($method == 'file') $this->deleteJiraFile();
$this->dbh->exec("DROP TABLE" . JIRA_TMPRELATION);
}
/**
* Delete jira backip file.
*
* @access public
* @return void
*/
public function deleteJiraFile()
{
$fileList = array('action', 'project', 'status', 'resolution', 'user', 'issue', 'changegroup', 'changeitem', 'issuelink', 'issuelinktype', 'fileattachment', 'version', 'issuetype', 'nodeassociation', 'applicationuser');
foreach($fileList as $fileName)
{
$filePath = $this->app->getTmpRoot() . 'jirafile/' . $fileName . '.xml';
if(file_exists($filePath)) @unlink($filePath);
}
}
}
+1 -1
View File
@@ -528,7 +528,7 @@ class custom extends control
{
$this->custom->setConcept();
$this->loadModel('setting')->setItem('system.custom.URAndSR', $this->post->URAndSR);
if(!isset($this->config->maxVersion)) $this->loadModel('setting')->setItem('system.custom.hourPoint', $this->post->hourPoint);
if($this->config->edition != 'max') $this->loadModel('setting')->setItem('system.custom.hourPoint', $this->post->hourPoint);
$this->app->loadLang('common');
$locate = $this->config->systemMode == 'new' ? inlink('flow') : 'top';
+1 -1
View File
@@ -34,7 +34,7 @@
<label><?php echo $lang->custom->conceptQuestions['URAndSR']?></label>
<div class="checkbox"> <?php echo html::radio('URAndSR', $lang->custom->conceptOptions->URAndSR, zget($this->config->custom, 'URAndSR', '0'));?></div>
</div>
<?php if(!isset($config->maxVersion)):?>
<?php if($this->config->edition != 'max'):?>
<div class="form-group">
<label id='storypoint'><?php echo $lang->custom->conceptQuestions['storypoint'];?></label>
<div class="checkbox"> <?php echo html::radio('hourPoint', $lang->custom->conceptOptions->hourPoint, zget($this->config->custom, 'hourPoint'))?> </div>
+1 -1
View File
@@ -36,7 +36,7 @@ class datatableModel extends model
$this->config->$module->datatable->fieldList[$field]['title'] = $title;
}
if(isset($this->config->bizVersion))
if($this->config->edition != 'open')
{
$fields = $this->loadModel('workflowfield')->getList($module);
foreach($fields as $field)
+1 -1
View File
@@ -78,7 +78,7 @@ class design extends control
/* Print top and right actions. */
$this->lang->TRActions = '<div class="btn-toolbar pull-right">';
if(isset($this->config->maxVersion) and common::hasPriv('design', 'submit'))
if($this->config->edition == 'max' and common::hasPriv('design', 'submit'))
{
$this->lang->TRActions .= '<div class="btn-group">';
$this->lang->TRActions .= html::a($this->createLink('design', 'submit', "productID=$productID", '', true), "<i class='icon-plus'></i> {$this->lang->design->submit}", '', "class='btn btn-secondary iframe'");
+1 -1
View File
@@ -182,7 +182,7 @@ $lang->doc->noDoc = 'Keine Dokumente. ';
$lang->doc->noArticle = 'No articles.';
$lang->doc->noLib = 'No libraries. ';
$lang->doc->noBook = 'The WIKI library has not created a manual, please create a new one :)';
$lang->doc->cannotCreateOffice = 'Sorry, %s can only be created in ZenTao Enterprise. Contact us at renee@easysoft.ltd to try ZenTao Enterprise.';
$lang->doc->cannotCreateOffice = 'Sorry, %s file can only be created in ZenTao Biz Series or above. Contact Philip@easysoft.ltd to know more about ZenTao Biz Series and ZenTao Max Series.';
$lang->doc->notSetOffice = "<p>To create a %s document, you need to configure <a href='%s' target='_parent'>office convert</a>.<p>";
$lang->doc->noSearchedDoc = 'Nichts gesucht.';
$lang->doc->noEditedDoc = 'Sie haben kein Dokument bearbeitet.';
+1 -1
View File
@@ -193,7 +193,7 @@ $lang->doc->noDoc = 'No documents. ';
$lang->doc->noArticle = 'No articles.';
$lang->doc->noLib = 'No libraries. ';
$lang->doc->noBook = 'The WIKI library has not created a manual, please create a new one :)';
$lang->doc->cannotCreateOffice = 'Sorry, %s can only be created in ZenTao Enterprise. Contact us at renee@easysoft.ltd to try ZenTao Enterprise.';
$lang->doc->cannotCreateOffice = 'Sorry, %s file can only be created in ZenTao Biz Series or above. Contact Philip@easysoft.ltd to know more about ZenTao Biz Series and ZenTao Max Series.';
$lang->doc->notSetOffice = "<p>To create a %s document, you need to configure <a href='%s'>office convert</a>.<p>";
$lang->doc->noSearchedDoc = 'No documents found.';
$lang->doc->noEditedDoc = 'You have not edited any documents.';
+1 -1
View File
@@ -182,7 +182,7 @@ $lang->doc->noDoc = 'Aucun documents. ';
$lang->doc->noArticle = 'No articles.';
$lang->doc->noLib = 'No libraries. ';
$lang->doc->noBook = 'The WIKI library has not created a manual, please create a new one :)';
$lang->doc->cannotCreateOffice = 'Désolé, %s peut seulement être créé dans ZenTao Enterprise. Contactez Zentao à renee@easysoft.ltd pour essayer ZenTao Enterprise.';
$lang->doc->cannotCreateOffice = 'Désolé, %s peut seulement être créé dans Série ZenTao Biz ou plus. Coordonnées Philip@easysoft.ltd En savoir plus sur les séries zentao biz et zentao Max.';
$lang->doc->notSetOffice = "<p>To create a %s document, you need to configure <a href='%s' target='_parent'>office convert</a>.<p>";
$lang->doc->noSearchedDoc = 'Aucun documents trouvé.';
$lang->doc->noEditedDoc = "Vous n'avez pas mis à jour de documents.";
+1 -1
View File
@@ -182,7 +182,7 @@ $lang->doc->noDoc = 'Không có documents. ';
$lang->doc->noArticle = 'No articles.';
$lang->doc->noLib = 'No libraries. ';
$lang->doc->noBook = 'The WIKI library has not created a manual, please create a new one :)';
$lang->doc->cannotCreateOffice = 'Sorry, %s can only be created in ZenTao Enterprise. Contact us at renee@easysoft.ltd to try ZenTao Enterprise.';
$lang->doc->cannotCreateOffice = 'Sorry, %s file can only be created in ZenTao Biz Series or above. Contact Philip@easysoft.ltd to know more about ZenTao Biz Series and ZenTao Max Series.';
$lang->doc->notSetOffice = "<p>To create a %s document, you need to configure <a href='%s' target='_parent'>office convert</a>.<p>";
$lang->doc->noSearchedDoc = 'Không có documents found.';
$lang->doc->noEditedDoc = 'Bạn có not edited any documents.';
+9 -6
View File
@@ -516,12 +516,15 @@ class docModel extends model
/* When file change then version add one. */
$files = $this->loadModel('file')->getByObject('doc', $docID);
$docFiles = array();
foreach($files as $file)
if($docContent)
{
$pathName = $this->file->getRealPathName($file->pathname);
$file->webPath = $this->file->webPath . $pathName;
$file->realPath = $this->file->savePath . $pathName;
if(strpos(",{$docContent->files},", ",{$file->id},") !== false) $docFiles[$file->id] = $file;
foreach($files as $file)
{
$pathName = $this->file->getRealPathName($file->pathname);
$file->webPath = $this->file->webPath . $pathName;
$file->realPath = $this->file->savePath . $pathName;
if(strpos(",{$docContent->files},", ",{$file->id},") !== false) $docFiles[$file->id] = $file;
}
}
/* Check file change. */
@@ -1507,7 +1510,7 @@ class docModel extends model
}
elseif($type == 'project')
{
if(isset($this->config->maxVersion))
if($this->config->edition == 'max')
{
$issueIdList = $this->dao->select('id')->from(TABLE_ISSUE)->where('project')->eq($objectID)->andWhere('deleted')->eq('0')->andWhere('project')->in($this->app->user->view->projects)->get();
$meetingIdList = $this->dao->select('id')->from(TABLE_MEETING)->where('project')->eq($objectID)->andWhere('deleted')->eq('0')->andWhere('project')->in($this->app->user->view->projects)->get();
+2 -2
View File
@@ -41,7 +41,7 @@ $sessionString .= session_name() . '=' . session_id();
<a data-url="<?php echo $this->createLink('doc', 'collect', "objectID=$doc->id&objectType=doc");?>" title="<?php echo $lang->doc->collect;?>" class='ajaxCollect btn btn-link'><i class='icon <?php echo $star;?>'></i></a>
<?php endif;?>
<?php if(isset($this->config->maxVersion) and $this->app->tab == 'project'):?>
<?php if($this->config->edition == 'max' and $this->app->tab == 'project'):?>
<?php
$canImportToPracticeLib = common::hasPriv('doc', 'importToPracticeLib');
$canImportToComponentLib = common::hasPriv('doc', 'importToComponentLib');
@@ -199,7 +199,7 @@ $sessionString .= session_name() . '=' . session_id();
</div>
</div>
<?php if(isset($this->config->maxVersion)):?>
<?php if($this->config->edition == 'max'):?>
<div class="modal fade" id="importToPracticeLib">
<div class="modal-dialog mw-500px">
<div class="modal-content">
+1 -1
View File
@@ -17,7 +17,7 @@
<div class='main-header'>
<h2><?php echo $lang->doc->create;?></h2>
</div>
<?php if(isset($this->config->bizVersion)):?>
<?php if($this->config->edition != 'open'):?>
<div class='alert alert-warning strong'>
<?php printf($lang->doc->notSetOffice, zget($lang->doc->typeList, $docType), common::hasPriv('custom', 'libreoffice') ? $this->createLink('custom', 'libreoffice') : '###');?>
</div>
-1
View File
@@ -27,7 +27,6 @@ $lang->entry->editedDate = 'EditedDate';
$lang->entry->date = 'Requesting Time';
$lang->entry->url = 'Requesting URL';
$lang->entry->calledTime = 'Called Time';
$lang->entry->editedBy = 'Edited By';
$lang->entry->deleted = 'Deleted';
$lang->entry->confirmDelete = 'Do you want to delete this entry?';
-1
View File
@@ -27,7 +27,6 @@ $lang->entry->editedDate = '编辑时间';
$lang->entry->date = '请求时间';
$lang->entry->url = '请求地址';
$lang->entry->calledTime = '调用时间';
$lang->entry->editedBy = '由谁编辑';
$lang->entry->deleted = '已删除';
$lang->entry->confirmDelete = '您确认要删除该应用吗?';
-1
View File
@@ -27,7 +27,6 @@ $lang->entry->editedDate = '編輯時間';
$lang->entry->date = '請求時間';
$lang->entry->url = '請求地址';
$lang->entry->calledTime = '調用時間';
$lang->entry->editedBy = '由誰編輯';
$lang->entry->deleted = '已刪除';
$lang->entry->confirmDelete = '您確認要刪除該應用嗎?';
+28 -14
View File
@@ -519,16 +519,9 @@ class execution extends control
if(isonlybody())
{
$kanbanData = $this->loadModel('kanban')->getRDKanban($executionID, $this->session->execLaneType ? $this->session->execLaneType : 'all');
$kanbanData = json_encode($kanbanData);
return print(js::reload('parent'));
}
return print(js::reload('parent', '', "parent.parent.updateKanban($kanbanData)"));
// return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData)"));
}
else
{
return print(js::reload('parent.parent'));
}
if(isonlybody()) return print(js::reload('parent.parent'));
return print(js::locate($this->createLink('execution', 'importBug', "executionID=$executionID"), 'parent'));
}
@@ -841,6 +834,7 @@ class execution extends control
$this->view->orderBy = $orderBy;
$this->view->type = $this->session->executionStoryBrowseType;
$this->view->param = $param;
$this->view->isAllProduct = ($this->cookie->storyProductParam or $this->cookie->storyModuleParam or $this->cookie->storyBranchParam) ? false : true;
$this->view->moduleTree = $this->loadModel('tree')->getProjectStoryTreeMenu($executionID, 0, array('treeModel', 'createStoryLink'));
$this->view->modulePairs = $modulePairs;
$this->view->tabID = 'story';
@@ -2053,17 +2047,23 @@ class execution extends control
$userList[$account]['realname'] = $users[$account];
$userList[$account]['avatar'] = $avatar;
}
$userList['closed']['account'] = 'Closed';
$userList['closed']['realname'] = 'Closed';
$userList['closed']['avatar'] = '';
/* Get execution's product. */
$productID = 0;
$branchID = 0;
$products = $this->loadModel('product')->getProducts($executionID);
$productNames = array();
if($products)
{
$productID = key($products);
$branches = $this->loadModel('branch')->getPairs($productID, '', $executionID);
if($branches) $branchID = key($branches);
}
foreach($products as $product) $productNames[$product->id] = $product->name;
$plans = $this->execution->getPlans($products, 'skipParent', $executionID);
$allPlans = array('' => '');
@@ -2076,11 +2076,14 @@ class execution extends control
$this->view->users = $users;
$this->view->regions = $kanbanData;
$this->view->execution = $execution;
$this->view->executionID = $executionID;
$this->view->userList = $userList;
$this->view->browseType = $browseType;
$this->view->orderBy = $orderBy;
$this->view->groupBy = $groupBy;
$this->view->productID = $productID;
$this->view->productNames = $productNames;
$this->view->productNum = count($products);
$this->view->branchID = $branchID;
$this->view->projectID = $this->loadModel('task')->getProjectID($execution->id);
$this->view->allProducts = $this->product->getProductPairsByProject($this->view->projectID, 'noclosed');
@@ -2134,9 +2137,11 @@ class execution extends control
$canBeChanged = common::canModify('execution', $execution);
/* Get execution's product. */
$productID = 0;
$products = $this->loadModel('product')->getProducts($executionID);
$productID = 0;
$productNames = array();
$products = $this->loadModel('product')->getProducts($executionID);
if($products) $productID = key($products);
foreach($products as $product) $productNames[$product->id] = $product->name;
$plans = $this->execution->getPlans($products);
$allPlans = array('' => '');
@@ -2158,6 +2163,8 @@ class execution extends control
$this->view->orderBy = 'id_asc';
$this->view->executionID = $executionID;
$this->view->productID = $productID;
$this->view->productNames = $productNames;
$this->view->productNum = count($products);
$this->view->allPlans = $allPlans;
$this->view->browseType = $browseType;
$this->view->kanbanGroup = $kanbanGroup;
@@ -2587,8 +2594,8 @@ class execution extends control
$this->view->unmodifiableProducts = $unmodifiableProducts;
$this->view->unmodifiableBranches = $unmodifiableBranches;
$this->view->linkedBranches = $linkedBranches;
$this->view->branchGroups = $this->execution->getBranchByProduct(array_keys($allProducts), $this->config->systemMode == 'new' ? $execution->project : 0);
$this->view->allBranches = $this->execution->getBranchByProduct(array_keys($allProducts), $this->config->systemMode == 'new' ? $execution->project : 0, 'all');
$this->view->branchGroups = $this->execution->getBranchByProduct(array_keys($allProducts), $this->config->systemMode == 'new' ? $execution->project : 0, 'ignoreNormal|noclosed');
$this->view->allBranches = $this->execution->getBranchByProduct(array_keys($allProducts), $this->config->systemMode == 'new' ? $execution->project : 0, 'ignoreNormal');
$this->display();
}
@@ -2803,6 +2810,13 @@ class execution extends control
{
if(isset($linkedStories[$story->id])) unset($allStories[$id]);
if($story->parent < 0) unset($allStories[$id]);
if(!isset($modules[$story->module]))
{
$storyModule = $this->tree->getModulesName($story->module);
$productName = count($products) > 1 ? $products[$story->product]->name : '';
$modules[$story->module] = $productName . $storyModule[$story->module];
}
}
/* Pager. */
@@ -3379,7 +3393,7 @@ class execution extends control
if(strpos(",$checkedItem,", ",{$execution->id},") === false) unset($executionStats[$i]);
}
}
if(isset($this->config->bizVersion)) list($fields, $executionStats) = $this->loadModel('workflowfield')->appendDataFromFlow($fields, $executionStats);
if($this->config->edition != 'open') list($fields, $executionStats) = $this->loadModel('workflowfield')->appendDataFromFlow($fields, $executionStats);
$this->post->set('fields', $fields);
$this->post->set('rows', $executionStats);
+14
View File
@@ -1,4 +1,18 @@
$(function()
{
$(".preview").modalTrigger({width:1000, type:'iframe'});
$('#' + browseType + 'Tab').addClass('active');
if(isonlybody == true) parent.$('#triggerModal .modal-content .modal-header .close').hide();
});
/**
* Go back.
*
* @access public
* @return void
*/
function goback()
{
parent.location.reload();
}
+15 -1
View File
@@ -280,7 +280,11 @@ function createColumnCreateMenu(options)
else if(col.type == 'unconfirmed')
{
if(priv.canCreateBug) items.push({label: bugLang.create, url: $.createLink('bug', 'create', 'productID=0&moduleID=0&extra=laneID=' + laneID + ',columnID=' + col.id + ',executionID=' + executionID, '', true), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
if(priv.canBatchCreateBug) items.push({label: bugLang.batchCreate, url: $.createLink('bug', 'batchcreate', 'productID=' + productID + '&branch=&executionID=' + executionID + '&module=0&extra=laneID=' + laneID + ',columnID=' + col.id, '', true), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '90%'}});
if(priv.canBatchCreateBug)
{
if(productNum > 1) items.push({label: bugLang.batchCreate, url: '#batchCreateBug', 'attrs' : {'data-toggle': 'modal'}});
else items.push({label: bugLang.batchCreate, url: $.createLink('bug', 'batchcreate', 'productID=' + productID + '&branch=&executionID=' + executionID + '&module=0&extra=&laneID=' + laneID + '&columnID=' + col.id, '', true), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '90%'}});
}
}
else if(col.type == 'wait')
{
@@ -1246,6 +1250,16 @@ $(function()
}
});
$('#product').change(function()
{
var product = $('#product').val();
if(product)
{
var link = createLink('bug', 'batchCreate', 'productID=' + product + '&branch=&executionID=' + executionID, '', true);
$('#batchCreateBugButton').attr('href', link);
}
});
$(document).on('click', '#splitTable .btn-plus', function()
{
var tr = $(this).closest('tr');
+15 -1
View File
@@ -803,7 +803,11 @@ function createColumnCreateMenu(options)
else if(col.laneType == 'bug')
{
if(priv.canCreateBug) items.push({label: bugLang.create, url: $.createLink('bug', 'create', 'productID=0&moduleID=0&extra=executionID=' + executionID, '', true), className: 'iframe', attrs: {'data-width': '80%'}});
if(priv.canBatchCreateBug) items.push({label: bugLang.batchCreate, url: $.createLink('bug', 'batchcreate', 'productID=' + productID + '&moduleID=0&executionID=' + executionID, '', true), className: 'iframe', attrs: {'data-width': '90%'}});
if(priv.canBatchCreateBug)
{
if(productNum > 1) items.push({label: bugLang.batchCreate, url: '#batchCreateBug', 'attrs' : {'data-toggle': 'modal'}});
else items.push({label: bugLang.batchCreate, url: $.createLink('bug', 'batchcreate', 'productID=' + productID + '&moduleID=0&executionID=' + executionID, '', true), className: 'iframe', attrs: {'data-width': '90%'}});
}
}
else
{
@@ -1074,6 +1078,16 @@ $(function()
}
});
$('#product').change(function()
{
var product = $('#product').val();
if(product)
{
var link = createLink('bug', 'batchCreate', 'productID=' + product + '&branch=&executionID=' + executionID, '', true);
$('#batchCreateBugButton').attr('href', link);
}
});
$('#type_chosen .chosen-single span').prepend('<i class="icon-kanban"></i>');
$('#group_chosen .chosen-single span').prepend(kanbanLang.laneGroup + ': ');
+2 -2
View File
@@ -333,7 +333,7 @@ class executionModel extends model
if(!empty($sprint->percent)) $this->checkWorkload('create', $sprint->percent);
/* Set planDuration and realDuration. */
if(isset($this->config->maxVersion))
if($this->config->edition == 'max')
{
$sprint->planDuration = $this->loadModel('programplan')->getDuration($sprint->begin, $sprint->end);
if(!empty($sprint->realBegan) and !empty($sprint->realEnd)) $sprint->realDuration = $this->loadModel('programplan')->getDuration($sprint->realBegan, $sprint->realEnd);
@@ -484,7 +484,7 @@ class executionModel extends model
if(!empty($execution->percent)) $this->checkWorkload('update', $execution->percent, $oldExecution);
/* Set planDuration and realDuration. */
if(isset($this->config->maxVersion))
if($this->config->edition == 'max')
{
$execution->planDuration = $this->loadModel('programplan')->getDuration($execution->begin, $execution->end);
if(!empty($execution->realBegan) and !empty($execution->realEnd)) $execution->realDuration = $this->programplan->getDuration($execution->realBegan, $execution->realEnd);
+5 -1
View File
@@ -93,6 +93,8 @@
<th class='c-realEnd'><?php common::printOrderLink('realEnd', $orderBy, $vars, $lang->execution->realEnd);?></th>
<th class='c-action'><?php echo $lang->actions;?></th>
<?php else:;?>
<th class='c-begin'><?php common::printOrderLink('begin', $orderBy, $vars, $lang->execution->begin);?></th>
<th class='c-end'><?php common::printOrderLink('end', $orderBy, $vars, $lang->execution->end);?></th>
<th class='c-estimate text-right hours'><?php echo $lang->execution->totalEstimate;?></th>
<th class='c-consumed text-right hours'><?php echo $lang->execution->totalConsumed;?></th>
<th class='c-left text-right hours'><?php echo $lang->execution->totalLeft;?></th>
@@ -120,7 +122,7 @@
<?php printf('%03d', $execution->id);?>
</td>
<td class='text-left c-name <?php if(!empty($execution->children)) echo 'has-child';?> flex' title='<?php echo $execution->name?>'>
<?php if($config->systemMode == 'new'):?>
<?php if($config->systemMode == 'new'):?>
<span class='project-type-label label label-outline <?php echo $execution->type == 'stage' ? 'label-warning' : 'label-info';?>'><?php echo $lang->execution->typeList[$execution->type]?></span>
<?php endif;?>
<?php
@@ -177,6 +179,8 @@
}
?></td>
<?php else:?>
<td><?php echo helper::isZeroDate($execution->begin) ? '' : $execution->begin;?></td>
<td><?php echo helper::isZeroDate($execution->end) ? '' : $execution->end;?></td>
<td class='hours' title='<?php echo $execution->hours->totalEstimate . ' ' . $this->lang->execution->workHour;?>'><?php echo $execution->hours->totalEstimate . $this->lang->execution->workHourUnit;?></td>
<td class='hours' title='<?php echo $execution->hours->totalConsumed . ' ' . $this->lang->execution->workHour;?>'><?php echo $execution->hours->totalConsumed . $this->lang->execution->workHourUnit;?></td>
<td class='hours' title='<?php echo $execution->hours->totalLeft . ' ' . $this->lang->execution->workHour;?>'><?php echo $execution->hours->totalLeft . $this->lang->execution->workHourUnit;?></td>
+1 -1
View File
@@ -79,7 +79,7 @@
<?php endif;?>
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
</th>
<th class='c-severity'><?php common::printOrderLink('severity', $orderBy, $vars, $lang->bug->severityAB);?></th>
<th class='c-severity' title=<?php echo $lang->bug->severity;?>><?php common::printOrderLink('severity', $orderBy, $vars, $lang->bug->severityAB);?></th>
<th class='c-pri' title=<?php echo $lang->execution->pri;?>><?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th><?php common::printOrderLink('title', $orderBy, $vars, $lang->bug->title);?></th>
<th class='c-user'><?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
+3 -12
View File
@@ -13,10 +13,8 @@
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/datepicker.html.php';?>
<?php include '../../common/view/tablesorter.html.php';?>
<script>
$(function(){$(".preview").modalTrigger({width:1000, type:'iframe'});});
var browseType = '<?php echo $browseType;?>';
</script>
<?php js::set('browseType', $browseType);?>
<?php js::set('isonlybody', isonlybody());?>
<style>#importBugForm .bug-pri {overflow: visible;}</style>
<div id='mainMenu' class='clearfix'>
<div class='btn-toolbar pull-left'>
@@ -37,7 +35,7 @@ var browseType = '<?php echo $browseType;?>';
</div>
<?php echo $lang->idAB;?>
</th>
<th class='c-severity'> <?php echo $lang->bug->severityAB;?></th>
<th class='c-severity' title=<?php echo $lang->bug->severity;?>> <?php echo $lang->bug->severityAB;?></th>
<th class='c-pri' title=<?php echo $lang->execution->pri;?>><?php echo $lang->priAB;?></th>
<th><?php echo $lang->bug->title;?></th>
<th class='c-status'><?php echo $lang->bug->statusAB;?></th>
@@ -86,11 +84,4 @@ var browseType = '<?php echo $browseType;?>';
</div>
</form>
</div>
<script>
$(function(){parent.$('#triggerModal .modal-content .modal-header .close').hide();})
function goback()
{
parent.location.reload();
}
</script>
<?php include '../../common/view/footer.html.php';?>
+25 -2
View File
@@ -43,6 +43,7 @@ js::set('noAssigned', $lang->kanbancard->noAssigned);
js::set('users', $users);
js::set('entertime', time());
js::set('displayCards', $execution->displayCards);
js::set('productNum', $productNum);
js::set('fluidBoard', $execution->fluidBoard);
js::set('colorListLang', $lang->kanbancard->colorList);
js::set('colorList', $this->config->kanban->cardColorList);
@@ -182,10 +183,16 @@ js::set('hasTaskButton', $hasTaskButton);
<?php if($canLinkStoryByPlan) echo '<li>' . html::a('#linkStoryByPlan', $lang->execution->linkStoryByPlan, '', 'data-toggle="modal"') . '</li>';?>
<?php if($hasStoryButton and $hasBugButton) echo '<li class="divider"></li>';?>
<?php if($canCreateBug) echo '<li>' . html::a(helper::createLink('bug', 'create', "productID=$productID&branch=0&extra=executionID=$execution->id", '', true), $lang->bug->create, '', "class='iframe'") . '</li>';?>
<?php if($canBatchCreateBug) echo '<li>' . html::a(helper::createLink('bug', 'batchCreate', "productID=$productID&branch=$branchID&executionID=$execution->id", '', true), $lang->bug->batchCreate, '', "class='iframe'") . '</li>';?>
<?php if($canBatchCreateBug)
{
$batchCreateBugLink = '<li>' . html::a(helper::createLink('bug', 'batchCreate', "productID=$productID&branch=$branchID&executionID=$execution->id", '', true), $lang->bug->batchCreate, '', "class='iframe'") . '</li>';
if($productNum > 1) $batchCreateBugLink = '<li>' . html::a('#batchCreateBug', $lang->bug->batchCreate, '', "data-toggle='modal'") . '</li>';
echo $batchCreateBugLink;
}?>
<?php if(($hasStoryButton or $hasBugButton) and $hasTaskButton) echo '<li class="divider"></li>';?>
<?php if($canCreateTask) echo '<li>' . html::a(helper::createLink('task', 'create', "execution=$execution->id", '', true), $lang->task->create, '', "class='iframe'") . '</li>';?>
<?php if($canImportBug) echo '<li>' . html::a(helper::createLink('execution', 'importBug', "executionID=$execution->id", '', true), $lang->execution->importBug, '', "class='ifram'") . '</li>';?>
<?php if($canImportBug) echo '<li>' . html::a(helper::createLink('execution', 'importBug', "executionID=$execution->id", '', true), $lang->execution->importBug, '', "class='iframe'") . '</li>';?>
<?php if($canBatchCreateTask) echo '<li>' . html::a(helper::createLink('task', 'batchCreate', "execution=$execution->id", '', true), $lang->execution->batchCreateTask, '', "class='iframe'") . '</li>';?>
</ul>
</div>
@@ -257,4 +264,20 @@ js::set('hasTaskButton', $hasTaskButton);
</div>
</div>
</div>
<div class="modal fade" id="batchCreateBug">
<div class="modal-dialog mw-500px">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="icon icon-close"></i></button>
<h4 class="modal-title"><?php echo $lang->bug->product;?></h4>
</div>
<div class="modal-body">
<div class='input-group'>
<?php echo html::select('productName', $productNames, '', "class='form-control chosen' id='product'");?>
<span class='input-group-btn'><?php echo html::a(helper::createLink('bug', 'batchCreate', 'productID=' . key($productNames) . '&branch=' . $branchID . '&executionID=' . $executionID, '', true), $lang->bug->batchCreate, '', "id='batchCreateBugButton' class='btn btn-primary iframe' data-dismiss='modal' data-width='90%'");?></span>
</div>
</div>
</div>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
+2 -2
View File
@@ -86,7 +86,7 @@
if($common::hasPriv('story', 'create') and common::hasPriv('story', 'batchCreate'))
{
if($param != 0 || count($products) == 1) echo "<button type='button' class='btn btn-secondary dropdown-toggle' data-toggle='dropdown'><span class='caret'></span></button>";
if(!($isAllProduct and count($products) > 1)) echo "<button type='button' class='btn btn-secondary dropdown-toggle' data-toggle='dropdown'><span class='caret'></span></button>";
echo "<ul class='dropdown-menu pull-right'>";
echo '<li>' . html::a($createStoryLink, $lang->story->create, '', "data-app='execution'") . '</li>';
echo '<li>' . html::a($batchCreateLink, $lang->story->batchCreate, '', "data-app='execution'") . '</li>';
@@ -284,7 +284,7 @@
if(common::hasPriv('story', 'recall'))
{
$recallDisabled = empty($story->reviewedBy) and strpos('draft,changed', $story->status) !== false and !empty($story->reviewer) ? '' : 'disabled';
common::printIcon('story', 'recall', "story={$story->id}", $story, 'list', 'back', 'hiddenwin', $recallDisabled, '', '', $lang->story->recall);
common::printIcon('story', 'recall', "story={$story->id}", $story, 'list', 'undo', 'hiddenwin', $recallDisabled, '', '', $lang->story->recall);
}
$lang->task->create = $lang->execution->wbs;
+24 -1
View File
@@ -96,7 +96,12 @@
<?php if($canLinkStoryByPlan) echo '<li>' . html::a('#linkStoryByPlan', $lang->execution->linkStoryByPlan, '', 'data-toggle="modal"') . '</li>';?>
<?php if($hasStoryButton and $hasBugButton) echo '<li class="divider"></li>';?>
<?php if($canCreateBug) echo '<li>' . html::a(helper::createLink('bug', 'create', "productID=$productID&branch=0&extra=executionID=$execution->id", '', true), $lang->bug->create, '', "class='iframe'") . '</li>';?>
<?php if($canBatchCreateBug) echo '<li>' . html::a(helper::createLink('bug', 'batchCreate', "productID=$productID&branch=0&executionID=$execution->id", '', true), $lang->bug->batchCreate, '', "class='iframe'") . '</li>';?>
<?php if($canBatchCreateBug)
{
$batchCreateBugLink = '<li>' . html::a(helper::createLink('bug', 'batchCreate', "productID=$productID&branch=0&executionID=$execution->id", '', true), $lang->bug->batchCreate, '', "class='iframe'") . '</li>';
if($productNum > 1) $batchCreateBugLink = '<li>' . html::a('#batchCreateBug', $lang->bug->batchCreate, '', "data-toggle='modal'") . '</li>';
echo $batchCreateBugLink;
}?>
<?php if(($hasStoryButton or $hasBugButton) and $hasTaskButton) echo '<li class="divider"></li>';?>
<?php if($canCreateTask) echo '<li>' . html::a(helper::createLink('task', 'create', "execution=$execution->id", '', true), $lang->task->create, '', "class='iframe'") . '</li>';?>
<?php if($canBatchCreateTask) echo '<li>' . html::a(helper::createLink('task', 'batchCreate', "execution=$execution->id", '', true), $lang->execution->batchCreateTask, '', "class='iframe'") . '</li>';?>
@@ -132,12 +137,30 @@
</div>
</div>
</div>
<div class="modal fade" id="batchCreateBug">
<div class="modal-dialog mw-500px">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="icon icon-close"></i></button>
<h4 class="modal-title"><?php echo $lang->bug->product;?></h4>
</div>
<div class="modal-body">
<div class='input-group'>
<?php echo html::select('productName', $productNames, '', "class='form-control chosen' id='product'");?>
<span class='input-group-btn'><?php echo html::a(helper::createLink('bug', 'batchCreate', 'productID=' . key($productNames) . '&branch=&executionID=' . $executionID, '', true), $lang->bug->batchCreate, '', "id='batchCreateBugButton' class='btn btn-primary iframe' data-dismiss='modal' data-width='90%'");?></span>
</div>
</div>
</div>
</div>
</div>
<?php js::set('executionID', $executionID);?>
<?php js::set('productID', $productID);?>
<?php js::set('kanbanGroup', $kanbanGroup);?>
<?php js::set('kanbanList', array_keys($kanbanGroup));?>
<?php js::set('browseType', $browseType);?>
<?php js::set('groupBy', $groupBy);?>
<?php js::set('productNum', $productNum);?>
<?php
js::set('priv',
array(
+1 -1
View File
@@ -340,7 +340,7 @@ class file extends control
*/
public function ajaxPasteImg($uid = '')
{
if($_POST) return print($this->file->pasteImage($this->post->editor, $uid));
if($_POST) return print($this->file->pasteImage($this->post->editor, $uid, $safe = true));
}
/**
+20 -6
View File
@@ -80,6 +80,17 @@ class fileModel extends model
{
$file = $this->dao->findById($fileID)->from(TABLE_FILE)->fetch();
if(empty($file)) return false;
if($file->objectType != 'traincourse' and $file->objectType != 'traincontents')
{
$realPathName = $this->getRealPathName($file->pathname);
$file->realPath = $this->savePath . $realPathName;
$file->webPath = $this->webPath . $realPathName;
}
else
{
$file->realPath = $this->app->getWwwRoot() . 'data/course/' . $file->pathname;
$file->webPath = $this->app->getWebRoot() . 'data/course/' . $file->pathname;
}
if($file->objectType != 'traincourse' and $file->objectType != 'traincontents')
{
@@ -92,6 +103,7 @@ class fileModel extends model
$file->realPath = $this->app->getWwwRoot() . 'data/course/' . $file->pathname;
$file->webPath = 'data/course/' . $file->pathname;
}
return $file;
}
@@ -537,10 +549,12 @@ class fileModel extends model
* Paste image in kindeditor at firefox and chrome.
*
* @param string $data
* @param string $uid
* @param bool $safe
* @access public
* @return string
*/
public function pasteImage($data, $uid = '')
public function pasteImage($data, $uid = '', $safe = false)
{
if(empty($data)) return '';
$data = str_replace('\"', '"', $data);
@@ -571,7 +585,7 @@ class fileModel extends model
$data = str_replace($out[1][$key], helper::createLink('file', 'read', "fileID=$fileID", $file['extension']), $data);
}
}
else
elseif($safe)
{
$data = fixer::stripDataTags(rawurldecode($data));
}
@@ -954,7 +968,7 @@ class fileModel extends model
setcookie('downloading', 1, 0, $this->config->webRoot, '', $this->config->cookieSecure, false);
/* Only download upload file that is in zentao. */
if($type == 'file' and stripos($content, $this->savePath) !== 0) return;
if($type == 'file' and stripos($content, $this->savePath) !== 0) helper::end();
/* Append the extension name auto. */
$extension = '.' . $fileType;
@@ -971,17 +985,17 @@ class fileModel extends model
header("Content-Disposition: attachment; filename=\"$fileName\"");
header("Pragma: no-cache");
header("Expires: 0");
if($type == 'content') return print($content);
if($type == 'content') helper::end($content);
if($type == 'file' and file_exists($content))
{
if(stripos($content, $this->app->getBasePath()) !== 0) return;
if(stripos($content, $this->app->getBasePath()) !== 0) helper::end();
set_time_limit(0);
$chunkSize = 10 * 1024 * 1024;
$handle = fopen($content, "r");
while(!feof($handle)) echo fread($handle, $chunkSize);
fclose($handle);
return;
helper::end();
}
}
+12 -7
View File
@@ -924,7 +924,7 @@ class gitlab extends control
}
/* Fix error when request type is PATH_INFO and the branch name contains '-'.*/
if($branch) $branch = str_replace('*', '-', $branch);
if($branch) $branch = urldecode(helper::safe64Decode($branch));
if($_POST)
{
@@ -935,7 +935,7 @@ class gitlab extends control
}
$branchPriv = new stdClass();
$branchPriv->name = '';
$branchPriv->name = '';
$branchPriv->mergeAccessLevel = 40; // Initialize data, and the operation authority is the maintainers by default.
$branchPriv->pushAccessLevel = 40; // Initialize data, and the operation authority is the maintainers by default.
@@ -945,6 +945,7 @@ class gitlab extends control
{
$title = $this->lang->gitlab->editBranchPriv;
$branchPriv = $this->gitlab->apiGetSingleBranchPriv($gitlabID, $projectID, $branch);
$branchPriv->name = helper::safe64Encode(urlencode($branchPriv->name));
$branchPriv->mergeAccessLevel = $this->gitlab->checkAccessLevel($branchPriv->merge_access_levels);
$branchPriv->pushAccessLevel = $this->gitlab->checkAccessLevel($branchPriv->push_access_levels);
}
@@ -956,7 +957,11 @@ class gitlab extends control
$branches = array();
foreach($gitlabBranches as $oneBranch)
{
if(!in_array($oneBranch->name, $protectNames) || $oneBranch->name == $branch) $branches[$oneBranch->name] = $oneBranch->name;
if(!in_array($oneBranch->name, $protectNames) || $oneBranch->name == $branch)
{
$branchName = helper::safe64Encode(urlencode($oneBranch->name));
$branches[$branchName] = $oneBranch->name;
}
}
$this->view->title = $this->lang->gitlab->common . $this->lang->colon . $title;
@@ -1011,7 +1016,7 @@ class gitlab extends control
}
/* Fix error when request type is PATH_INFO and the branch name contains '-'.*/
$branch = str_replace('*', '-', $branch);
$branch = urldecode(helper::safe64Decode($branch));
$reponse = $this->gitlab->apiDeleteBranchPriv($gitlabID, $projectID, $branch);
/* If the status code beginning with 20 is returned or empty is returned, it is successful. */
@@ -1223,7 +1228,7 @@ class gitlab extends control
}
/* Fix error when request type is PATH_INFO and the tag name contains '-'.*/
$tag = str_replace('*', '-', $tag);
$tag = urldecode(helper::safe64Decode($tag));
if($_POST)
{
@@ -1265,7 +1270,7 @@ class gitlab extends control
}
/* Fix error when request type is PATH_INFO and the tag name contains '-'.*/
$tag = str_replace('*', '-', $tag);
$tag = urldecode(helper::safe64Decode($tag));
$reponse = $this->gitlab->apiDeleteTagPriv($gitlabID, $projectID, $tag);
/* If the status code beginning with 20 is returned or empty is returned, it is successful. */
@@ -1677,7 +1682,7 @@ class gitlab extends control
if($confirm != 'yes') return print(js::confirm($this->lang->gitlab->tag->confirmDelete , inlink('deleteTag', "gitlabID=$gitlabID&projectID=$projectID&tagName=$tagName&confirm=yes")));
/* Fix error when request type is PATH_INFO and the tag name contains '-'.*/
$tagName = str_replace('*', '-', $tagName);
$tagName = urldecode(helper::safe64Decode($tagName));
$reponse = $this->gitlab->apiDeleteTag($gitlabID, $projectID, $tagName);
/* If the status code beginning with 20 is returned or empty is returned, it is successful. */
+8 -1
View File
@@ -685,15 +685,19 @@ class gitlabModel extends model
*
* @param int $gitlabID
* @param string $simple
* @param int $minID
* @param int $maxID
* @access public
* @return array
*/
public function apiGetProjects($gitlabID, $simple = 'true')
public function apiGetProjects($gitlabID, $simple = 'true', $minID = 0, $maxID = 0)
{
$apiRoot = $this->getApiRoot($gitlabID);
if(!$apiRoot) return array();
$url = sprintf($apiRoot, "/projects");
if($minID > 0) $url .= '&id_after=' . (intval($minID) - 1);
if($maxID > 0) $url .= '&id_before=' . (intval($maxID) + 1);
$allResults = array();
for($page = 1; true; $page++)
@@ -2573,6 +2577,7 @@ class gitlabModel extends model
return false;
}
$priv->name = urldecode(helper::safe64Decode($priv->name));
$singleBranch = $this->apiGetSingleBranchPriv($gitlabID, $projectID, $priv->name);
if(empty($branch) && !empty($singleBranch->id))
{
@@ -2607,6 +2612,7 @@ class gitlabModel extends model
if(empty($gitlabID)) return false;
if(empty($projectID)) return false;
if(empty($priv->name)) return false;
$priv->name = html_entity_decode($priv->name, ENT_QUOTES);
$url = sprintf($this->getApiRoot($gitlabID), "/projects/" . $projectID . '/protected_branches');
return json_decode(commonModel::http($url, $priv));
}
@@ -2623,6 +2629,7 @@ class gitlabModel extends model
public function apiDeleteBranchPriv($gitlabID, $projectID, $branch)
{
if(empty($gitlabID)) return false;
$branch = urlencode($branch);
$apiRoot = $this->getApiRoot($gitlabID);
$url = sprintf($apiRoot, "/projects/{$projectID}/protected_branches/{$branch}");
return json_decode(commonModel::http($url, array(), $options = array(CURLOPT_CUSTOMREQUEST => 'DELETE')));
+1 -1
View File
@@ -63,7 +63,7 @@
<td class='c-actions text-left'>
<?php
/* Fix error when request type is PATH_INFO and the branch name contains '-'.*/
$branchName = str_replace('-', '*', $branch->name);
$branchName = helper::safe64Encode(urlencode($branch->name));
if(common::hasPriv('gitlab', 'editBranchPriv')) common::printLink('gitlab', 'editBranchPriv', "gitlabID=$gitlabID&projectID=$projectID&branch=$branchName", "<i class='icon icon-edit'></i> ", '', "title={$lang->gitlab->editBranchPriv} class='btn btn-primary'");
if(common::hasPriv('gitlab', 'deleteBranchPriv')) echo html::a($this->createLink('gitlab', 'deleteBranchPriv', "gitlabID=$gitlabID&projectID=$projectID&branch=$branchName"), '<i class="icon-trash"></i>', 'hiddenwin', "title='{$lang->gitlab->deleteBranchPriv}' class='btn'");
?>
+1 -1
View File
@@ -68,7 +68,7 @@
<td class='c-actions text-left'>
<?php
/* Fix error when request type is PATH_INFO and the tag name contains '-'.*/
$tagName = str_replace('-', '*', $gitlabTag->name);
$tagName = helper::safe64Encode(urlencode($gitlabTag->name));
$isDisabled = $gitlabTag->protected ? 'disabled' : '';
common::printLink('gitlab', 'deleteTag', "gitlabID=$gitlabID&projectID={$projectID}&tag_name=$tagName", "<i class='icon icon-trash'></i> ", '', "title='{$lang->gitlab->deleteTag}' class='btn' target='hiddenwin' $isDisabled");
?>
+1 -1
View File
@@ -64,7 +64,7 @@
<td class='c-actions text-left'>
<?php
/* Fix error when request type is PATH_INFO and the tag name contains '-'.*/
$tagName = str_replace('-', '*', $gitlabTag->name);
$tagName = helper::safe64Encode(urlencode($gitlabTag->name));
common::printLink('gitlab', 'editTagPriv', "gitlabID=$gitlabID&projectID=$projectID&tag_name=$tagName", "<i class='icon icon-edit'></i> ", '', "title={$lang->gitlab->editTagPriv} class='btn btn-primary'");
common::printLink('gitlab', 'deleteTagPriv', "gitlabID=$gitlabID&projectID={$projectID}&tag_name=$tagName", "<i class='icon icon-trash'></i> ", '', "title='{$lang->gitlab->deleteTagPriv}' class='btn btn-primary' target='hiddenwin' onclick='if(confirm(\"{$lang->gitlab->tag->protectConfirmDel}\")==false) return false;'");
?>
+1 -1
View File
@@ -18,7 +18,7 @@
<h2><?php echo $pageTitle;?></h2>
</div>
<form id='branchForm' method='post' class='form-ajax' enctype="multipart/form-data">
<?php if($branch) echo html::hidden('name', $branch);?>
<?php if($branchPriv->name) echo html::hidden('name', $branchPriv->name);?>
<table class='table table-form'>
<tr>
<th><?php echo $lang->gitlab->branch->name;?></th>
+1 -1
View File
@@ -1 +1 @@
.thWidth {width: 180px !important;}
.thWidth {width: 250px !important;}
+1
View File
@@ -157,6 +157,7 @@ class groupModel extends model
->leftJoin(TABLE_GROUP)->alias('t2')
->on('t1.`group` = t2.id')
->where('t1.account')->eq($account)
->andWhere('t2.project')->eq(0)
->fetchAll('id');
}
+2 -1
View File
@@ -211,7 +211,8 @@ class install extends control
$this->loadModel('setting')->setItem('system.common.safe.mode', '1');
$this->loadModel('setting')->setItem('system.common.safe.changeWeak', '1');
$this->loadModel('setting')->setItem('system.common.global.cron', 1);
$this->loadModel('api')->createDemoData($this->lang->api->zentaoAPI, 'http://' . $_SERVER['HTTP_HOST'] . $this->app->config->webRoot . 'api.php/v1', '16.0');
if(strpos($this->app->getClientLang(), 'zh') === 0) $this->loadModel('api')->createDemoData($this->lang->api->zentaoAPI, 'http://' . $_SERVER['HTTP_HOST'] . $this->app->config->webRoot . 'api.php/v1', '16.0');
return print(js::locate(inlink('step6'), 'parent'));
}
+2 -2
View File
@@ -552,7 +552,7 @@ class installModel extends model
$this->dao->update(TABLE_STAGE)->set('name')->eq($value)->where('`type`')->eq($key)->exec();
}
if(!empty($this->config->bizVersion))
if($this->config->edition != 'open')
{
/* Update flowdatasource by lang. */
foreach($this->lang->install->workflowdatasource as $id => $name)
@@ -567,7 +567,7 @@ class installModel extends model
}
}
if(!empty($this->config->maxVersion))
if($this->config->edition == 'max')
{
/* Update process by lang. */
foreach($this->lang->install->processList as $id => $name)
+1 -1
View File
@@ -1691,7 +1691,7 @@ class kanban extends control
public function ajaxGetKanbanMenu($kanbanID, $moduleName, $methodName)
{
$kanbanIdList = $this->kanban->getCanViewObjects();
$spacePairs = $this->kanban->getSpacePairs('all');
$spacePairs = $this->kanban->getSpacePairs('showClosed');
$this->view->kanbanList = $this->dao->select('*')->from(TABLE_KANBAN)
->where('deleted')->eq('0')
+1 -1
View File
@@ -1635,7 +1635,7 @@ class kanbanModel extends model
->where('deleted')->eq(0)
->beginIF(in_array($browseType, array('private', 'cooperation', 'public')))->andWhere('type')->eq($browseType)->fi()
->beginIF($browseType == 'involved')->andWhere('owner')->ne($account)->fi()
->beginIF($this->cookie->showClosed == 0)->andWhere('status')->ne('closed')->fi()
->beginIF($this->cookie->showClosed == 0 and $browseType != 'showClosed')->andWhere('status')->ne('closed')->fi()
->beginIF(!$this->app->user->admin)->andWhere('id')->in($spaceIdList)->fi()
->orderBy('id_desc')
->fetchPairs('id');
+1 -1
View File
@@ -23,7 +23,7 @@
<tr>
<th class='w-110px'><?php echo $lang->kanban->columnName;?></th>
<td colspan='2'>
<?php echo html::input('name', $column->name, "class='form-control' disabled");?>
<?php echo html::input('name', $column->name, "class='form-control'");?>
</td>
<td></td>
</tr>
+1
View File
@@ -80,6 +80,7 @@ $lang->mr->statusList['merged'] = 'merged';
$lang->mr->statusList['closed'] = 'closed';
$lang->mr->mergeStatusList = array();
$lang->mr->mergeStatusList['unchecked'] = 'unchecked';
$lang->mr->mergeStatusList['checking'] = 'checking';
$lang->mr->mergeStatusList['can_be_merged'] = 'can be merged';
$lang->mr->mergeStatusList['cannot_be_merged'] = 'cannot be merged';
+1
View File
@@ -80,6 +80,7 @@ $lang->mr->statusList['merged'] = '已合并';
$lang->mr->statusList['closed'] = '已关闭';
$lang->mr->mergeStatusList = array();
$lang->mr->mergeStatusList['unchecked'] = '未检查';
$lang->mr->mergeStatusList['checking'] = '检查中';
$lang->mr->mergeStatusList['can_be_merged'] = '可合并';
$lang->mr->mergeStatusList['cannot_be_merged'] = '不可自动合并';
+15 -5
View File
@@ -112,7 +112,17 @@ class mrModel extends model
{
if(!$this->app->user->admin and !isset($gitlabUsers[$gitlabID])) continue;
$allProjects[$gitlabID] = $this->gitlab->apiGetProjects($gitlabID, 'false');
$minProject = $maxProject = 0;
$projectCount = $this->dao->select('min(sourceProject) as minSource,MAX(sourceProject) as maxSource,MIN(targetProject) as minTarget,MAX(targetProject) as maxTarget')->from(TABLE_MR)
->where('deleted')->eq('0')
->andWhere('gitlabID')->eq($gitlabID)
->fetch();
if($projectCount)
{
$minProject = min($projectCount->minSource, $projectCount->minTarget);
$maxProject = max($projectCount->maxSource, $projectCount->maxTarget);
}
$allProjects[$gitlabID] = $this->gitlab->apiGetProjects($gitlabID, 'false', $minProject, $maxProject);
/* If not an administrator, need to obtain group member information. */
$groupIDList = array(0 => 0);
@@ -1393,9 +1403,9 @@ class mrModel extends model
if($type == 'task') $links = $this->post->tasks;
/* Get link action text. */
$MR = $this->getByID($MRID);
$users = $this->loadModel('user')->getPairs('noletter');
$MRCreateAction = sprintf($this->lang->mr->createAction, $MR->createdDate, zget($users, $MR->createdBy), helper::createLink('mr', 'view', "mr={$MR->id}"));
$MR = $this->getByID($MRID);
$users = $this->loadModel('user')->getPairs('noletter');
$MRCreateAction = $MR->createdDate . '::' . zget($users, $MR->createdBy) . '::' . helper::createLink('mr', 'view', "mr={$MR->id}");
foreach($links as $linkID)
{
@@ -1429,7 +1439,7 @@ class mrModel extends model
{
$this->dao->delete()->from(TABLE_RELATION)->where('product')->eq($productID)->andWhere('AType')->eq('mr')->andWhere('AID')->eq($MRID)->andWhere('BType')->eq($type)->andWhere('BID')->eq($linkID)->exec();
$this->loadModel('action')->create($type, $linkID, 'deletemr');
$this->loadModel('action')->create($type, $linkID, 'deletemr', '', helper::createLink('mr', 'view', "mr={$MRID}"));
}
/**
+5 -5
View File
@@ -153,7 +153,7 @@ class my extends control
$reviewCount = 0;
$ncCount = 0;
$meetingCount = 0;
$isMax = isset($this->config->maxVersion) ? 1 : 0;
$isMax = $this->config->edition == 'max' ? 1 : 0;
if($isMax)
{
$this->loadModel('issue');
@@ -533,8 +533,8 @@ EOF;
/* Append id for secend sort. */
$sort = common::appendOrder($orderBy);
$this->view->title = $this->lang->my->common . $this->lang->colon . $this->lang->my->testTask;
$this->view->position[] = $this->lang->my->testTask;
$this->view->title = $this->lang->my->common . $this->lang->colon . $this->lang->my->myTestTask;
$this->view->position[] = $this->lang->my->myTestTask;
$this->view->tasks = $this->loadModel('testtask')->getByUser($this->app->user->account, $pager, $sort, $type);
$this->view->recTotal = $recTotal;
@@ -590,8 +590,8 @@ EOF;
$cases = $this->testcase->appendData($cases, $type == 'assigntome' ? 'run' : 'case');
/* Assign. */
$this->view->title = $this->lang->my->common . $this->lang->colon . $this->lang->my->testCase;
$this->view->position[] = $this->lang->my->testCase;
$this->view->title = $this->lang->my->common . $this->lang->colon . $this->lang->my->myTestCase;
$this->view->position[] = $this->lang->my->myTestCase;
$this->view->cases = $cases;
$this->view->users = $this->user->getPairs('noletter');
$this->view->tabID = 'test';
+2 -2
View File
@@ -10,8 +10,8 @@ $lang->my->work = '待处理';
$lang->my->contribute = '贡献';
$lang->my->task = '我的任务';
$lang->my->bug = '我的Bug';
$lang->my->testTask = '我的版本';
$lang->my->testCase = '我的用例';
$lang->my->myTestTask = '我的版本';
$lang->my->myTestCase = '我的用例';
$lang->my->story = "我的{$lang->SRCommon}";
$lang->my->doc = "我的文档";
$lang->my->createProgram = '添加项目';
+1 -1
View File
@@ -60,7 +60,7 @@
<?php $tab = '';?>
<?php if($action->objectType == 'meeting') $tab = $action->project ? "data-app='project'" : "data-app='my'";?>
<?php
if((isset($config->maxVersion) and strpos($config->action->assetType, $action->objectType) !== false) and empty($action->objectName))
if(($config->edition == 'max' and strpos($config->action->assetType, $action->objectType) !== false) and empty($action->objectName))
{
echo '#' . $action->objectID;
}
+1 -1
View File
@@ -101,7 +101,7 @@
$vars = "story={$story->id}";
echo common::buildIconButton('story', 'change', $vars, $story, 'list', 'alter', '', 'iframe', true);
echo common::buildIconButton('story', 'review', $vars, $story, 'list', 'search', '', 'iframe', true);
echo common::buildIconButton('story', 'recall', $vars, $story, 'list', 'back', 'hiddenwin', '', '', '', $lang->story->recall);
echo common::buildIconButton('story', 'recall', $vars, $story, 'list', 'undo', 'hiddenwin', '', '', '', $lang->story->recall);
echo common::buildIconButton('story', 'close', $vars, $story, 'list', '', '', 'iframe', true);
echo common::buildIconButton('story', 'edit', $vars, $story, 'list', '', '', 'iframe', true, "data-width='95%'");
}
+1 -1
View File
@@ -103,7 +103,7 @@
$vars = "story={$story->id}";
echo common::buildIconButton('story', 'change', $vars, $story, 'list', 'alter', '', 'iframe', true);
echo common::buildIconButton('story', 'review', $vars, $story, 'list', 'search', '', 'iframe', true);
echo common::buildIconButton('story', 'recall', $vars, $story, 'list', 'back', 'hiddenwin', '', '', '', $lang->story->recall);
echo common::buildIconButton('story', 'recall', $vars, $story, 'list', 'undo', 'hiddenwin', '', '', '', $lang->story->recall);
echo common::buildIconButton('story', 'close', $vars, $story, 'list', '', '', 'iframe', true);
echo common::buildIconButton('story', 'edit', $vars, $story, 'list', '', '', 'iframe', true, "data-width='95%'");
echo common::buildIconButton('story', 'createCase', "productID=$story->product&branch=$story->branch&module=0&from=&param=0&$vars", $story, 'list', 'sitemap', '', 'iframe', true, "data-width='95%'");
+3 -3
View File
@@ -130,7 +130,7 @@ class personnelModel extends model
$executionPairs = $this->getInvolvedExecutions($projects);
$taskInvest = $this->getProjectTaskInvest($projects, $accountPairs);
$bugAndStoryInvest = $this->getBugAndStoryInvest($accountPairs, $programID);
if(isset($this->config->maxVersion))
if($this->config->edition == 'max')
{
$issueInvest = $this->getIssueInvest($accountPairs, $projects);
$riskInvest = $this->getRiskInvest($accountPairs, $projects);
@@ -151,7 +151,7 @@ class personnelModel extends model
$personnelList[$account] += $taskInvest[$account];
$personnelList[$account] += $bugAndStoryInvest[$account];
if(isset($this->config->maxVersion))
if($this->config->edition == 'max')
{
$personnelList[$account] += $issueInvest[$account];
$personnelList[$account] += $riskInvest[$account];
@@ -375,7 +375,7 @@ class personnelModel extends model
/* The number of hours per person. */
$userHours = array();
if(isset($this->config->qcVersion) || isset($this->config->proVersion) || isset($this->config->bizVersion))
if($this->config->edition != 'open')
{
$userHours = $this->getUserEffortHours($userTasks);
}
+3 -3
View File
@@ -29,7 +29,7 @@
<th colspan="3"><?php echo $lang->personnel->task;?></th>
<th colspan="3"><?php echo $lang->personnel->bug;?></th>
<th <?php echo $config->URAndSR ? "colspan='2'" : "rowspan='2'";?> class="c-story"><?php echo $lang->personnel->createStories;?></th>
<?php if(isset($this->config->maxVersion)): ?>
<?php if($this->config->edition == 'max'): ?>
<th colspan="3"><?php echo $lang->personnel->issue;?></th>
<th colspan="3"><?php echo $lang->personnel->risk;?></th>
<?php endif;?>
@@ -47,7 +47,7 @@
<th><?php echo $lang->personnel->UR;?></th>
<th><?php echo $lang->personnel->SR;?></th>
<?php endif;?>
<?php if(isset($this->config->maxVersion)): ?>
<?php if($this->config->edition == 'max'): ?>
<th><?php echo $lang->personnel->created;?></th>
<th><?php echo $lang->personnel->resolved;?></th>
<th><?php echo $lang->personnel->wait;?></th>
@@ -76,7 +76,7 @@
<td><?php echo $personnel['UR'];?></td>
<?php endif;?>
<td><?php echo $personnel['SR'];?></td>
<?php if(isset($this->config->maxVersion)): ?>
<?php if($this->config->edition == 'max'): ?>
<td><?php echo $personnel['createdIssue'];?></td>
<td><?php echo $personnel['resolvedIssue'];?></td>
<td><?php echo $personnel['pendingIssue'];?></td>
+20 -9
View File
@@ -135,9 +135,18 @@ class product extends control
public function browse($productID = 0, $branch = '', $browseType = '', $param = 0, $storyType = 'story', $orderBy = '', $recTotal = 0, $recPerPage = 20, $pageID = 1, $projectID = 0)
{
$productID = $this->app->tab != 'project' ? $this->product->saveState($productID, $this->products) : $productID;
$branches = $this->loadModel('branch')->getList($productID, $projectID, 'all');
$branch = ($this->cookie->preBranch !== '' and $branch === '' and isset($branches[$this->cookie->preBranch])) ? $this->cookie->preBranch : $branch;
$branchID = $branch;
$product = $this->product->getById($productID);
if($product and $product->type != 'normal')
{
$branchPairs = $this->loadModel('branch')->getPairs($productID, 'all');
$branch = ($this->cookie->preBranch !== '' and $branch === '' and isset($branchPairs[$this->cookie->preBranch])) ? $this->cookie->preBranch : $branch;
$branchID = $branch;
}
else
{
$branchID = $branch = 'all';
}
/* Set menu. */
if($this->app->tab == 'product')
@@ -224,8 +233,6 @@ class product extends control
/* Display of branch label. */
$showBranch = $this->loadModel('branch')->showBranch($productID);
$product = $this->product->getById($productID);
/* Get stories. */
if($this->app->rawModule == 'projectstory')
{
@@ -248,10 +255,14 @@ class product extends control
/* Display status of branch. */
$branchOption = array();
$branchTagOption = array();
foreach($branches as $branchInfo)
if($product and $product->type != 'normal')
{
$branchOption[$branchInfo->id] = $branchInfo->name;
$branchTagOption[$branchInfo->id] = $branchInfo->name . ($branchInfo->status == 'closed' ? ' (' . $this->lang->branch->statusList['closed'] . ')' : '');
$branches = $this->loadModel('branch')->getList($productID, $projectID, 'all');
foreach($branches as $branchInfo)
{
$branchOption[$branchInfo->id] = $branchInfo->name;
$branchTagOption[$branchInfo->id] = $branchInfo->name . ($branchInfo->status == 'closed' ? ' (' . $this->lang->branch->statusList['closed'] . ')' : '');
}
}
/* Process the sql, get the conditon partion, save it to session. */
@@ -1417,7 +1428,7 @@ class product extends control
if(strpos(",$checkedItem,", ",{$product->id},") === false) unset($productStats[$i]);
}
}
if(isset($this->config->bizVersion)) list($fields, $productStats) = $this->loadModel('workflowfield')->appendDataFromFlow($fields, $productStats);
if($this->config->edition != 'open') list($fields, $productStats) = $this->loadModel('workflowfield')->appendDataFromFlow($fields, $productStats);
if(isset($rowspan)) $this->post->set('rowspan', $rowspan);
$this->post->set('fields', $fields);
+4
View File
@@ -695,6 +695,7 @@ class productModel extends model
$this->loadModel('personnel')->updateWhitelist($whitelist, 'product', $productID);
if($product->acl != 'open') $this->loadModel('user')->updateUserView($productID, 'product');
if($product->type == 'normal' and $oldProduct->type != 'normal') $this->loadModel('branch')->unlinkBranch4Project($productID);
if($product->type != 'normal' and $oldProduct->type == 'normal') $this->loadModel('branch')->linkBranch4Project($productID);
return common::createChanges($oldProduct, $product);
}
@@ -745,6 +746,7 @@ class productModel extends model
if(dao::isError()) return print(js::error(dao::getError()));
$unlinkProducts = array();
$linkProducts = array();
foreach($products as $productID => $product)
{
$oldProduct = $oldProducts[$productID];
@@ -763,11 +765,13 @@ class productModel extends model
if($product->acl == 'open') $this->loadModel('personnel')->updateWhitelist('', 'product', $productID);
if($product->acl != 'open') $this->loadModel('user')->updateUserView($productID, 'product');
if($product->type == 'normal' and $oldProduct->type != 'normal') $unlinkProducts[] = $productID;
if($product->type != 'normal' and $oldProduct->type == 'normal') $linkProducts[] = $productID;
$allChanges[$productID] = common::createChanges($oldProduct, $product);
}
if(!empty($unlinkProducts)) $this->loadModel('branch')->unlinkBranch4Project($unlinkProducts);
if(!empty($linkProducts)) $this->loadModel('branch')->linkBranch4Project($linkProducts);
return $allChanges;
}
+2 -1
View File
@@ -489,7 +489,8 @@ $projectIDParam = $isProjectStory ? "projectID=$projectID&" : '';
</div>
<?php $isShowModuleBTN = ($this->app->tab == 'project' and $browseType != 'bybranch') ? false : true;?>
<?php if($canBatchChangeModule and $productID and $branchID !== 'all' and $isShowModuleBTN):?>
<?php if($canBatchChangeModule and $productID and $isShowModuleBTN):?>
<?php if(($product->type != 'normal' and $branchID != 'all') or $product->type == 'normal')?>
<div class="btn-group dropup">
<button data-toggle="dropdown" type="button" class="btn"><?php echo $lang->story->moduleAB;?> <span class="caret"></span></button>
<?php $withSearch = count($modules) > 8;?>

Some files were not shown because too many files have changed in this diff Show More