mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
#17596607 : added a feature managing issues (change milestone, component, and etc.)
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5315 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
dbe08ac9aa
commit
04f980fca4
14 changed files with 220 additions and 19 deletions
|
|
@ -84,6 +84,7 @@
|
|||
<action name="dispIssuetrackerAdminModifyPackage" type="view" standalone="true" />
|
||||
<action name="dispIssuetrackerAdminModifyRelease" type="view" standalone="true" />
|
||||
<action name="dispIssuetrackerAdminAttachRelease" type="view" standalone="true" />
|
||||
<action name="dispIssuetrackerAdminManageDocument" type="view" standalone="true" />
|
||||
|
||||
<action name="procIssuetrackerAdminInsertProject" type="controller" standalone="true" />
|
||||
<action name="procIssuetrackerAdminInsertMilestone" type="controller" standalone="true" />
|
||||
|
|
@ -103,6 +104,7 @@
|
|||
<action name="procIssuetrackerAdminAttachRelease" type="controller" standalone="true" />
|
||||
<action name="procIssuetrackerAdminInsertGrant" type="controller" standalone="true" />
|
||||
<action name="procIssuetrackerAdminUpdateSkinInfo" type="controller" standalone="true" />
|
||||
<action name="procIssuetrackerAdminManageCheckedIssue" type="controller" standalone="true" />
|
||||
|
||||
</actions>
|
||||
</module>
|
||||
|
|
|
|||
|
|
@ -452,6 +452,31 @@
|
|||
$this->setTemplateFile("top_refresh.html");
|
||||
}
|
||||
|
||||
function procIssuetrackerAdminManageCheckedIssue() {
|
||||
$module_srl = Context::get('module_srl');
|
||||
$cart = Context::get('cart');
|
||||
if($cart) $document_srl_list = explode('|@|', $cart);
|
||||
else $document_srl_list = array();
|
||||
|
||||
$document_srl_count = count($document_srl_list);
|
||||
$objs = Context::gets('priority_srl', 'component_srl', 'type_srl', 'milestone_srl');
|
||||
$oController = &getController('issuetracker');
|
||||
foreach($document_srl_list as $target_srl)
|
||||
{
|
||||
$output = $oController->insertHistory($target_srl, $objs, $module_srl, true);
|
||||
if(!$output->toBool())
|
||||
{
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
|
||||
$_SESSION['document_management'] = array();
|
||||
|
||||
$this->setMessage('success_updated');
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -302,5 +302,39 @@
|
|||
$this->setTemplateFile('issuetracker_delete');
|
||||
}
|
||||
|
||||
function dispIssuetrackerAdminManageDocument() {
|
||||
// 선택한 목록을 세션에서 가져옴
|
||||
$flag_list = $_SESSION['document_management'];
|
||||
if(count($flag_list)) {
|
||||
foreach($flag_list as $key => $val) {
|
||||
if(!is_bool($val)) continue;
|
||||
$document_srl_list[] = $key;
|
||||
}
|
||||
}
|
||||
|
||||
if(count($document_srl_list)) {
|
||||
$oDocumentModel = &getModel('document');
|
||||
$document_list = $oDocumentModel->getDocuments($document_srl_list, $this->grant->is_admin);
|
||||
Context::set('document_list', $document_list);
|
||||
}
|
||||
|
||||
$module_srl = $this->module_info->module_srl;
|
||||
Context::set('module_srl', $module_srl);
|
||||
|
||||
$oIssuetrackerModel = &getModel('issuetracker');
|
||||
$project = null;
|
||||
$project->priorities = $oIssuetrackerModel->getList($module_srl, "Priorities");
|
||||
$project->components = $oIssuetrackerModel->getList($module_srl, "Components");
|
||||
$project->milestones = $oIssuetrackerModel->getList($module_srl, "Milestones");
|
||||
$project->types = $oIssuetrackerModel->getList($module_srl, "Types");
|
||||
Context::set('project', $project);
|
||||
|
||||
// 팝업 레이아웃 선택
|
||||
$this->setLayoutPath('./common/tpl');
|
||||
$this->setLayoutFile('popup_layout');
|
||||
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('checked_list');
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -125,19 +125,16 @@
|
|||
$this->setMessage('success_deleted');
|
||||
}
|
||||
|
||||
function procIssuetrackerInsertHistory() {
|
||||
// 권한 체크
|
||||
if(!$this->grant->ticket_write && !$this->grant->commiter) return new Object(-1, 'msg_not_permitted');
|
||||
|
||||
// 원 이슈를 가져옴
|
||||
$target_srl = Context::get('target_srl');
|
||||
function insertHistory($target_srl, $objs, $module_srl, $grant)
|
||||
{
|
||||
$oIssuetrackerModel = &getModel('issuetracker');
|
||||
$oIssue = $oIssuetrackerModel->getIssue($target_srl);
|
||||
if(!$oIssue->isExists()) return new Object(-1,'msg_not_founded');
|
||||
|
||||
// 로그인 정보
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
||||
$args = null;
|
||||
|
||||
// 글작성시 필요한 변수를 세팅
|
||||
$args->target_srl = $target_srl;
|
||||
$args->content = Context::get('content');
|
||||
|
|
@ -150,18 +147,18 @@
|
|||
}
|
||||
|
||||
// 커미터일 경우 각종 상태 변경값을 받아서 이슈의 상태를 변경하고 히스토리 생성
|
||||
if($this->grant->commiter) {
|
||||
$milestone_srl = Context::get('milestone_srl');
|
||||
$priority_srl = Context::get('priority_srl');
|
||||
$type_srl = Context::get('type_srl');
|
||||
$component_srl = Context::get('component_srl');
|
||||
$package_srl = Context::get('package_srl');
|
||||
$occured_version_srl = Context::get('occured_version_srl');
|
||||
$action = Context::get('action');
|
||||
$status = Context::get('status');
|
||||
$assignee_srl = Context::get('assignee_srl');
|
||||
if($grant) {
|
||||
$milestone_srl = $objs->milestone_srl;
|
||||
$priority_srl = $objs->priority_srl;
|
||||
$type_srl = $objs->type_srl;
|
||||
$component_srl = $objs->component_srl;
|
||||
$package_srl = $objs->package_srl;
|
||||
$occured_version_srl = $objs->occured_version_srl;
|
||||
$action = $objs->action;
|
||||
$status = $objs->status;
|
||||
$assignee_srl = $objs->assignee_srl;
|
||||
|
||||
$project = $oIssuetrackerModel->getProjectInfo($this->module_srl);
|
||||
$project = $oIssuetrackerModel->getProjectInfo($module_srl);
|
||||
$history = array();
|
||||
$change_args = null;
|
||||
|
||||
|
|
@ -326,7 +323,7 @@
|
|||
}
|
||||
}
|
||||
$args->issues_history_srl = getNextSequence();
|
||||
$args->module_srl = $this->module_srl;
|
||||
$args->module_srl = $module_srl;
|
||||
|
||||
$output = executeQueryArray('issuetracker.insertHistory', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
|
@ -335,6 +332,21 @@
|
|||
$cnt = $oIssuetrackerModel->getHistoryCount($target_srl);
|
||||
$oDocumentController = &getController('document');
|
||||
$oDocumentController->updateCommentCount($target_srl, $cnt, $logged_info->member_srl);
|
||||
return new Object();
|
||||
}
|
||||
|
||||
function procIssuetrackerInsertHistory() {
|
||||
// 권한 체크
|
||||
if(!$this->grant->ticket_write && !$this->grant->commiter) return new Object(-1, 'msg_not_permitted');
|
||||
|
||||
// 원 이슈를 가져옴
|
||||
$target_srl = Context::get('target_srl');
|
||||
$args = Context::gets('milestone_srl', 'priority_srl', 'type_srl', 'component_srl', 'package_srl', 'occured_version_srl', 'action', 'status', 'assignee_srl');
|
||||
$output = $this->insertHistory($target_srl, $args, $this->module_srl, $this->grant->commiter);
|
||||
if(!$output->toBool())
|
||||
{
|
||||
return $output;
|
||||
}
|
||||
|
||||
$this->add('document_srl', $target_srl);
|
||||
$this->add('mid', $this->module_info->mid);
|
||||
|
|
|
|||
|
|
@ -98,4 +98,5 @@
|
|||
'changed' => 'changed',
|
||||
'created' => 'created'
|
||||
);
|
||||
$lang->cmd_manage_issue = 'Manage issues';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -98,4 +98,5 @@
|
|||
'changed' => '変更',
|
||||
'created' => '作成'
|
||||
);
|
||||
$lang->cmd_manage_issue = 'Manage issues';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -98,4 +98,6 @@
|
|||
'changed' => '변경',
|
||||
'created' => '생성'
|
||||
);
|
||||
|
||||
$lang->cmd_manage_issue = '이슈 관리';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -81,6 +81,7 @@
|
|||
'dispIssuetrackerViewIssue' => '查看问题',
|
||||
'dispIssuetrackerNewIssue' => '提交问题',
|
||||
'dispIssuetrackerViewMilestone' => '开发计划',
|
||||
'dispIssuetrackerTimeline' => 'Timeline',
|
||||
'dispIssuetrackerViewSource' => '查看代码',
|
||||
'dispIssuetrackerDownload' => '下载',
|
||||
'dispIssuetrackerAdminProjectSetting' => '设置',
|
||||
|
|
@ -93,4 +94,9 @@
|
|||
$lang->cmd_document_do = '将吧此问题.. ';
|
||||
$lang->not_assigned = '没有分配';
|
||||
$lang->not_assigned_description = '没被分配的问题目录';
|
||||
$lang->timeline_msg = array(
|
||||
'changed' => 'changed',
|
||||
'created' => 'created'
|
||||
);
|
||||
$lang->cmd_manage_issue = 'Manage issues';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -94,4 +94,9 @@
|
|||
$lang->cmd_document_do = '將此問題.. ';
|
||||
$lang->not_assigned = '尚未分配';
|
||||
$lang->not_assigned_description = '尚未被分配的問題清單';
|
||||
$lang->timeline_msg = array(
|
||||
'changed' => 'changed',
|
||||
'created' => 'created'
|
||||
);
|
||||
$lang->cmd_manage_issue = 'Manage issues';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -178,6 +178,7 @@
|
|||
<!--@if($grant->is_admin)-->
|
||||
<div class="fr gap1">
|
||||
<a href="{getUrl('','module','document','act','dispDocumentAdminManageDocument')}" onclick="popopen(this.href,'manageDocument'); return false;" class="button"><span>{$lang->cmd_manage_document}</span></a>
|
||||
<a href="{getUrl('act','dispIssuetrackerAdminManageDocument')}" onclick="popopen(this.href,'manageDocument'); return false;" class="button"><span>{$lang->cmd_manage_issue}</span></a>
|
||||
</div>
|
||||
<!--@end-->
|
||||
|
||||
|
|
|
|||
84
modules/issuetracker/tpl/checked_list.html
Normal file
84
modules/issuetracker/tpl/checked_list.html
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
<!--%import("filter/manage_checked_issue.xml")-->
|
||||
<!--%import("js/issue_admin.js")-->
|
||||
<!--%import("css/issuetracker.css")-->
|
||||
<div id="popHeadder">
|
||||
<h3>{$lang->cmd_manage_document}</h3>
|
||||
</div>
|
||||
|
||||
<form action="./" method="get" id="fo_management">
|
||||
<input type="hidden" name="type" value="" />
|
||||
<input type="hidden" name="module_srl" value="{$module_srl}" />
|
||||
|
||||
<div id="popBody">
|
||||
<table cellspacing="0" class="adminTable">
|
||||
<tr>
|
||||
<th scope="row"><div><label for="textfield1">{$lang->checked_count} ({count($document_list)})</label></div></th>
|
||||
<td colspan="3">
|
||||
<!--@if(count($document_list))-->
|
||||
<input type="checkbox" onclick="XE.checkboxToggleAll()" checked="checked"/> {$lang->cmd_select}
|
||||
<ul class="document_list_box">
|
||||
<!--@foreach($document_list as $key => $document)-->
|
||||
<li class="document_list"><input type="checkbox" checked="checked" name="cart" value="{$document->document_srl}" onclick="doAddDocumentCart(this);"/> <address>{$document->getNickName()}</address> <span class="document_title">{$document->getTitle()}</span></li>
|
||||
<!--@end-->
|
||||
</ul>
|
||||
<!--@else-->
|
||||
|
||||
<!--@end-->
|
||||
</td>
|
||||
</tr>
|
||||
<!--@if(count($document_list))-->
|
||||
<tr>
|
||||
<th scope="row"><label for="inputMilestone">{$lang->milestone} :</label></th>
|
||||
<td>
|
||||
<select name="milestone_srl" id="inputMilestone">
|
||||
<option value="0">{$lang->milestone}</option>
|
||||
<!--@foreach($project->milestones as $val)-->
|
||||
<option value="{$val->milestone_srl}">{$val->title}</option>
|
||||
<!--@end-->
|
||||
</select>
|
||||
</td>
|
||||
<th scope="row"><div><label for="inputPriority">{$lang->priority} :</label></div></th>
|
||||
<td>
|
||||
<select name="priority_srl" id="inputPriority">
|
||||
<option value="">{$lang->priority}</option>
|
||||
<!--@foreach($project->priorities as $key => $val)-->
|
||||
<option value="{$val->priority_srl}">{$val->title}</option>
|
||||
<!--@end-->
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="inputType">{$lang->type} :</label></th>
|
||||
<td>
|
||||
<select name="type_srl" id="inputType">
|
||||
<option value="">{$lang->type}</option>
|
||||
<!--@foreach($project->types as $key => $val)-->
|
||||
<option value="{$val->type_srl}">{$val->title}</option>
|
||||
<!--@end-->
|
||||
</select>
|
||||
</td>
|
||||
<th><div><label for="inputComponent">{$lang->component} :</label></div></th>
|
||||
<td>
|
||||
<select name="component_srl" id="inputComponent">
|
||||
<option value="">{$lang->component}</option>
|
||||
<!--@foreach($project->components as $key => $val)-->
|
||||
<option value="{$val->component_srl}">{$val->title}</option>
|
||||
<!--@end-->
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="popFooter">
|
||||
<div class="tRight gap1">
|
||||
<!--@if(count($document_list))-->
|
||||
|
||||
<a href="#" onclick="doManageIssue();return false;" class="button blue"><span>{$lang->cmd_modify}</span></a>
|
||||
<!--@end-->
|
||||
<a href="#" onclick="window.close(); return false;" class="button black"><span>{$lang->cmd_close}</span></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
|
@ -22,3 +22,12 @@ img.btnDelete { vertical-align:middle; }
|
|||
|
||||
td.filename { background-color:#EFEFEF; }
|
||||
td.filename a { font-weight:bold;}
|
||||
|
||||
ul.document_list_box { margin:0; padding:0; list-style:none; }
|
||||
.document_list_box { height:230px; overflow-y:scroll; overflow-x:hidden;}
|
||||
.document_list { margin-top:.5em; overflow:hidden; white-space:nowrap; clear:both;}
|
||||
.document_list input { float:left; margin-right:10px; }
|
||||
.document_list address { float:left; width:100px; margin-right:10px; overflow:hidden; white-space:nowrap;}
|
||||
.document_list .document_title { }
|
||||
|
||||
#popbody .adminTable tr th { width: 200px; }
|
||||
|
|
|
|||
7
modules/issuetracker/tpl/filter/manage_checked_issue.xml
Normal file
7
modules/issuetracker/tpl/filter/manage_checked_issue.xml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<filter name="manage_checked_issue" module="issuetracker" act="procIssuetrackerAdminManageCheckedIssue">
|
||||
<form />
|
||||
<response callback_func="completeManageIssue">
|
||||
<tag name="error" />
|
||||
<tag name="message" />
|
||||
</response>
|
||||
</filter>
|
||||
|
|
@ -4,6 +4,18 @@
|
|||
* @brief 관리자용 javascript
|
||||
**/
|
||||
|
||||
function doManageIssue() {
|
||||
var fo_obj = jQuery("#fo_management").get(0);
|
||||
|
||||
procFilter(fo_obj, manage_checked_issue);
|
||||
}
|
||||
|
||||
function completeManageIssue(ret_obj) {
|
||||
if(opener) opener.window.location.reload();
|
||||
alert(ret_obj['message']);
|
||||
window.close();
|
||||
}
|
||||
|
||||
/* 모듈 생성 후 */
|
||||
function completeInsertProject(ret_obj) {
|
||||
var error = ret_obj['error'];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue