[freeside-commits] branch master updated. f3a97201def678ff5cb382520132f303a16d0d12
Mark Wells
mark at 420.am
Wed Aug 7 16:39:49 PDT 2013
The branch, master has been updated
via f3a97201def678ff5cb382520132f303a16d0d12 (commit)
from 2d54c6f57754b233f5ba7f19b34a26285ebab08e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit f3a97201def678ff5cb382520132f303a16d0d12
Author: Mark Wells <mark at freeside.biz>
Date: Wed Aug 7 16:39:21 2013 -0700
fix WillResolve date editing in ticket basics, #23309
diff --git a/rt/lib/RT/Interface/Web.pm b/rt/lib/RT/Interface/Web.pm
index bdad213..4a6bfda 100644
--- a/rt/lib/RT/Interface/Web.pm
+++ b/rt/lib/RT/Interface/Web.pm
@@ -2983,6 +2983,7 @@ sub ProcessTicketDates {
Starts
Started
Due
+ WillResolve
);
#Run through each field in this list. update the value if apropriate
diff --git a/rt/lib/RT/Interface/Web_Vendor.pm b/rt/lib/RT/Interface/Web_Vendor.pm
index fb2b807..a5f5b88 100644
--- a/rt/lib/RT/Interface/Web_Vendor.pm
+++ b/rt/lib/RT/Interface/Web_Vendor.pm
@@ -254,8 +254,20 @@ sub ProcessTicketBasics {
TimeLeft
Type
Queue
+ WillResolve
);
+ # the UI for editing WillResolve through Ticket Basics should allow
+ # setting it to null
+ my $to_date = delete($ARGSRef->{'WillResolve_Date'});
+ my $DateObj = RT::Date->new($session{'CurrentUser'});
+ if ( $to_date ) {
+ $DateObj->Set(Format => 'unknown', Value => $to_date);
+ } else {
+ $DateObj->Set(Value => 0);
+ }
+ $ARGSRef->{'WillResolve'} = $DateObj->ISO;
+
if ( $ARGSRef->{'Queue'} and ( $ARGSRef->{'Queue'} !~ /^(\d+)$/ ) ) {
my $tempqueue = RT::Queue->new($RT::SystemUser);
$tempqueue->Load( $ARGSRef->{'Queue'} );
diff --git a/rt/share/html/Ticket/Elements/EditBasics b/rt/share/html/Ticket/Elements/EditBasics
index ae70bd8..a86bb6c 100755
--- a/rt/share/html/Ticket/Elements/EditBasics
+++ b/rt/share/html/Ticket/Elements/EditBasics
@@ -52,6 +52,7 @@ $InTable => 0
%defaults => ()
</%ARGS>
<%INIT>
+my $WillResolveObj = $TicketObj->WillResolveObj;
unless ( @fields ) {
@fields = (
{ name => 'Subject',
@@ -72,7 +73,9 @@ unless ( @fields ) {
comp => '/Elements/SelectDate',
args => {
menu_prefix => 'WillResolve',
- Default => $ARGS{'WillResolve'} || $TicketObj->WillResolveObj->Date,
+ Default => $ARGS{'WillResolve'} ||
+ ($WillResolveObj->Unix > 0 ?
+ $WillResolveObj->Date : ''),
current => 0,
ShowTime => 0,
},
-----------------------------------------------------------------------
Summary of changes:
rt/lib/RT/Interface/Web.pm | 1 +
rt/lib/RT/Interface/Web_Vendor.pm | 12 ++++++++++++
rt/share/html/Ticket/Elements/EditBasics | 5 ++++-
3 files changed, 17 insertions(+), 1 deletions(-)
More information about the freeside-commits
mailing list