/** * send mail message after action * * @author youzhao.zxw<*****@*****.**> * @param int $infoId info id * @param string $infoType bug,case or result * @param int $actionId action id * @param string $repeatStep repeat step * @param string $replyNote reply note * @return */ private static function sendMessage($infoId, $infoType, $actionId, $repeatStep = '', $replyNote = '') { $className = ucfirst(strtolower($infoType)) . 'Info'; $targetModel = new $className(); $basicInfo = $targetModel->model()->findByPk($infoId); list($mailMsg, $wangwangMsg) = self::getMessageContent($basicInfo, $infoType, $actionId, $repeatStep, $replyNote); $assignToEmail = ''; $wangwang = ''; if (!empty($basicInfo->assign_to)) { if (Yii::app()->user->id != $basicInfo->assign_to) { $assignUserInfo = TestUser::model()->findByPk($basicInfo->assign_to); $assignToEmail = self::getUserEmail($assignUserInfo); $wangwang = self::getWangwang($assignUserInfo); } } $ccArr = self::getCCList($basicInfo, $assignToEmail); MailService::sysMail($assignToEmail, $ccArr, ucfirst(strtolower($infoType)) . ' #' . $infoId . ' ' . CommonService::sysSubStr($basicInfo['title'], 150, true), $mailMsg); }
echo $bugInfo['severity']; ?> </td> <td align="center"><?php echo $bugInfo['priority']; ?> </td> <td title="<?php echo $bugInfo['title']; ?> "> <a target="_blank" href="<?php echo Yii::app()->createAbsoluteUrl('info/edit', array('type' => Info::TYPE_BUG, 'id' => $bugInfo['id'])); ?> "><?php echo CommonService::sysSubStr($bugInfo['title'], 50, true); ?> </a> </td> <td align="center"><?php echo $bugInfo['bug_status']; ?> </td> <td align="center"><?php echo $bugInfo['created_by_name']; ?> </td> <td align="center"><?php echo $bugInfo['assign_to_name']; ?> </td>
public static function getTitleLink($infoType, $columnName, $value) { $title = CommonService::sysSubStr($value[$columnName], 50, true); return '<span class="title"><a href="' . Yii::app()->createUrl('info/edit', array('type' => $infoType, 'id' => $value['id'])) . '" target="_blank" title="' . CHtml::encode($value[$columnName]) . '">' . CHtml::encode($title) . '</a></span>'; }