Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-16183

Report table template treats all dates as being 'date' - even if they are datetime

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.4.13, 4.6
    • Fix Version/s: 4.6
    • Component/s: None
    • Labels:
      None
    • Documentation Required?:
      None

      Description

      The code i table.tpl describes when to truncate the date as

      {if $header.type & 4}

      {$row.$field|truncate:10:''|crmDate}

      {else}
      {$row.$field|crmDate}
      {/if}

      However, I believe it should be

      {if $header.type == 4}
      {$row.$field|truncate:10:''|crmDate}
      {else}

      {$row.$field|crmDate}

      {/if}

      This changes it from 'truncate date and datetime fields down to just a date' to 'truncate date fields down to just a date;.

      As a minor aside I feel like the bitwise operator causes more confusion than it's worth in the Civi codebase.

        Attachments

          Activity

            People

            • Assignee:
              pratiksha pratiksha
              Reporter:
              eileen Eileen McNaughton
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: