* Finish task #41226.

This commit is contained in:
tianshujie98
2021-08-12 16:14:56 +08:00
parent 83ffe7deee
commit 3e86bf4da9
23 changed files with 361 additions and 13 deletions
+2
View File
@@ -1 +1,3 @@
ALTER TABLE `zt_testtask` ADD `realFinishedDate` datetime NOT NULL AFTER `end`;
ALTER TABLE `zt_release` ADD `mailto` text AFTER `desc`;
ALTER TABLE `zt_release` ADD `notify` varchar(255) AFTER `mailto`;
+2
View File
@@ -768,6 +768,8 @@ CREATE TABLE IF NOT EXISTS `zt_release` (
`bugs` text NOT NULL,
`leftBugs` text NOT NULL,
`desc` text NOT NULL,
`mailto` text,
`notify` varchar(255),
`status` varchar(20) NOT NULL default 'normal',
`subStatus` varchar(30) NOT NULL default '',
`deleted` enum('0','1') NOT NULL default '0',
+3
View File
@@ -10,6 +10,7 @@ $config->message->objectTypes['case'] = array('opened', 'edited', 'commen
$config->message->objectTypes['testtask'] = array('opened', 'edited', 'started', 'blocked', 'closed', 'activated');
$config->message->objectTypes['todo'] = array('opened', 'edited');
$config->message->objectTypes['doc'] = array('created', 'edited');
$config->message->objectTypes['release'] = array('opened', 'edited');
$config->message->available = array();
$config->message->available['mail']['story'] = $config->message->objectTypes['story'];
@@ -17,6 +18,7 @@ $config->message->available['mail']['task'] = $config->message->objectTypes[
$config->message->available['mail']['bug'] = $config->message->objectTypes['bug'];
$config->message->available['mail']['testtask'] = array('opened', 'edited', 'closed');
$config->message->available['mail']['doc'] = $config->message->objectTypes['doc'];
$config->message->available['mail']['release'] = $config->message->objectTypes['release'];
$config->message->available['webhook'] = $config->message->objectTypes;
@@ -26,6 +28,7 @@ $config->message->available['message']['task'] = $config->message->objectTyp
$config->message->available['message']['testtask'] = $config->message->objectTypes['testtask'];
$config->message->available['message']['todo'] = $config->message->objectTypes['todo'];
$config->message->available['message']['doc'] = $config->message->objectTypes['doc'];
$config->message->available['message']['release'] = $config->message->objectTypes['release'];
$config->message->typeLink = array();
$config->message->typeLink['mail'] = 'mail|index';
+11
View File
@@ -164,6 +164,17 @@ class messageModel extends model
if(empty($toList) and $objectType == 'todo') $toList = $object->account;
if(empty($toList) and $objectType == 'testtask') $toList = $object->owner;
if(empty($toList) and $objectType == 'meeting') $toList = $object->host . $object->participant;
if(empty($toList) and $objectType == 'release')
{
/* Get notifiy persons. */
$notifyPersons = array();
if(!empty($toList->notify)) $notifyPersons = $this->loadModel('release')->getNotifyPersons($object->notify, $object->product, $object->build);
foreach($notifyPersons as $account)
{
if(strpos($object->mailto . ',', ",{$account},") === false) $toList .= ',' . $account;
}
}
if($toList == 'closed') $toList = '';
return $toList;
+20 -7
View File
@@ -98,6 +98,8 @@ class projectrelease extends control
*/
public function create($projectID)
{
/* Load module and config. */
$this->loadModel('build');
$this->app->loadConfig('release');
$this->config->projectrelease->create = $this->config->release->create;
@@ -114,9 +116,7 @@ class projectrelease extends control
}
/* Get the builds that can select. */
$productPairs = $this->loadModel('product')->getProductPairsByProject($projectID);
$productIdList = array_keys($productPairs);
$builds = $this->loadModel('build')->getProductBuildPairs($productIdList, 0, 0, 'notrunk');
$builds = $this->build->getProjectBuildPairs($projectID, 0, 0, 'notrunk|withbranch');
$releaseBuilds = $this->projectrelease->getReleaseBuilds($projectID);
foreach($releaseBuilds as $build) unset($builds[$build]);
unset($builds['trunk']);
@@ -128,6 +128,7 @@ class projectrelease extends control
$this->view->position[] = $this->lang->release->create;
$this->view->builds = $builds;
$this->view->lastRelease = $this->projectrelease->getLast($projectID);
$this->view->users = $this->loadModel('user')->getPairs('noletter|noclosed');
$this->display();
}
@@ -140,6 +141,10 @@ class projectrelease extends control
*/
public function edit($releaseID)
{
/* Load module and config. */
$this->loadModel('story');
$this->loadModel('bug');
$this->loadModel('build');
$this->app->loadConfig('release');
$this->config->projectrelease->create = $this->config->release->create;
@@ -158,15 +163,21 @@ class projectrelease extends control
$this->executeHooks($releaseID);
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('view', "releaseID=$releaseID")));
}
$this->loadModel('story');
$this->loadModel('bug');
$this->loadModel('build');
/* Get release and build. */
$release = $this->projectrelease->getById((int)$releaseID);
$this->commonAction($release->project, $release->product, $release->branch);
$build = $this->build->getById($release->build);
/* Get the builds that can select. */
$builds = $this->build->getProjectBuildPairs($release->project, $release->product, $release->branch, 'notrunk|withbranch');
$releaseBuilds = $this->projectrelease->getReleaseBuilds($release->project);
foreach($releaseBuilds as $releaseBuild)
{
if($releaseBuild != $build->id) unset($builds[$releaseBuild]);
}
unset($builds['trunk']);
/* Set project menu. */
$this->project->setMenu($release->project);
@@ -174,7 +185,9 @@ class projectrelease extends control
$this->view->position[] = $this->lang->release->edit;
$this->view->release = $release;
$this->view->build = $build;
$this->view->builds = $this->loadModel('build')->getProjectBuildPairs($release->project, $release->product, $release->branch, 'notrunk|withbranch');
$this->view->builds = $builds;
$this->view->users = $this->loadModel('user')->getPairs('noletter|noclosed');
$this->display();
}
+1
View File
@@ -0,0 +1 @@
.checkbox-primary {display: inline-block; margin-left: 10px;}
+1
View File
@@ -1,3 +1,4 @@
.table-form > tbody > tr > td > .row > [class*="col-"] .panel-heading {line-height: 16px;}
.contentDiv {height: 190px; overflow-y: auto; margin-bottom: 10px !important;}
.contentDiv .panel-heading {line-height: 14px;}
.checkbox-primary {display: inline-block; margin-left: 10px;}
+20
View File
@@ -102,6 +102,7 @@ class projectreleaseModel extends model
*/
public function create()
{
/* Init vars. */
$productID = $this->post->product;
$branch = $this->post->branch;
$buildID = 0;
@@ -126,6 +127,8 @@ class projectreleaseModel extends model
->setDefault('stories', '')
->join('stories', ',')
->join('bugs', ',')
->join('mailto', ',')
->join('notify', ',')
->setIF($this->post->build == false, 'build', $buildID)
->setIF($productID, 'product', $productID)
->setIF($branch, 'branch', $branch)
@@ -213,16 +216,20 @@ class projectreleaseModel extends model
*/
public function update($releaseID)
{
/* Init vars. */
$releaseID = (int)$releaseID;
$oldRelease = $this->dao->select('*')->from(TABLE_RELEASE)->where('id')->eq($releaseID)->fetch();
$branch = $this->dao->select('branch')->from(TABLE_BUILD)->where('id')->eq((int)$this->post->build)->fetch('branch');
$release = fixer::input('post')->stripTags($this->config->release->editor->edit['id'], $this->config->allowedTags)
->add('branch', (int)$branch)
->join('mailto', ',')
->join('notify', ',')
->setIF(!$this->post->marker, 'marker', 0)
->cleanInt('product')
->remove('files,labels,allchecker,uid')
->get();
$release = $this->loadModel('file')->processImgURL($release, $this->config->release->editor->edit['id'], $this->post->uid);
$this->dao->update(TABLE_RELEASE)->data($release)
->autoCheck()
@@ -315,4 +322,17 @@ class projectreleaseModel extends model
$this->loadModel('action');
foreach($this->post->bugs as $bugID) $this->action->create('bug', $bugID, 'linked2release', '', $releaseID);
}
/**
* Send mail.
*
* @param int $releaseID
* @param int $actionID
* @access public
* @return void
*/
public function sendmail($releaseID, $actionID)
{
$this->loadModel('release')->sendmail($releaseID, $actionID);
}
}
@@ -59,6 +59,18 @@
<th><?php echo $lang->release->desc;?></th>
<td colspan='2'><?php echo html::textarea('desc', '', "rows='10' class='form-control kindeditor' hidefocus='true'");?></td>
</tr>
<tr>
<th><?php echo $lang->release->notify;?></th>
<td colspan='2'><?php echo html::checkbox('notify', $lang->release->notifyList);?></td>
</tr>
<tr>
<th><?php echo $lang->release->mailto;?></th>
<td colspan='2'>
<div class="input-group">
<?php echo html::select('mailto[]', $users, '', "class='form-control chosen' data-placeholder='{$lang->chooseUsersToMail}' multiple");?>
</div>
</td>
</tr>
<tr>
<th><?php echo $lang->files;?></th>
<td colspan='2'><?php echo $this->fetch('file', 'buildform');?></td>
+12
View File
@@ -52,6 +52,18 @@
<th><?php echo $lang->release->desc;?></th>
<td colspan='2'><?php echo html::textarea('desc', htmlspecialchars($release->desc), "rows=10 class='form-control kindeditor' hidefocus='true'");?></td>
</tr>
<tr>
<th><?php echo $lang->release->notify;?></th>
<td colspan='2'><?php echo html::checkbox('notify', $lang->release->notifyList, $release->notify);?></td>
</tr>
<tr>
<th><?php echo $lang->release->mailto;?></th>
<td colspan='2'>
<div class="input-group">
<?php echo html::select('mailto[]', $users, $release->mailto, "class='form-control chosen' data-placeholder='{$lang->chooseUsersToMail}' multiple");?>
</div>
</td>
</tr>
<tr>
<th><?php echo $lang->files;?></th>
<td colspan='2'><?php echo $this->fetch('file', 'buildform');?></td>
+12 -1
View File
@@ -85,7 +85,9 @@ class release extends control
$this->view->position[] = $this->lang->release->create;
$this->view->productID = $productID;
$this->view->builds = $builds;
$this->view->users = $this->loadModel('user')->getPairs('noletter|noclosed');
$this->view->lastRelease = $this->release->getLast($productID, $branch);
$this->display();
}
@@ -122,11 +124,20 @@ class release extends control
$this->commonAction($release->product, $release->branch);
$build = $this->build->getById($release->build);
$builds = $this->loadModel('build')->getProductBuildPairs($release->product, $release->branch, 'notrunk|withbranch', false);
$releaseBuilds = $this->release->getReleaseBuilds($release->product, $release->branch);
foreach($releaseBuilds as $releaseBuild)
{
if($releaseBuild != $build->id) unset($builds[$releaseBuild]);
}
unset($builds['trunk']);
$this->view->title = $this->view->product->name . $this->lang->colon . $this->lang->release->edit;
$this->view->position[] = $this->lang->release->edit;
$this->view->release = $release;
$this->view->build = $build;
$this->view->builds = $this->loadModel('build')->getProductBuildPairs($release->product, $release->branch, 'notrunk|withbranch', false);
$this->view->builds = $builds;
$this->view->users = $this->loadModel('user')->getPairs('noletter|noclosed');
$this->display();
}
+1
View File
@@ -0,0 +1 @@
.checkbox-primary {display: inline-block; margin-left: 10px;}
+1
View File
@@ -1,3 +1,4 @@
.table-form > tbody > tr > td > .row > [class*="col-"] .panel-heading {line-height: 16px;}
.contentDiv {height: 190px; overflow-y: auto; margin-bottom: 10px !important;}
.contentDiv .panel-heading {line-height: 14px;}
.checkbox-primary {display: inline-block; margin-left: 10px;}
+8
View File
@@ -56,6 +56,8 @@ $lang->release->createdBugs = 'Erstellte %s Bugs';
$lang->release->export = 'Export as HTML';
$lang->release->yesterday = 'Gestern veröffentlicht';
$lang->release->all = 'All';
$lang->release->notify = 'Notify';
$lang->release->mailto = 'Mailto';
$lang->release->filePath = 'Download : ';
$lang->release->scmPath = 'SCM Pfad : ';
@@ -74,3 +76,9 @@ $lang->release->changeStatusList['terminate'] = 'Terminiert';
$lang->release->action = new stdclass();
$lang->release->action->changestatus = array('main' => '$date, 由 <strong>$actor</strong> $extra。', 'extra' => 'changeStatusList');
$lang->release->notifyList['PO'] = "{$lang->productCommon} Owner";
$lang->release->notifyList['QD'] = 'QA Manager';
$lang->release->notifyList['SC'] = 'Story Creator';
$lang->release->notifyList['ET'] = "{$lang->execution->common} Team Members";
$lang->release->notifyList['PT'] = "Project Team Members";
+8
View File
@@ -56,6 +56,8 @@ $lang->release->createdBugs = 'Unresolved %s Bug';
$lang->release->export = 'Export as HTML';
$lang->release->yesterday = 'Released Yesterday';
$lang->release->all = 'All';
$lang->release->notify = 'Notify';
$lang->release->mailto = 'Mailto';
$lang->release->filePath = 'Download : ';
$lang->release->scmPath = 'SCM Path : ';
@@ -74,3 +76,9 @@ $lang->release->changeStatusList['terminate'] = 'Terminated';
$lang->release->action = new stdclass();
$lang->release->action->changestatus = array('main' => '$date, $extra by <strong>$actor</strong>', 'extra' => 'changeStatusList');
$lang->release->notifyList['PO'] = "{$lang->productCommon} Owner";
$lang->release->notifyList['QD'] = 'QA Manager';
$lang->release->notifyList['SC'] = 'Story Creator';
$lang->release->notifyList['ET'] = "{$lang->execution->common} Team Members";
$lang->release->notifyList['PT'] = "Project Team Members";
+8
View File
@@ -56,6 +56,8 @@ $lang->release->createdBugs = '%s Bugs non résolus';
$lang->release->export = 'Export HTML';
$lang->release->yesterday = 'Versionné Hier';
$lang->release->all = 'Tout';
$lang->release->notify = 'Notify';
$lang->release->mailto = 'Mailto';
$lang->release->filePath = 'Télecharger : ';
$lang->release->scmPath = 'SCM Path : ';
@@ -74,3 +76,9 @@ $lang->release->changeStatusList['terminate'] = 'Terminée';
$lang->release->action = new stdclass();
$lang->release->action->changestatus = array('main' => '$date, $extra par <strong>$actor</strong>', 'extra' => 'changeStatusList');
$lang->release->notifyList['PO'] = "{$lang->productCommon} Owner";
$lang->release->notifyList['QD'] = 'QA Manager';
$lang->release->notifyList['SC'] = 'Story Creator';
$lang->release->notifyList['ET'] = "{$lang->execution->common} Team Members";
$lang->release->notifyList['PT'] = "Project Team Members";
+8
View File
@@ -56,6 +56,8 @@ $lang->release->createdBugs = 'Bug %s chưa được giải quyết';
$lang->release->export = 'Xuất ra HTML';
$lang->release->yesterday = 'Phát hành hôm qua';
$lang->release->all = 'Tất cả';
$lang->release->notify = 'Notify';
$lang->release->mailto = 'Mailto';
$lang->release->filePath = 'Tải về : ';
$lang->release->scmPath = 'SCM Path : ';
@@ -74,3 +76,9 @@ $lang->release->changeStatusList['terminate'] = 'Hoàn thành';
$lang->release->action = new stdclass();
$lang->release->action->changestatus = array('main' => '$date, $extra bởi <strong>$actor</strong>', 'extra' => 'changeStatusList');
$lang->release->notifyList['PO'] = "{$lang->productCommon} Owner";
$lang->release->notifyList['QD'] = 'QA Manager';
$lang->release->notifyList['SC'] = 'Story Creator';
$lang->release->notifyList['ET'] = "{$lang->execution->common} Team Members";
$lang->release->notifyList['PT'] = "Project Team Members";
+8
View File
@@ -56,6 +56,8 @@ $lang->release->createdBugs = '本次共遗留 %s 个Bug';
$lang->release->export = '导出HTML';
$lang->release->yesterday = '昨日发布';
$lang->release->all = '所有';
$lang->release->notify = '通知人员';
$lang->release->mailto = '抄送给';
$lang->release->filePath = '下载地址:';
$lang->release->scmPath = '版本库地址:';
@@ -74,3 +76,9 @@ $lang->release->changeStatusList['terminate'] = '停止维护';
$lang->release->action = new stdclass();
$lang->release->action->changestatus = array('main' => '$date, 由 <strong>$actor</strong> $extra。', 'extra' => 'changeStatusList');
$lang->release->notifyList['PO'] = "{$lang->productCommon}负责人";
$lang->release->notifyList['QD'] = '测试负责人';
$lang->release->notifyList['SC'] = '需求提交人';
$lang->release->notifyList['ET'] = "所在{$lang->execution->common}团队成员";
$lang->release->notifyList['PT'] = "所在项目团队成员";
+158
View File
@@ -110,6 +110,7 @@ class releaseModel extends model
*/
public function create($productID, $branch = 0)
{
/* Init vars. */
$productID = (int)$productID;
$branch = (int)$branch;
$buildID = 0;
@@ -126,6 +127,8 @@ class releaseModel extends model
->setDefault('stories', '')
->join('stories', ',')
->join('bugs', ',')
->join('mailto', ',')
->join('notify', ',')
->setIF($this->post->build == false, 'build', $buildID)
->stripTags($this->config->release->editor->create['id'], $this->config->allowedTags)
->remove('allchecker,files,labels,uid')
@@ -216,16 +219,20 @@ class releaseModel extends model
*/
public function update($releaseID)
{
/* Init vars. */
$releaseID = (int)$releaseID;
$oldRelease = $this->dao->select('*')->from(TABLE_RELEASE)->where('id')->eq($releaseID)->fetch();
$branch = $this->dao->select('branch')->from(TABLE_BUILD)->where('id')->eq((int)$this->post->build)->fetch('branch');
$release = fixer::input('post')->stripTags($this->config->release->editor->edit['id'], $this->config->allowedTags)
->add('branch', (int)$branch)
->join('mailto', ',')
->join('notify', ',')
->setIF(!$this->post->marker, 'marker', 0)
->cleanInt('product')
->remove('files,labels,allchecker,uid')
->get();
$release = $this->loadModel('file')->processImgURL($release, $this->config->release->editor->edit['id'], $this->post->uid);
/* update release project and branch */
@@ -249,6 +256,67 @@ class releaseModel extends model
}
}
/**
* Get notify persons.
*
* @param string $notfiyList
* @param int $productID
* @param int $buildID
* @access public
* @return array
*/
public function getNotifyPersons($notifyList = '', $productID = 0, $buildID = 0)
{
if(empty($notifyList)) return array();
/* Init vars. */
$notifyPersons = array();
$managers = '';
$notifyList = explode($notifyList, ',');
foreach($notifyList as $notify)
{
if($notify == 'PO' or $notify == 'QD' or $notify == 'feedback')
{
$managers .= $notify . ',';
}
elseif($notify == 'SC' and !empty($buildID))
{
$stories = $this->dao->select('stories')->from(TABLE_BUILD)->where('id')->eq($buildID)->fetch('stories');
$stories = trim($stories, ',');
if(empty($stories)) continue;
$createUsers = $this->dao->select('openedBy')->from(TABLE_STORY)->where('id')->in($stories)->fetchPairs();
$notifyPersons += $createUsers;
}
elseif(($notify == 'ET' or $notify == 'PT') and !empty($buildID))
{
$type = $notify == 'ET' ? 'execution' : 'project';
$members = $this->dao->select('t2.account')->from(TABLE_BUILD)->alias('t1')
->leftJoin(TABLE_TEAM)->alias('t2')->on('t1.' . $type .'=t2.root')
->where('t2.type')->eq($type)
->fetchPairs();
if(empty($members)) continue;
$notifyPersons += $members;
}
}
if(!empty($managers))
{
$managers = trim($managers, ',');
$managerUsers = $this->dao->select($managers)->from(TABLE_PRODUCT)->where('id')->eq($productID)->fetch();
foreach($managerUsers as $account)
{
if(!isset($notifyPersons[$account])) $notifyPersons += array($account => $account);
}
}
return $notifyPersons;
}
/**
* Link stories
*
@@ -405,4 +473,94 @@ class releaseModel extends model
$this->dao->update(TABLE_RELEASE)->set('status')->eq($status)->where('id')->eq($releaseID)->exec();
return dao::isError();
}
/**
* Send mail.
*
* @param int $releaseID
* @param int $actionID
* @access public
* @return void
*/
public function sendmail($releaseID, $actionID)
{
$this->loadModel('mail');
$release = $this->getByID($releaseID);
$users = $this->loadModel('user')->getPairs('noletter');
/* Get action info. */
$action = $this->loadModel('action')->getById($actionID);
$history = $this->action->getHistory($actionID);
$action->history = isset($history[$actionID]) ? $history[$actionID] : array();
$action->appendLink = '';
/* Get mail content. */
$modulePath = $this->app->getModulePath($appName = '', 'release');
$oldcwd = getcwd();
$viewFile = $modulePath . 'view/sendmail.html.php';
chdir($modulePath . 'view');
if(file_exists($modulePath . 'ext/view/sendmail.html.php'))
{
$viewFile = $modulePath . 'ext/view/sendmail.html.php';
chdir($modulePath . 'ext/view');
}
ob_start();
include $viewFile;
foreach(glob($modulePath . 'ext/view/sendmail.*.html.hook.php') as $hookFile) include $hookFile;
$mailContent = ob_get_contents();
ob_end_clean();
chdir($oldcwd);
$sendUsers = $this->getToAndCcList($release);
if(!$sendUsers) return;
list($toList, $ccList) = $sendUsers;
$subject = 'RELEASE #' . $release->id . ' ' . $release->name;
/* Send it. */
$this->mail->send($toList, $subject, $mailContent, $ccList);
if($this->mail->isError()) error_log(join("\n", $this->mail->getError()));
}
/**
* Get toList and ccList.
*
* @param object $release
* @access public
* @return bool|array
*/
public function getToAndCcList($release)
{
/* Set toList and ccList. */
$toList = $this->app->user->account;
$ccList = $release->mailto . ',';
/* Get notifiy persons. */
$notifyPersons = array();
if(!empty($release->notify)) $notifyPersons = $this->getNotifyPersons($release->notify, $release->product, $release->build);
foreach($notifyPersons as $account)
{
if(strpos($ccList, ",{$account},") === false) $ccList .= $account . ',';
}
$ccList = trim($ccList, ',');
if(empty($toList))
{
if(empty($ccList)) return false;
if(strpos($ccList, ',') === false)
{
$toList = $ccList;
$ccList = '';
}
else
{
$commaPos = strpos($ccList, ',');
$toList = substr($ccList, 0, $commaPos);
$ccList = substr($ccList, $commaPos + 1);
}
}
return array($toList, $ccList);
}
}
+12
View File
@@ -49,6 +49,18 @@
<th><?php echo $lang->release->desc;?></th>
<td colspan='2'><?php echo html::textarea('desc', '', "rows='10' class='form-control kindeditor' hidefocus='true'");?></td>
</tr>
<tr>
<th><?php echo $lang->release->notify;?></th>
<td colspan='2'><?php echo html::checkbox('notify', $lang->release->notifyList);?></td>
</tr>
<tr>
<th><?php echo $lang->release->mailto;?></th>
<td colspan='2'>
<div class="input-group">
<?php echo html::select('mailto[]', $users, '', "class='form-control chosen' data-placeholder='{$lang->chooseUsersToMail}' multiple");?>
</div>
</td>
</tr>
<tr>
<th><?php echo $lang->files;?></th>
<td colspan='2'><?php echo $this->fetch('file', 'buildform');?></td>
+12
View File
@@ -52,6 +52,18 @@
<th><?php echo $lang->release->desc;?></th>
<td colspan='2'><?php echo html::textarea('desc', htmlspecialchars($release->desc), "rows=10 class='form-control kindeditor' hidefocus='true'");?></td>
</tr>
<tr>
<th><?php echo $lang->release->notify;?></th>
<td colspan='2'><?php echo html::checkbox('notify', $lang->release->notifyList, $release->notify);?></td>
</tr>
<tr>
<th><?php echo $lang->release->mailto;?></th>
<td colspan='2'>
<div class="input-group">
<?php echo html::select('mailto[]', $users, $release->mailto, "class='form-control chosen' data-placeholder='{$lang->chooseUsersToMail}' multiple");?>
</div>
</td>
</tr>
<tr>
<th><?php echo $lang->files;?></th>
<td colspan='2'><?php echo $this->fetch('file', 'buildform');?></td>
+35
View File
@@ -0,0 +1,35 @@
<?php
/**
* The mail file of release module of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Shujie Tian <tianshujie@easycorp.ltd>
* @package release
* @version $Id: sendmail.html.php 867 2021-08-12 13:37:58Z $
* @link http://www.zentao.net
*/
?>
<?php $mailTitle = 'RELEASE #' . $release->id . ' ' . $release->name;?>
<?php $module = $this->app->openApp == 'product' ? 'release' : 'projectrelease';?>
<?php include $this->app->getModuleRoot() . 'common/view/mail.header.html.php';?>
<tr>
<td>
<table cellpadding='0' cellspacing='0' width='600' style='border: none; border-collapse: collapse;'>
<tr>
<td style='padding: 10px; background-color: #F8FAFE; border: none; font-size: 14px; font-weight: 500; border-bottom: 1px solid #e5e5e5;'>
<?php echo html::a(zget($this->config->mail, 'domain', common::getSysURL()) . helper::createLink($module, 'view', "releaseID=$release->id", 'html'), $mailTitle, '', "text-decoration: underline;'");?>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td style='padding: 10px; border: none;'>
<fieldset style='border: 1px solid #e5e5e5'>
<legend style='color: #114f8e'><?php echo $this->lang->release->desc;?></legend>
<div style='padding:5px;'><?php echo $release->desc;?></div>
</fieldset>
</td>
</tr>
<?php include $this->app->getModuleRoot() . 'common/view/mail.footer.html.php';?>
@@ -1,6 +1,7 @@
<?php
$config->message->available['xuanxuan']['story'] = $config->message->objectTypes['story'];
$config->message->available['xuanxuan']['task'] = $config->message->objectTypes['task'];
$config->message->available['xuanxuan']['bug'] = $config->message->objectTypes['bug'];
$config->message->available['xuanxuan']['todo'] = $config->message->objectTypes['todo'];
$config->message->setting['xuanxuan']['setting'] = $config->message->available['xuanxuan'];
$config->message->available['xuanxuan']['story'] = $config->message->objectTypes['story'];
$config->message->available['xuanxuan']['task'] = $config->message->objectTypes['task'];
$config->message->available['xuanxuan']['bug'] = $config->message->objectTypes['bug'];
$config->message->available['xuanxuan']['todo'] = $config->message->objectTypes['todo'];
$config->message->available['xuanxuan']['release'] = $config->message->objectTypes['release'];
$config->message->setting['xuanxuan']['setting'] = $config->message->available['xuanxuan'];