[Rt-commit] rt branch, 4.6/custom-date-ranges, repushed

Jim Brandt jbrandt at bestpractical.com
Wed Jun 12 14:21:31 EDT 2019


The branch 4.6/custom-date-ranges was deleted and repushed:
       was 3d8b51dd5ce6de049e45e6c6807b00a7393fd883
       now eaa2317268338d950e6b39658bc3ff64f0dd3374

 1: b80275e1d !  1: 5aa3aa9a2 RT::Record support for CustomDateRanges
    @@ -9,10 +9,11 @@
          return RT->Config->Get('WebPath'). "/index.html?q=";
      }
      
    -+# matches one field in "field - field" style range specs. subclasses
    ++# Matches one field in "field - field" style range specs. Subclasses
     +# that can participate in custom date ranges should override this method
     +# to match their additional date fields (e.g. RT::Ticket adds "due").
    -+# be sure to call this superclass method to get "now" and CF parsing.
    ++# Be sure to call this superclass method to get "now" and CF parsing.
    ++
     +sub _CustomDateRangeFieldParser {
     +    my $self = shift;
     +    return qr{
    @@ -23,10 +24,11 @@
     +    }xi;
     +}
     +
    -+# returns an RT::Date instantiated with this record's value for the parsed
    -+# field name. includes the $range_name parameter only for diagnostics
    -+# subclasses should override this to instantiate the fields they added in
    -+# _CustomDateRangeFieldParser
    ++# Returns an RT::Date instantiated with this record's value for the parsed
    ++# field name. Includes the $range_name parameter only for diagnostics.
    ++# Subclasses should override this to instantiate the fields they added in
    ++# _CustomDateRangeFieldParser.
    ++
     +sub _DateForCustomDateRangeField {
     +    my $self       = shift;
     +    my $field      = shift;
    @@ -62,10 +64,11 @@
     +    return $date;
     +}
     +
    -+# parses "field - field" and returns a four-element list containing the end
    ++# Parses "field - field" and returns a four-element list containing the end
     +# date field name, the operator (right now always "-" for subtraction), the
     +# start date field name, and either a custom duration formatter coderef or
    -+# undef. returns the empty list if there's an error
    ++# undef. Returns the empty list if there's an error.
    ++
     +sub _ParseCustomDateRangeSpec {
     +    my $self = shift;
     +    my $name = shift;
 2: 01907da45 =  2: 731eed308 RT::Ticket support for CustomDateRanges
 3: fb40485cf =  3: 265a267d2 Add RT::Ticket CustomDateRanges to query builder
 4: 8de03df87 =  4: d0b9d4253 Add Asset ColumnMap entries for CustomDateRanges
 5: df406a580 =  5: 508b677b3 Add config validation for CustomDateRanges
 6: 590c7dbd5 =  6: 82cb6ee88 RT_Config doc for CustomDateRanges
 7: 3e4bedbd2 !  7: a83746824 Switch customization doc from date range to message count
    @@ -47,7 +47,7 @@
     -            title     => 'First Response', # loc
     -            attribute => 'First Response',
     +    $COLUMN_MAP->{'NumberOfMessages'} = {
    -+            title     => 'Messages', # loc
    ++            title     => 'Messages',
     +            attribute => 'Messages',
                  value     => sub {
                      my $ticket = shift;
    @@ -59,6 +59,15 @@
                  }
          };
          </%init>
    +@@
    + =item title
    + 
    + The title is what will be used in the header row to identify this value.
    +-The C<# loc> is some special markup that allows RT to replace the value
    +-with translations in other languages, if they are available.
    + 
    + =item attribute
    + 
     @@
      available as the first parameter to our subroutine.
      
 8: 2ce3c1f40 < --:  ------- Remove "# loc" and description from example
 9: b6822facb =  8: 3389a9012 Add tests for CustomDateRanges
10: 35e26f47d !  9: 328231f3c Add business time support for custom date range
    @@ -25,18 +25,17 @@
          return $date;
      }
      
    --# parses "field - field" and returns a four-element list containing the end
    -+# parses "field - field" and returns a five-element list containing the end
    +-# Parses "field - field" and returns a four-element list containing the end
    ++# Parses "field - field" and returns a five-element list containing the end
      # date field name, the operator (right now always "-" for subtraction), the
     -# start date field name, and either a custom duration formatter coderef or
    --# undef. returns the empty list if there's an error
    +-# undef. Returns the empty list if there's an error.
     +# start date field name, either a custom duration formatter coderef or undef,
     +# and a boolean to indicate if it should calculate duration as business time
    -+# or not. returns the empty list if there's an error
    -+
    ++# or not. Returns the empty list if there's an error.
    + 
      sub _ParseCustomDateRangeSpec {
          my $self = shift;
    -     my $name = shift;
     @@
      
          my $calculation;
11: 3d8b51dd5 = 10: eaa231726 Test business time for custom date range



More information about the rt-commit mailing list