From f3a97201def678ff5cb382520132f303a16d0d12 Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Wed, 7 Aug 2013 16:39:21 -0700 Subject: fix WillResolve date editing in ticket basics, #23309 --- rt/lib/RT/Interface/Web.pm | 1 + rt/lib/RT/Interface/Web_Vendor.pm | 12 ++++++++++++ 2 files changed, 13 insertions(+) (limited to 'rt/lib') diff --git a/rt/lib/RT/Interface/Web.pm b/rt/lib/RT/Interface/Web.pm index bdad21350..4a6bfda88 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 fb2b80717..a5f5b8827 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'} ); -- cgit v1.2.1