issue status 변경 추가

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4861 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
haneul 2008-11-15 06:32:10 +00:00
parent f132c7db7d
commit c3cb299b6f
7 changed files with 64 additions and 10 deletions

View file

@ -55,7 +55,6 @@
<action name="dispIssuetrackerDownload" type="view" standalone="true" />
<actino name="dispIssuetrackerTimeline" type="view" standalone="true" />
<action name="procIssuetrackerSync" type="controller" standalone="true" />
<action name="procIssuetrackerInsertIssue" type="controller" standalone="true" />
<action name="procIssuetrackerDeleteIssue" type="controller" standalone="true" />
<action name="procIssuetrackerDeleteTrackback" type="controller" standalone="true" />

View file

@ -395,10 +395,5 @@
}
}
function procIssuetrackerSync()
{
$this->syncChangeset();
}
}
?>

View file

@ -7,6 +7,13 @@
require_once(_XE_PATH_.'modules/issuetracker/issuetracker.item.php');
function _compare($a, $b)
{
if(!$a->date || !$b->date) return 0;
return strcmp($a->date, $b->date) * -1;
}
class issuetrackerModel extends issuetracker {
var $oSvn = null;
@ -360,6 +367,7 @@
else return 0;
}
function getChangesets($module_srl, $enddate = null, $limit = 90)
{
if(!$enddate)
@ -375,10 +383,37 @@
debugPrint($output);
return array();
}
else
$solvedHistory = array();
$output2 = executeQueryArray("issuetracker.getHistories", $args);
foreach($output2->data as $history)
{
return $output->data;
$hist = unserialize($history->history);
$h = array();
if(!is_array($hist)) continue;
$res = "";
$bFirst = true;
foreach($hist as $key => $val) {
if($bFirst) { $bFirst = false; }
else { $res .= "<br />"; }
if($val[0]) $str = Context::getLang('history_format');
else $str = Context::getLang('history_format_not_source');
$str = str_replace('[source]', $val[0], $str);
$str = str_replace('[target]', $val[1], $str);
$str = str_replace('[key]', Context::getLang($key), $str);
$res .= $str;
}
$obj = null;
$obj->date = $history->regdate;
$obj->type = "i";
$obj->message = $res;
$obj->target_srl = $history->target_srl;
$obj->author = $history->nick_name;
$output->data[] = $obj;
}
usort($output->data, _compare);
return $output->data;
}
}
?>

View file

@ -69,9 +69,21 @@
function dispIssuetrackerTimeline() {
if(!$this->grant->access) return $this->dispIssuetrackerMessage('msg_not_permitted');
$oController = &getController('issuetracker');
$oController->syncChangeset();
$oModel = &getModel('issuetracker');
$changesets = $oModel->getChangesets($this->module_info->module_srl);
Context::set('changesets', $changesets);
$issues = array();
foreach($changesets as $changeset)
{
if(!$changeset->target_srl) continue;
if(!$issues[$changeset->target_srl])
{
$issues[$changeset->target_srl] = $oModel->getIssue($changeset->target_srl);
}
}
Context::set('issues', $issues);
$this->setTemplateFile('timeline');
}

View file

@ -7,6 +7,9 @@
</columns>
<conditions>
<condition operation="equal" column="target_srl" var="target_srl" />
<condition operation="equal" column="module_srl" var="module_srl" pipe="and" />
<condition operation="below" column="regdate" var="enddate" pipe="and" />
<condition operation="more" column="regdate" var="startdate" pipe="and" />
</conditions>
<navigation>
<index var="sort_index" default="issues_history_srl" order="asc" />

View file

@ -273,3 +273,8 @@ dd { color: #777766; font-size: 0.90em; }
dl { line-height: 1.3em; margin: 0; }
dt { padding: 5px 4px 2px 0 }
dd.changeset p { margin: 0; padding: 0; }
span.status { color: #222222; }
dd span.source { color:#4F86B0; }
dd span.target { color:#4F86B0; font-weight:bold; }
dd span.key { color:#888888; font-weight:bold; }
dt a { color:#373737; text-decoration: none; }

View file

@ -13,8 +13,13 @@
<!--@end-->
<dt class="changeset">
<span class="time">{zdate($changeset->date,"H:i")}</span>
Changeset <em>[{$changeset->revision}]</em> by <span class="author">{$changeset->author}</span>
<!--@if($changeset->type == "i")-->
<a href="{getUrl('','document_srl',$changeset->target_srl)}">Issue <em>#{$changeset->target_srl}</em></a> ({$issues[$changeset->target_srl]->getTitleText(20)}) by <span class="author">{$changeset->author}</span>
<!--@else-->
<a href="{getUrl('act','dispIssuetrackerViewSource','erev',$changeset->revision,'type','log')}">Changeset <em>[{$changeset->revision}]</em></a> by <span class="author">{$changeset->author}</span>
<!--@end-->
</dt>
<dd class="changeset"> <p>{$changeset->message}</p> </dd>
<dd class="changeset">
<p><!--@if($changeset->type == "i")--><span class="status">{$changeset->message}</span><br>{$issues[$changeset->target_srl]->getContentText(50)}<!--@else-->{$changeset->message}<!--@end--></p> </dd>
<!--@end-->
</dl>