* Finish task #54391.
This commit is contained in:
@@ -162,7 +162,7 @@ $lang->action->desc->hidden = '$date, hidden by <strong>$actor</st
|
||||
$lang->action->desc->commented = '$date, added by <strong>$actor</strong>.' . "\n";
|
||||
$lang->action->desc->activated = '$date, activated by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->blocked = '$date, blocked by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->moved = '$date, moved by <strong>$actor</strong> , which was "$extra".' . "\n";
|
||||
$lang->action->desc->moved = '$date, moved by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->confirmed = '$date, <strong>$actor</strong> confirmed the story change. The latest build is <strong>#$extra</strong>.' . "\n";
|
||||
$lang->action->desc->caseconfirmed = '$date, <strong>$actor</strong> confirmed the case change. The latest build is <strong>#$extra</strong>' . "\n";
|
||||
$lang->action->desc->bugconfirmed = '$date, <strong>$actor</strong> confirmed Bug.' . "\n";
|
||||
|
||||
@@ -162,7 +162,7 @@ $lang->action->desc->hidden = '$date, 由 <strong>$actor</strong>
|
||||
$lang->action->desc->commented = '$date, 由 <strong>$actor</strong> 添加备注。' . "\n";
|
||||
$lang->action->desc->activated = '$date, 由 <strong>$actor</strong> 激活。' . "\n";
|
||||
$lang->action->desc->blocked = '$date, 由 <strong>$actor</strong> 阻塞。' . "\n";
|
||||
$lang->action->desc->moved = '$date, 由 <strong>$actor</strong> 移动,之前为 "$extra"。' . "\n";
|
||||
$lang->action->desc->moved = '$date, 由 <strong>$actor</strong> 移动。' . "\n";
|
||||
$lang->action->desc->confirmed = '$date, 由 <strong>$actor</strong> 确认' . $lang->SRCommon . '变动,最新版本为<strong>#$extra</strong>。' . "\n";
|
||||
$lang->action->desc->caseconfirmed = '$date, 由 <strong>$actor</strong> 确认用例变动,最新版本为<strong>#$extra</strong>。' . "\n";
|
||||
$lang->action->desc->bugconfirmed = '$date, 由 <strong>$actor</strong> 确认Bug。' . "\n";
|
||||
|
||||
@@ -975,6 +975,9 @@ class kanban extends control
|
||||
{
|
||||
$this->kanban->moveCard($cardID, $fromColID, $toColID, $fromLaneID, $toLaneID, $kanbanID);
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
|
||||
$this->loadModel('action')->create('kanbanCard', $cardID, 'moved');
|
||||
|
||||
$kanbanGroup = $this->kanban->getKanbanData($kanbanID);
|
||||
echo json_encode($kanbanGroup);
|
||||
}
|
||||
@@ -1388,11 +1391,15 @@ class kanban extends control
|
||||
}
|
||||
else
|
||||
{
|
||||
if($card->fromType == '') $this->kanban->delete(TABLE_KANBANCARD, $cardID);
|
||||
if($card->fromType == '')
|
||||
{
|
||||
$this->kanban->delete(TABLE_KANBANCARD, $cardID);
|
||||
$this->loadModel('action')->create('kanbancard', $cardID, 'Deleted', '', $cardID);
|
||||
}
|
||||
|
||||
if($card->fromType != '')
|
||||
{
|
||||
$this->dao->delete()->from(TABLE_KANBANCARD)->where('id')->eq($cardID)->exec();
|
||||
$this->loadModel('action')->create('kanbancard', $cardID, 'Deleted', '', $cardID);
|
||||
}
|
||||
|
||||
if(isonlybody()) return print(js::reload('parent.parent'));
|
||||
|
||||
@@ -334,6 +334,7 @@ $lang->kanbancard->delete = 'Delete';
|
||||
$lang->kanbancard->name = 'Card Name';
|
||||
$lang->kanbancard->legendBasicInfo = 'Basic Info';
|
||||
$lang->kanbancard->legendLifeTime = 'Card Life';
|
||||
$lang->kanbancard->legendDesc = 'Card Description';
|
||||
$lang->kanbancard->space = 'Space';
|
||||
$lang->kanbancard->region = 'Region';
|
||||
$lang->kanbancard->kanban = 'Kanban';
|
||||
|
||||
@@ -334,6 +334,7 @@ $lang->kanbancard->delete = '删除';
|
||||
$lang->kanbancard->name = '卡片名称';
|
||||
$lang->kanbancard->legendBasicInfo = '基本信息';
|
||||
$lang->kanbancard->legendLifeTime = '卡片的一生';
|
||||
$lang->kanbancard->legendDesc = '卡片描述';
|
||||
$lang->kanbancard->space = '所属空间';
|
||||
$lang->kanbancard->region = '所属区域';
|
||||
$lang->kanbancard->kanban = '所属看板';
|
||||
|
||||
@@ -3572,6 +3572,42 @@ class kanbanModel extends model
|
||||
return $menus;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get toList and ccList.
|
||||
*
|
||||
* @param object $card
|
||||
* @access public
|
||||
* @return bool|array
|
||||
*/
|
||||
public function getToAndCcList($card)
|
||||
{
|
||||
/* Set toList and ccList. */
|
||||
$toList = $card->createdBy;
|
||||
$ccList = trim($card->assignedTo, ',');
|
||||
if(strpos(",$ccList,", ",$card->createdBy,") === false)
|
||||
{
|
||||
$ccList .= ",$card->createdBy";
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if user can execute an action.
|
||||
*
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/**
|
||||
* The mail file of kanban module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2022 青岛易软天创网络科技有限公司(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 kanban
|
||||
* @version $Id: sendmail.html.php 867 2022-05-17 13:50:58Z $
|
||||
* @link https://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php $mailTitle = 'CARD #' . $object->id . ' ' . $object->name;?>
|
||||
<?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($domain . helper::createLink('kanban', 'view', "kanbanID=$object->kanban", 'html'), $mailTitle, '', "style='color: #333; 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->kanbancard->legendDesc;?></legend>
|
||||
<div style='padding:5px;'><?php echo $object->desc;?></div>
|
||||
</fieldset>
|
||||
</td>
|
||||
</tr>
|
||||
<?php include $this->app->getModuleRoot() . 'common/view/mail.footer.html.php';?>
|
||||
@@ -691,7 +691,7 @@ class mailModel extends model
|
||||
$action = $this->action->getById($actionID);
|
||||
$history = $this->action->getHistory($actionID);
|
||||
$objectType = $action->objectType;
|
||||
$object = $this->loadModel($objectType)->getByID($objectID);
|
||||
$object = $objectType == 'kanbancard' ? $this->loadModel('kanban')->getCardByID($objectID) : $this->loadModel($objectType)->getByID($objectID);
|
||||
$nameFields = $this->config->action->objectNameFields[$objectType];
|
||||
$title = zget($object, $nameFields, '');
|
||||
$subject = $this->getSubject($objectType, $object, $title, $action->action);
|
||||
@@ -726,6 +726,8 @@ class mailModel extends model
|
||||
if($objectType == 'review') $this->app->loadLang('baseline');
|
||||
|
||||
/* Get mail content. */
|
||||
if($objectType == 'kanbancard') $objectType = 'kanban';
|
||||
|
||||
$modulePath = $this->app->getModulePath($appName = '', $objectType);
|
||||
$oldcwd = getcwd();
|
||||
$viewFile = $modulePath . 'view/sendmail.html.php';
|
||||
|
||||
+14
-11
@@ -10,22 +10,25 @@ $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['kanbancard'] = array('created', 'edited', 'finished', 'activated', 'archived', 'restore', 'deleted', 'moved');
|
||||
|
||||
$config->message->available = array();
|
||||
$config->message->available['mail']['story'] = $config->message->objectTypes['story'];
|
||||
$config->message->available['mail']['task'] = $config->message->objectTypes['task'];
|
||||
$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']['story'] = $config->message->objectTypes['story'];
|
||||
$config->message->available['mail']['task'] = $config->message->objectTypes['task'];
|
||||
$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']['kanbancard'] = $config->message->objectTypes['kanbancard'];
|
||||
|
||||
$config->message->available['webhook'] = $config->message->objectTypes;
|
||||
|
||||
$config->message->available['message']['bug'] = $config->message->objectTypes['bug'];
|
||||
$config->message->available['message']['story'] = $config->message->objectTypes['story'];
|
||||
$config->message->available['message']['task'] = $config->message->objectTypes['task'];
|
||||
$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']['bug'] = $config->message->objectTypes['bug'];
|
||||
$config->message->available['message']['story'] = $config->message->objectTypes['story'];
|
||||
$config->message->available['message']['task'] = $config->message->objectTypes['task'];
|
||||
$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']['kanbancard'] = $config->message->objectTypes['kanbancard'];
|
||||
|
||||
$config->message->typeLink = array();
|
||||
$config->message->typeLink['mail'] = 'mail|index';
|
||||
|
||||
@@ -2,5 +2,3 @@
|
||||
.checkbox-primary {margin: 0px; width: 120px; float: left;}
|
||||
.checkbox-primary label {white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}
|
||||
div.chosen-container + select + div.chosen-container > .chosen-choices {border-top: 0px;}
|
||||
|
||||
.table-bordered thead .checkbox-primary {width: 200px;}
|
||||
|
||||
@@ -44,3 +44,6 @@ $lang->message->label->blocked = 'block';
|
||||
$lang->message->label->bugconfirmed = 'confirm';
|
||||
$lang->message->label->compilepass = 'compile pass';
|
||||
$lang->message->label->compilefail = 'compile fail';
|
||||
$lang->message->label->archived = 'archive';
|
||||
$lang->message->label->restore = 'restore';
|
||||
$lang->message->label->moved = 'move';
|
||||
|
||||
@@ -44,3 +44,6 @@ $lang->message->label->blocked = '阻塞';
|
||||
$lang->message->label->bugconfirmed = '确认';
|
||||
$lang->message->label->compilepass = '构建通过';
|
||||
$lang->message->label->compilefail = '构建失败';
|
||||
$lang->message->label->archived = '归档';
|
||||
$lang->message->label->restore = '还原';
|
||||
$lang->message->label->moved = '移动';
|
||||
|
||||
@@ -64,6 +64,7 @@ class messageModel extends model
|
||||
*/
|
||||
public function send($objectType, $objectID, $actionType, $actionID, $actor = '')
|
||||
{
|
||||
$objectType = strtolower($objectType);
|
||||
$messageSetting = $this->config->message->setting;
|
||||
if(is_string($messageSetting)) $messageSetting = json_decode($messageSetting, true);
|
||||
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
<?php
|
||||
$config->message->objectTypes['mr'] = array('compilepass', 'compilefail');
|
||||
|
||||
$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']['mr'] = $config->message->objectTypes['mr'];
|
||||
$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']['mr'] = $config->message->objectTypes['mr'];
|
||||
$config->message->available['xuanxuan']['kanbancard'] = $config->message->objectTypes['kanbancard'];
|
||||
|
||||
$config->message->setting['xuanxuan']['setting'] = $config->message->available['xuanxuan'];
|
||||
|
||||
Reference in New Issue
Block a user