Merge branch '18.x' into ipd1.1

This commit is contained in:
tanghucheng
2023-09-19 02:22:20 -04:00
33 changed files with 127 additions and 70 deletions
+5
View File
@@ -810,3 +810,8 @@ DELETE FROM zt_priv WHERE module='search' and method = 'select';
DELETE FROM zt_privlang WHERE `key`='search-select';
UPDATE `zt_privlang` SET `value`='删除风险' WHERE `objectID`=197 AND `objectType`='manager' AND `lang`='zh-cn';
DELETE FROM `zt_config` WHERE `module` = 'datatable' and `section` = 'productBrowse';
DELETE FROM `zt_config` WHERE `module` = 'datatable' and `section` = 'executionTask';
DELETE FROM `zt_config` WHERE `module` = 'datatable' and `section` = 'bugBrowse';
DELETE FROM `zt_config` WHERE `module` = 'datatable' and `section` = 'executionAll';
+1 -1
View File
@@ -929,7 +929,7 @@ class baseHelper
public static function arrayColumn(array $input, $columnKey, $indexKey = null): array
{
/* If php version greater than 7, calling system functions returns. */
if(defined(PHP_VERSION_ID) && PHP_VERSION_ID >= 70000) return \array_column($input, $columnKey, $indexKey);
if(defined('PHP_VERSION_ID') && PHP_VERSION_ID >= 70000) return \array_column($input, $columnKey, $indexKey);
$output = array();
foreach($input as $row)
+10
View File
@@ -522,6 +522,16 @@ function initPageEntity(object $object): array
*/
function initTableData(array $items, array &$fieldList, object $model = null): array
{
if(!empty($_GET['orderBy'])) list($orderField, $orderVaule) = explode('_', $_GET['orderBy']);
if(!empty($orderField) && !empty($orderVaule) && !empty($fieldList[$orderField]))
{
$sortType = false;
$col = $fieldList[$orderField];
if(empty($col['sortType']) && !empty($col['type']) && in_array($col['type'], array('id', 'title'))) $sortType = true;
if(!empty($col['sortType'])) $sortType = $col['sortType'];
if(is_bool($sortType)) $fieldList[$orderField]['sortType'] = $orderVaule;
}
$items = setParent($items);
if(empty($fieldList['actions'])) return $items;
+1
View File
@@ -64,6 +64,7 @@ class backBtn extends btn
'space' => 'space-browse',
'instance' => 'space-browse',
'artifactrepo' => 'artifactrepo-browse',
'job' => 'action-trash,job-browse',
);
$props = parent::getProps();
+2
View File
@@ -222,8 +222,10 @@ class admin extends control
$this->loadModel('setting')->setItems('system.common.safe', $data);
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'reload'));
}
$this->view->title = $this->lang->admin->safe->common . $this->lang->colon . $this->lang->admin->safe->set;
$this->view->position[] = $this->lang->admin->safe->common;
$this->view->gdInfo = function_exists('gd_info') ? gd_info() : array();
$this->display();
}
+1 -1
View File
@@ -159,7 +159,7 @@ $lang->admin->safe->resetPWDList[0] = 'Off';
$lang->admin->safe->noticeMode = 'The password will be checked when creating and modifying user information, and changing passwords.';
$lang->admin->safe->noticeWeakMode = 'The password will be checked when logging into the system, creating and modifying user information, and changing passwords.';
$lang->admin->safe->noticeStrong = 'The longer the password, the more letters, numbers, or special characters it contains, and the less repetitive the password, the more secure it is!';
$lang->admin->safe->noticeGd = 'Your server does not have GD module installed, you cannot use the Captcha function, Please use it after installation.';
$lang->admin->safe->noticeGd = 'Your server does not have GD module installed or enabled FreeType support, you cannot use the Captcha function, Please use it after installation.';
$lang->admin->menuSetting['system']['name'] = 'System';
$lang->admin->menuSetting['system']['desc'] = 'System elements configuration, such as backup, chat, security etc.';
+1 -1
View File
@@ -159,7 +159,7 @@ $lang->admin->safe->resetPWDList[0] = 'Off';
$lang->admin->safe->noticeMode = 'The password will be checked when creating and modifying user information, and changing passwords.';
$lang->admin->safe->noticeWeakMode = 'The password will be checked when logging into the system, creating and modifying user information, and changing passwords.';
$lang->admin->safe->noticeStrong = 'The longer the password, the more letters, numbers, or special characters it contains, and the less repetitive the password, the more secure it is!';
$lang->admin->safe->noticeGd = 'Your server does not have GD module installed, you cannot use the Captcha function, Please use it after installation.';
$lang->admin->safe->noticeGd = 'Your server does not have GD module installed or enabled FreeType support, you cannot use the Captcha function, Please use it after installation.';
$lang->admin->menuSetting['system']['name'] = 'System';
$lang->admin->menuSetting['system']['desc'] = 'System elements configuration, such as backup, chat, security etc.';
+1 -1
View File
@@ -159,7 +159,7 @@ $lang->admin->safe->resetPWDList[0] = 'Off';
$lang->admin->safe->noticeMode = "Le mot de passe sera vérifié lors de la création et de la modification des coordonnées de l'utilisateur, et du changement de mot de passe.";
$lang->admin->safe->noticeWeakMode = "Le mot de passe sera vérifié lors de la connexion au système, de la création et de la modification des coordonnées de l'utilisateur, et du changement de mot de passe.";
$lang->admin->safe->noticeStrong = "Le mot de passe est d'autant plus sécurisé qu'il est long, qu'il contient plus de lettres, de chiffres ou de caractères spéciaux, et que les lettres du mot de passe sont peu répétitives !";
$lang->admin->safe->noticeGd = 'Your server does not have GD module installed, you cannot use the Captcha function, Please use it after installation.';
$lang->admin->safe->noticeGd = 'Your server does not have GD module installed or enabled FreeType support, you cannot use the Captcha function, Please use it after installation.';
$lang->admin->menuSetting['system']['name'] = 'System';
$lang->admin->menuSetting['system']['desc'] = 'System elements configuration, such as backup, chat, security etc.';
+1 -1
View File
@@ -93,7 +93,7 @@ $lang->admin->safe->loginCaptchaList[0] = 'No';
$lang->admin->safe->noticeMode = 'Mật khẩu sẽ được kiểm tra khi người dùng đăng nhập hoặc người dùng thêm hoặc sửa.';
$lang->admin->safe->noticeStrong = '';
$lang->admin->safe->noticeGd = 'Your server does not have GD module installed, you cannot use the Captcha function, Please use it after installation.';
$lang->admin->safe->noticeGd = 'Your server does not have GD module installed or enabled FreeType support, you cannot use the Captcha function, Please use it after installation.';
$lang->admin->mon = 'month';
$lang->admin->day = 'day';
+1 -1
View File
@@ -159,7 +159,7 @@ $lang->admin->safe->resetPWDList[0] = '关闭';
$lang->admin->safe->noticeMode = '系统会在创建和修改用户、修改密码的时候检查用户口令。';
$lang->admin->safe->noticeWeakMode = '系统会在登录、创建和修改用户、修改密码的时候检查用户口令。';
$lang->admin->safe->noticeStrong = '密码长度越长,含有大写字母或数字或特殊符号越多,密码字母越不重复,安全度越强!';
$lang->admin->safe->noticeGd = '系统检测到您的服务器未安装GD模块,无法使用验证码功能,请安装后使用。';
$lang->admin->safe->noticeGd = '系统检测到您的服务器未安装GD模块或未启用FreeType支持,无法使用验证码功能,请安装后使用。';
$lang->admin->menuSetting['system']['name'] = '系统设置';
$lang->admin->menuSetting['system']['desc'] = '备份、聊天、安全等系统各要素配置。';
+1 -1
View File
@@ -86,4 +86,4 @@ $lang->admin->safe->loginCaptchaList[0] = '否';
$lang->admin->safe->noticeMode = '系統會在創建和修改用戶、修改密碼的時候檢查用戶口令。';
$lang->admin->safe->noticeWeakMode = '系統會在登錄、創建和修改用戶、修改密碼的時候檢查用戶口令。';
$lang->admin->safe->noticeStrong = '密碼長度越長,含有大寫字母或數字或特殊符號越多,密碼字母越不重複,安全度越強!';
$lang->admin->safe->noticeGd = '系統檢測到您的伺服器未安裝GD模組,無法使用驗證碼功能,請安裝後使用。';
$lang->admin->safe->noticeGd = '系統檢測到您的伺服器未安裝GD模組或未啟用FreeType支援,無法使用驗證碼功能,請安裝後使用。';
+2 -2
View File
@@ -16,7 +16,7 @@
.notice {color:#2667E3; margin-left: 12px;}
</style>
<?php js::set('adminLang', $lang->admin);?>
<?php js::set('loadedGD', extension_loaded('gd'));?>
<?php js::set('loadedGD', extension_loaded('gd') && !empty($gdInfo['FreeType Support']));?>
<?php include '../../common/view/header.html.php';?>
<div id='mainMenu' class='clearfix'>
<div class='btn-toolbar pull-left'>
@@ -73,7 +73,7 @@
<tr>
<th><?php echo $lang->admin->safe->loginCaptcha?></th>
<td><?php echo html::radio('loginCaptcha', $lang->admin->safe->loginCaptchaList, isset($config->safe->loginCaptcha) ? $config->safe->loginCaptcha : 0)?></td>
<td class='notice'><?php if(!extension_loaded('gd')) echo $lang->admin->safe->noticeGd;?></td>
<td class='notice'><?php if(!extension_loaded('gd') || empty($gdInfo['FreeType Support'])) echo $lang->admin->safe->noticeGd;?></td>
</tr>
<tr>
<td colspan='3' class='text-center form-actions'>
+6 -1
View File
@@ -3725,7 +3725,12 @@ EOF;
foreach($postData as $key => $value)
{
if(!is_array($value) or strpos($this->config->$objectType->excludeCheckFileds, ",$key,") !== false) continue;
if(isset($value[$index]) and !empty($value[$index]) and $value[$index] != 'ditto') return true;
if(isset($value[$index]) and !empty($value[$index]) and $value[$index] != 'ditto')
{
/* Judgment of multi-select fields. */
if(is_array($value[$index]) and join(',', $value[$index]) == '') continue;
return true;
}
}
return false;
+2
View File
@@ -25,3 +25,5 @@ body {margin-bottom: 10px;}
.dtable-row.is-normal .dtable-cell[data-col="name"] {padding-left: 20px;}
.dtable-cell[data-col="actions"] > .dtable-cell-content .c-actions .dividing-line {width: 1px; height: 16px; display: inline-block; vertical-align: middle; background: #F4F5F7; margin: 0 4px 0 0;}
span.delayed {display: inline-block; height: 20px; line-height: 18px; background: #FFEBEB; color: #FB2B2B; border-radius: 20px; padding: 2px 8px; margin-left: -8px;}
+1 -1
View File
@@ -15,7 +15,7 @@ include '../../common/view/header.html.php';
include '../../common/view/datatable.fix.html.php';
include '../../common/view/zui3dtable.html.php';
$cols = $this->task->generateCol($orderBy);
$tasks = $this->task->generateRow($tasks, $users, $productID);
$tasks = $this->task->generateRow($tasks, $users, $executionID, $showBranch, $branchGroups, $modulePairs);
$sortLink = helper::createLink('execution', 'task', "executionID={$execution->id}&status={$status}&param={$param}&orderBy={orderBy}&recTotal={$recTotal}&recPerPage={$recPerPage}");
js::set('moduleID', $moduleID);
js::set('productID', $productID);
+1 -1
View File
@@ -95,7 +95,7 @@ class job extends control
$job->buildSpec = urldecode($job->pipeline) . '@' . $job->jenkinsName;
$job->engine = zget($this->lang->job->engineList, $job->engine);
$job->frame = zget($this->lang->job->frameList, $job->frame);
$job->productName = $products[$job->product];
$job->productName = zget($products, $job->product, '');
}
$this->view->title = $this->lang->ci->job . $this->lang->colon . $this->lang->job->browse;
+1
View File
@@ -214,6 +214,7 @@ formPanel
(
setStyle('width', '150px'),
set::id('pipelineDropmenu'),
set::popPlacement('top'),
set::text($lang->job->selectPipeline),
set::url($this->createLink('jenkins', 'ajaxGetJenkinsTasks')),
),
+2 -1
View File
@@ -1449,7 +1449,8 @@ EOF;
$this->view->list = $this->user->getContactListByID($listID);
}
$users = $this->user->getPairs('noletter|noempty|noclosed|noclosed', $mode == 'new' ? '' : $this->view->list->userList, $this->config->maxCount);
$userParams = empty($this->config->user->showDeleted) ? 'noletter|noempty|noclosed|noclosed|nodeleted' : 'noletter|noempty|noclosed|noclosed';
$users = $this->user->getPairs($userParams, $mode == 'new' ? '' : $this->view->list->userList, $this->config->maxCount);
if(isset($this->config->user->moreLink)) $this->config->moreLinks['users[]'] = $this->config->user->moreLink;
$this->view->mode = $mode;
+1 -1
View File
@@ -388,7 +388,7 @@ class product extends control
$this->view->storyType = $storyType;
$this->view->from = $this->app->tab;
$this->view->isProjectStory = $isProjectStory;
$this->view->modulePairs = $showModule ? $this->tree->getModulePairs($productID, 'story', $showModule) : array();
$this->view->modulePairs = $this->tree->getModulePairs($productID, 'story', $showModule);
$this->view->project = $project;
$this->display();
}
+1
View File
@@ -21,6 +21,7 @@ $options['branchOption'] = $branchOption;
$options['modulePairs'] = $modulePairs;
$options['storyStages'] = $storyStages;
$options['isShowBranch'] = '';
$options['products'] = $products;
if(!empty($branchOptions)) $options['branchOptions'] = $branchOptions;
$hasChildren = false;
+1 -1
View File
@@ -295,7 +295,7 @@ class repoZen extends repo
foreach($this->post->serviceProject as $i => $project)
{
$products = array_filter($this->post->product[$i]);
if(empty($products)) dao::$errors['product_' . ($i - 1)][] = sprintf($this->lang->error->notempty, $this->lang->repo->product);
if(empty($products)) continue;
if($this->post->name[$i] == '') dao::$errors['name_' . ($i -1)][] = sprintf($this->lang->error->notempty, $this->lang->repo->name);
if(dao::isError()) continue;
+5 -5
View File
@@ -23,13 +23,13 @@ $lang->space->notice->toInstall = 'Please go to the application market to instal
$lang->space->byList = 'List';
$lang->space->byCard = 'Card';
$lang->space->featureBar['browse']['all'] = 'All';
$lang->space->featureBar['browse']['running'] = 'Running';
$lang->space->featureBar['browse']['stopped'] = 'Stopped';
$lang->space->featureBar['browse']['abnormal'] = 'Abnormal';
$lang->space->featureBar['browse']['all'] = 'All';
if($config->inQuickon) $lang->space->featureBar['browse']['running'] = 'Running';
if($config->inQuickon) $lang->space->featureBar['browse']['stopped'] = 'Stopped';
if($config->inQuickon) $lang->space->featureBar['browse']['abnormal'] = 'Abnormal';
$lang->space->appType['gitlab'] = 'GitLab';
if(!$config->inQuickon) $lang->space->appType['gitea'] = 'Gitea';
$lang->space->appType['gitea'] = 'Gitea';
$lang->space->appType['gogs'] = 'Gogs';
$lang->space->appType['jenkins'] = 'Jenkins';
$lang->space->appType['sonarqube'] = 'SonarQube';
+5 -5
View File
@@ -23,13 +23,13 @@ $lang->space->notice->toInstall = 'Please go to the application market to instal
$lang->space->byList = 'List';
$lang->space->byCard = 'Card';
$lang->space->featureBar['browse']['all'] = 'All';
$lang->space->featureBar['browse']['running'] = 'Running';
$lang->space->featureBar['browse']['stopped'] = 'Stopped';
$lang->space->featureBar['browse']['abnormal'] = 'Abnormal';
$lang->space->featureBar['browse']['all'] = 'All';
if($config->inQuickon) $lang->space->featureBar['browse']['running'] = 'Running';
if($config->inQuickon) $lang->space->featureBar['browse']['stopped'] = 'Stopped';
if($config->inQuickon) $lang->space->featureBar['browse']['abnormal'] = 'Abnormal';
$lang->space->appType['gitlab'] = 'GitLab';
if(!$config->inQuickon) $lang->space->appType['gitea'] = 'Gitea';
$lang->space->appType['gitea'] = 'Gitea';
$lang->space->appType['gogs'] = 'Gogs';
$lang->space->appType['jenkins'] = 'Jenkins';
$lang->space->appType['sonarqube'] = 'SonarQube';
+5 -5
View File
@@ -23,13 +23,13 @@ $lang->space->notice->toInstall = 'Please go to the application market to instal
$lang->space->byList = 'List';
$lang->space->byCard = 'Card';
$lang->space->featureBar['browse']['all'] = 'All';
$lang->space->featureBar['browse']['running'] = 'Running';
$lang->space->featureBar['browse']['stopped'] = 'Stopped';
$lang->space->featureBar['browse']['abnormal'] = 'Abnormal';
$lang->space->featureBar['browse']['all'] = 'All';
if($config->inQuickon) $lang->space->featureBar['browse']['running'] = 'Running';
if($config->inQuickon) $lang->space->featureBar['browse']['stopped'] = 'Stopped';
if($config->inQuickon) $lang->space->featureBar['browse']['abnormal'] = 'Abnormal';
$lang->space->appType['gitlab'] = 'GitLab';
if(!$config->inQuickon) $lang->space->appType['gitea'] = 'Gitea';
$lang->space->appType['gitea'] = 'Gitea';
$lang->space->appType['gogs'] = 'Gogs';
$lang->space->appType['jenkins'] = 'Jenkins';
$lang->space->appType['sonarqube'] = 'SonarQube';
+5 -5
View File
@@ -23,13 +23,13 @@ $lang->space->notice->toInstall = '请到应用市场安装';
$lang->space->byList = '列表';
$lang->space->byCard = '卡片';
$lang->space->featureBar['browse']['all'] = '全部';
$lang->space->featureBar['browse']['running'] = '运行中';
$lang->space->featureBar['browse']['stopped'] = '已关闭';
$lang->space->featureBar['browse']['abnormal'] = '异常';
$lang->space->featureBar['browse']['all'] = '全部';
if($config->inQuickon) $lang->space->featureBar['browse']['running'] = '运行中';
if($config->inQuickon) $lang->space->featureBar['browse']['stopped'] = '已关闭';
if($config->inQuickon) $lang->space->featureBar['browse']['abnormal'] = '异常';
$lang->space->appType['gitlab'] = 'GitLab';
if(!$config->inQuickon) $lang->space->appType['gitea'] = 'Gitea';
$lang->space->appType['gitea'] = 'Gitea';
$lang->space->appType['gogs'] = 'Gogs';
$lang->space->appType['jenkins'] = 'Jenkins';
$lang->space->appType['sonarqube'] = 'SonarQube';
+1 -1
View File
@@ -1,3 +1,3 @@
<?php
$config->store = new stdclass;
$config->store->quchengSiteHost = 'https://qucheng.com';
$config->store->quchengSiteHost = 'https://www.qucheng.com';
+5 -10
View File
@@ -137,7 +137,7 @@ $config->story->datatable->fieldList['reviewedBy']['control'] = 'multiple';
$config->story->datatable->fieldList['reviewedDate']['title'] = 'reviewedDate';
$config->story->datatable->fieldList['reviewedDate']['fixed'] = 'no';
$config->story->datatable->fieldList['reviewedDate']['type'] = 'date';
$config->story->datatable->fieldList['reviewedDate']['type'] = 'html';
$config->story->datatable->fieldList['reviewedDate']['sortType'] = true;
$config->story->datatable->fieldList['reviewedDate']['width'] = '90';
$config->story->datatable->fieldList['reviewedDate']['required'] = 'no';
@@ -158,7 +158,7 @@ $config->story->datatable->fieldList['assignedTo']['required'] = 'no';
$config->story->datatable->fieldList['assignedDate']['title'] = 'assignedDate';
$config->story->datatable->fieldList['assignedDate']['fixed'] = 'no';
$config->story->datatable->fieldList['assignedDate']['type'] = 'date';
$config->story->datatable->fieldList['assignedDate']['type'] = 'html';
$config->story->datatable->fieldList['assignedDate']['sortType'] = true;
$config->story->datatable->fieldList['assignedDate']['width'] = '90';
$config->story->datatable->fieldList['assignedDate']['required'] = 'no';
@@ -219,11 +219,6 @@ $config->story->datatable->fieldList['openedDate']['sortType'] = true;
$config->story->datatable->fieldList['openedDate']['width'] = '90';
$config->story->datatable->fieldList['openedDate']['required'] = 'no';
$config->story->datatable->fieldList['needReview']['title'] = 'needReview';
$config->story->datatable->fieldList['needReview']['type'] = 'html';
$config->story->datatable->fieldList['needReview']['control'] = 'select';
$config->story->datatable->fieldList['needReview']['dataSource'] = array('lang' => 'reviewList');
$config->story->datatable->fieldList['closedBy']['title'] = 'closedBy';
$config->story->datatable->fieldList['closedBy']['fixed'] = 'no';
$config->story->datatable->fieldList['closedBy']['type'] = 'user';
@@ -233,7 +228,7 @@ $config->story->datatable->fieldList['closedBy']['required'] = 'no';
$config->story->datatable->fieldList['closedDate']['title'] = 'closedDate';
$config->story->datatable->fieldList['closedDate']['fixed'] = 'no';
$config->story->datatable->fieldList['closedDate']['type'] = 'datetime';
$config->story->datatable->fieldList['closedDate']['type'] = 'html';
$config->story->datatable->fieldList['closedDate']['sortType'] = true;
$config->story->datatable->fieldList['closedDate']['width'] = '90';
$config->story->datatable->fieldList['closedDate']['required'] = 'no';
@@ -254,14 +249,14 @@ $config->story->datatable->fieldList['lastEditedBy']['required'] = 'no';
$config->story->datatable->fieldList['lastEditedDate']['title'] = 'lastEditedDate';
$config->story->datatable->fieldList['lastEditedDate']['fixed'] = 'no';
$config->story->datatable->fieldList['lastEditedDate']['type'] = 'datetime';
$config->story->datatable->fieldList['lastEditedDate']['type'] = 'html';
$config->story->datatable->fieldList['lastEditedDate']['sortType'] = true;
$config->story->datatable->fieldList['lastEditedDate']['width'] = '90';
$config->story->datatable->fieldList['lastEditedDate']['required'] = 'no';
$config->story->datatable->fieldList['activatedDate']['title'] = 'activatedDate';
$config->story->datatable->fieldList['activatedDate']['fixed'] = 'no';
$config->story->datatable->fieldList['activatedDate']['type'] = 'datetime';
$config->story->datatable->fieldList['activatedDate']['type'] = 'html';
$config->story->datatable->fieldList['activatedDate']['sortType'] = true;
$config->story->datatable->fieldList['activatedDate']['width'] = '90';
$config->story->datatable->fieldList['activatedDate']['required'] = 'no';
+30 -15
View File
@@ -6752,6 +6752,7 @@ class storyModel extends model
$branchOptions = zget($options, 'branchOptions', array());
$modulePairs = zget($options, 'modulePairs', array());
$storyStages = zget($options, 'storyStages', array());
$products = zget($options, 'products', array());
$isShowBranch = zget($options, 'isShowBranch', '');
$userFields = array('assignedTo', 'openedBy', 'closedBy', 'lastEditedBy', 'feedbackBy');
@@ -6781,19 +6782,27 @@ class storyModel extends model
$data->actions = '<div class="c-actions">' . $this->buildOperateMenu($story, $menuType, $execution, $storyType) . '</div>';
foreach($cols as $col)
{
if($col->name == 'assignedTo') $data->assignedTo = $this->printAssignedHtml($story, $users, false);
if($col->name == 'order') $data->order = "<i class='icon-move'>";
if($col->name == 'pri') $data->pri = "<span class='" . ($story->pri ? "label-pri label-pri-" . $story->pri : '') . "' title='" . zget($this->lang->story->priList, $story->pri, $story->pri) . "'>" . zget($this->lang->story->priList, $story->pri, $story->pri) . "</span>";
if($col->name == 'plan') $data->plan = isset($story->planTitle) ? $story->planTitle : '';
if($col->name == 'branch') $data->branch = zget($branches, $story->branch, '');
if($col->name == 'source') $data->source = zget($this->lang->story->sourceList, $story->source);
if($col->name == 'category') $data->category = zget($this->lang->story->categoryList, $story->category);
if($col->name == 'duration') $data->duration = zget($this->lang->demand->durationList, $story->duration);
if($col->name == 'BSA') $data->BSA = zget($this->lang->demand->bsaList, $story->BSA);
if($col->name == 'taskCount') $data->taskCount = $storyTasks[$story->id] > 0 ? html::a(helper::createLink('story', 'tasks', "storyID=$story->id"), $storyTasks[$story->id], '', 'class="iframe" data-toggle="modal"') : '0';
if($col->name == 'bugCount') $data->bugCount = $storyBugs[$story->id] > 0 ? html::a(helper::createLink('story', 'bugs', "storyID=$story->id"), $storyBugs[$story->id], '', 'class="iframe" data-toggle="modal"') : '0';
if($col->name == 'caseCount') $data->caseCount = $storyCases[$story->id] > 0 ? html::a(helper::createLink('story', 'cases', "storyID=$story->id"), $storyBugs[$story->id], '', 'class="iframe" data-toggle="modal"') : '0';
if($col->name == 'estimate') $data->estimate = (float)$story->estimate . $this->config->hourUnit;
if($col->name == 'assignedTo') $data->assignedTo = $this->printAssignedHtml($story, $users, false);
if($col->name == 'order') $data->order = "<i class='icon-move'>";
if($col->name == 'pri') $data->pri = "<span class='" . ($story->pri ? "label-pri label-pri-" . $story->pri : '') . "' title='" . zget($this->lang->story->priList, $story->pri, $story->pri) . "'>" . zget($this->lang->story->priList, $story->pri, $story->pri) . "</span>";
if($col->name == 'plan') $data->plan = isset($story->planTitle) ? $story->planTitle : '';
if($col->name == 'product') $data->product = "<span title='" . zget($products, $story->product, '') . "'>" . zget($products, $story->product, '') . '</span>';
if($col->name == 'branch') $data->branch = zget($branches, $story->branch, '');
if($col->name == 'module') $data->module = zget($modulePairs, $story->module, '');
if($col->name == 'source') $data->source = zget($this->lang->story->sourceList, $story->source);
if($col->name == 'sourceNote') $data->sourceNote = $story->sourceNote;
if($col->name == 'keywords') $data->keywords = $story->keywords;
if($col->name == 'version') $data->version = $story->version;
if($col->name == 'feedbackBy') $data->feedbackBy = $story->feedbackBy;
if($col->name == 'notifyEmail') $data->notifyEmail = $story->notifyEmail;
if($col->name == 'closedReason') $data->closedReason = zget($this->lang->story->reasonList, $story->closedReason, '');
if($col->name == 'category') $data->category = zget($this->lang->story->categoryList, $story->category);
if($col->name == 'duration') $data->duration = zget($this->lang->demand->durationList, $story->duration);
if($col->name == 'BSA') $data->BSA = zget($this->lang->demand->bsaList, $story->BSA);
if($col->name == 'taskCount') $data->taskCount = $storyTasks[$story->id] > 0 ? html::a(helper::createLink('story', 'tasks', "storyID=$story->id"), $storyTasks[$story->id], '', 'class="iframe" data-toggle="modal"') : '0';
if($col->name == 'bugCount') $data->bugCount = $storyBugs[$story->id] > 0 ? html::a(helper::createLink('story', 'bugs', "storyID=$story->id"), $storyBugs[$story->id], '', 'class="iframe" data-toggle="modal"') : '0';
if($col->name == 'caseCount') $data->caseCount = $storyCases[$story->id] > 0 ? html::a(helper::createLink('story', 'cases', "storyID=$story->id"), $storyBugs[$story->id], '', 'class="iframe" data-toggle="modal"') : '0';
if($col->name == 'estimate') $data->estimate = (float)$story->estimate . $this->config->hourUnit;
if($col->name == 'reviewedBy')
{
$reviewers = array_unique(array_filter(explode(',', $story->reviewedBy)));
@@ -6865,8 +6874,14 @@ class storyModel extends model
$mailto = array_map(function($account) use($users){$account = trim($account); return zget($users, $account);}, explode(',', $story->mailto));
$data->mailto = implode(' ', $mailto);
}
if(in_array($col->name, $userFields)) $story->{$col->name} = zget($users, $story->{$col->name});
if(in_array($col->name, $dateFields)) $story->{$col->name} = helper::isZeroDate($story->{$col->name}) ? '' : substr($story->{$col->name}, 5, 11);
if($col->name == 'URS' || $col->name == 'SRS')
{
$link = helper::createLink('story', 'relation', "storyID=$story->id&storyType=$story->type");
$storySR = $this->getStoryRelationCounts($story->id, $story->type);
$data->{$col->name} = $storySR > 0 ? html::a($link, $storySR, '', 'class="iframe" data-toggle="modal"') : 0;
}
if(in_array($col->name, $userFields)) $data->{$col->name} = zget($users, $story->{$col->name});
if(in_array($col->name, $dateFields)) $data->{$col->name} = helper::isZeroDate($story->{$col->name}) ? '' : substr($story->{$col->name}, 5, 11);
}
$data->isParent = false;
+1 -1
View File
@@ -120,7 +120,7 @@ $config->task->datatable->fieldList['finishedBy']['sortType'] = true;
$config->task->datatable->fieldList['finishedBy']['required'] = 'no';
$config->task->datatable->fieldList['deadline']['title'] = 'deadlineAB';
$config->task->datatable->fieldList['deadline']['type'] = 'date';
$config->task->datatable->fieldList['deadline']['type'] = 'html';
$config->task->datatable->fieldList['deadline']['width'] = '70';
$config->task->datatable->fieldList['deadline']['fixed'] = 'no';
$config->task->datatable->fieldList['deadline']['sortType'] = true;
+16 -3
View File
@@ -4638,15 +4638,20 @@ class taskModel extends model
*
* @param array $tasks
* @param array $users
* @param int $executionID
* @param bool $showBranch
* @param array $branchGroups
* @param array $modulePairs
* @access public
* @return array
*/
public function generateRow($tasks, $users)
public function generateRow($tasks, $users, $executionID, $showBranch, $branchGroups, $modulePairs)
{
$userFields = array('assignedTo', 'openedBy', 'closedBy', 'lastEditedBy', 'finishedBy');
$dateFields = array('assignedDate', 'openedDate', 'deadline', 'finishedDate', 'closedDate', 'lastEditedDate', 'canceledDate', 'activatedDate', 'estStarted', 'realStarted', 'replacetypeDate');
$canView = common::hasPriv('task', 'view');
$rows = array();
if($showBranch) $showBranch = isset($this->config->execution->task->showBranch) ? $this->config->execution->task->showBranch : 1;
foreach($tasks as $task)
{
$task->assignedTo = $this->printAssignedHtml($task, $users, false);
@@ -4657,10 +4662,10 @@ class taskModel extends model
$linkClass = $this->config->vision == 'lite' ? 'class="iframe"' : '';
if($task->parent > 0 and isset($task->parentName)) $task->name = "{$task->parentName} / {$task->name}";
if(!empty($task->product) and isset($branchGroups[$task->product][$task->branch]) and $showBranch) $taskName .= "<span class='label label-badge label-outline'>" . $branchGroups[$task->product][$task->branch] . '</span> ';
if($task->module and isset($modulePairs[$task->module])) $taskName .= "<span class='label label-gray label-badge'>" . $modulePairs[$task->module] . '</span> ';
if($task->parent > 0) $taskName .= '<span class="label label-badge label-light" title="' . $this->lang->task->children . '">' . $this->lang->task->childrenAB . '</span> ';
if(!empty($task->team)) $taskName .= '<span class="label label-badge label-light" title="' . $this->lang->task->multiple . '">' . $this->lang->task->multipleAB . '</span> ';
$taskName .= $canView ? html::a($taskLink, $task->name, null, "$linkClass style='color: $task->color' title='$task->name'") : "<span style='color: $task->color'>$task->name</span>";
if(!empty($task->children)) $taskName .= '<a class="task-toggle" data-id="' . $task->id . '"><i class="icon icon-angle-double-right"></i></a>';
if($task->fromBug) $taskName .= html::a(helper::createLink('bug', 'view', "id=$task->fromBug"), "[BUG#$task->fromBug]", '', "class='bug'");
@@ -4710,7 +4715,15 @@ class taskModel extends model
$task->mailto = implode(' &nbsp;', $mailto);
foreach($userFields as $field) $task->$field = zget($users, $task->$field);
foreach($dateFields as $field) $task->$field = empty($task->$field) || helper::isZeroDate($task->$field) ? '' : $task->$field;
foreach($dateFields as $field)
{
$task->$field = empty($task->$field) || helper::isZeroDate($task->$field) ? '' : $task->$field;
if($field == 'deadline')
{
$delayed = isset($task->delay) ? "class='delayed'" : '';
$task->deadline = "<span $delayed>" . substr($task->deadline, 5, 6) . '</span>';
}
}
$children = isset($task->children) ? $task->children : array();
unset($task->children);
+7 -1
View File
@@ -121,7 +121,13 @@ class userModel extends model
$this->config->user->moreLink = $moreLink;
}
if($usersToAppended) $users += $this->dao->select($fields)->from(TABLE_USER)->where('account')->in($usersToAppended)->fetchAll($keyField);
if($usersToAppended)
{
$users += $this->dao->select($fields)->from(TABLE_USER)
->where('account')->in($usersToAppended)
->beginIF(strpos($params, 'nodeleted') !== false)->andWhere('deleted')->eq('0')->fi()
->fetchAll($keyField);
}
/* Cycle the user records to append the first letter of his account. */
foreach($users as $account => $user)
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long