[Rt-commit] rt branch, 4.2/date-input-keep-value, repushed

? sunnavy sunnavy at bestpractical.com
Fri Sep 6 04:51:52 EDT 2013


The branch 4.2/date-input-keep-value was deleted and repushed:
       was 345c6475af38119b11c269ad733d394c7b349275
       now d408f862ca01e7085fc20472966deea2751f72d0

1:  0691801 ! 1:  a3233a8 we should keep the input value for cf date/datetime
    @@ -33,10 +33,20 @@
          # what exactly is this doing?  Without the "unless" it breaks RTFM
          # transaction extraction into articles.
     -    $Default = ($Values->First ? $Values->First->Content : '') unless $Default;
    -+    if ( !$Default && $Values->First && $Values->First->Content ) {
    -+        my $date = RT::Date->new($session{CurrentUser});
    -+        $date->Set(Format => 'ISO', Value => $Values->First->Content);
    -+        $Default = $date->ISO(Timezone => 'user');
    ++    unless ( $Default ) {
    ++        if ( $Values->First ) {
    ++            if ( $CustomField->Type eq 'DateTime' ) {
    ++                my $date = RT::Date->new($session{CurrentUser});
    ++                $date->Set(Format => 'ISO', Value => $Values->First->Content);
    ++                $Default = $date->ISO(Timezone => 'user');
    ++            }
    ++            else {
    ++                $Default = $Values->First->Content;
    ++            }
    ++        }
    ++        else {
    ++            $Default = '';
    ++        }
     +    }
          $Values->GotoFirstItem;
      }
2:  0e8f986 = 2:  cc38e6f allow to delete a cf date value
3:  67ab892 = 3:  abc11fa keep values of ticket core date fields too
4:  f12936d = 4:  bda2b8d Remove unused Value argument to SelectDate
5:  345c647 = 5:  d408f86 check if it's necessary to add custom field value before actually adding it.



More information about the Rt-commit mailing list