Fix the due date display

This commit is contained in:
Simon Holywell 2012-03-05 22:34:30 +00:00
parent f8a1d26b28
commit c2d61083a7
3 changed files with 7 additions and 3 deletions

View File

@ -272,6 +272,9 @@ class IDF_Form_IssueUpdate extends IDF_Form_IssueCreate
or ((!is_null($owner) and !is_null($this->issue->get_owner())) and $owner->id != $this->issue->get_owner()->id)) { or ((!is_null($owner) and !is_null($this->issue->get_owner())) and $owner->id != $this->issue->get_owner()->id)) {
return $this->cleaned_data; return $this->cleaned_data;
} }
if (trim($this->issue->due_dtime) != trim($this->cleaned_data['due_dtime'])) {
return $this->cleaned_data;
}
$tags = array(); $tags = array();
for ($i=1;$i<7;$i++) { for ($i=1;$i<7;$i++) {
if (strlen($this->cleaned_data['label'.$i]) > 0) { if (strlen($this->cleaned_data['label'.$i]) > 0) {
@ -391,7 +394,6 @@ class IDF_Form_IssueUpdate extends IDF_Form_IssueCreate
or ((!is_null($owner) and !is_null($this->issue->get_owner())) and $owner->id != $this->issue->get_owner()->id)) { or ((!is_null($owner) and !is_null($this->issue->get_owner())) and $owner->id != $this->issue->get_owner()->id)) {
$changes['ow'] = (is_null($owner)) ? '---' : $owner->login; $changes['ow'] = (is_null($owner)) ? '---' : $owner->login;
} }
$due_dtime = $this->cleaned_data['due_dtime'];
if (trim($this->issue->due_dtime) != trim($this->cleaned_data['due_dtime'])) { if (trim($this->issue->due_dtime) != trim($this->cleaned_data['due_dtime'])) {
$changes['du'] = trim($this->cleaned_data['due_dtime']); $changes['du'] = trim($this->cleaned_data['due_dtime']);
} }
@ -441,7 +443,7 @@ class IDF_Form_IssueUpdate extends IDF_Form_IssueCreate
$this->issue->summary = trim($this->cleaned_data['summary']); $this->issue->summary = trim($this->cleaned_data['summary']);
$this->issue->status = $status; $this->issue->status = $status;
$this->issue->owner = $owner; $this->issue->owner = $owner;
$this->issue->due_dtime = $due_dtime; $this->issue->due_dtime = $this->cleaned_data['due_dtime'];
} }
// Create the comment // Create the comment
$comment = new IDF_IssueComment(); $comment = new IDF_IssueComment();

View File

@ -153,6 +153,8 @@ class IDF_IssueComment extends Pluf_Model
$out .= __('Status:'); break; $out .= __('Status:'); break;
case 'ow': case 'ow':
$out .= __('Owner:'); break; $out .= __('Owner:'); break;
case 'du':
$out .= __('Due Date:'); break;
case 'lb': case 'lb':
$out .= __('Labels:'); break; $out .= __('Labels:'); break;
case 'rel': case 'rel':

View File

@ -40,7 +40,7 @@
{if $i> 0 and $c.changedIssue()} {if $i> 0 and $c.changedIssue()}
<div class="issue-changes"> <div class="issue-changes">
{foreach $c.changes as $w => $v} {foreach $c.changes as $w => $v}
<strong>{if $w == 'su'}{trans 'Summary:'}{/if}{if $w == 'st'}{trans 'Status:'}{/if}{if $w == 'ow'}{trans 'Owner:'}{/if}{if $w == 'lb'}{trans 'Labels:'}{/if}{if $w == 'rel'}{trans 'Relations:'}{/if}</strong> <strong>{if $w == 'su'}{trans 'Summary:'}{/if}{if $w == 'st'}{trans 'Status:'}{/if}{if $w == 'ow'}{trans 'Owner:'}{/if}{if $w == 'du'}{trans 'Due Date:'}{/if}{if $w == 'lb'}{trans 'Labels:'}{/if}{if $w == 'rel'}{trans 'Relations:'}{/if}</strong>
{if $w == 'lb' or $w == 'rel'} {if $w == 'lb' or $w == 'rel'}
{foreach $v as $t => $ls} {foreach $v as $t => $ls}
{foreach $ls as $l} {foreach $ls as $l}