CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Bug in Activity History Date ? CiviCRM 1.7 - Drupal E-Commerce 5.x-3.0
Pages: [1]

Author Topic: Bug in Activity History Date ? CiviCRM 1.7 - Drupal E-Commerce 5.x-3.0  (Read 1565 times)

yasheshb

  • I post occasionally
  • **
  • Posts: 72
  • Karma: 5
Bug in Activity History Date ? CiviCRM 1.7 - Drupal E-Commerce 5.x-3.0
May 29, 2007, 12:59:42 am
Hello:

 We're using CiviCRM 1.7.9379 and have noticed a problem with dates
for some entries in Activity History. The activity concerned is a
custom activity (Transaction) and the dates for certain actions on
transactions are shown correct. The activities are populated using the
activity API using the ecivicrm module which is a glue/hook to record
activity statuses of transactions from drupal ecommerce to civicrm
activities.

 When a transaction is completed, the dates shown in the activity
history are shown correctly, however when a transaction is cancelled,
the dates are shown as Dec 31st 1969 or Jan 1 1970.

 We did enable smarty debugging (Global settings - > Debugging) for
civicrm and checked the template data
  http://testsite.com/civicrm/contact/view?reset=1&cid=12345&smartyDebug=1

and saw the record for the smarty variable
{$activity} . it showed
Array (2)
data => Array (3)
 85883 => Array (9)
   id => 85883
   entity_table => civicrm_contact
   entity_id => 89913
   activity_type => Transaction
   module => E-commerce
   callback => ecivicrm_activity_callback
   activity_id => 1289
   activity_summary => Transaction canceled
   activity_date => 2007-05-29 01:13:27
 85882 => Array (9)
   id => 85882
   entity_table => civicrm_contact
   entity_id => 89913
   activity_type => Transaction
   module => E-commerce
   callback => ecivicrm_activity_callback
   activity_id => 1288
   activity_summary => Purchase of <em>$22.57</em>
   activity_date => 2007-05-29 01:08:47
 85881 => Array (9)
   id => 85881
   entity_table => civicrm_contact
   entity_id => 89913
   activity_type => Transaction
   module => E-commerce
   callback => ecivicrm_activity_callback
   activity_id => 1287
   activity_summary => Purchase of <em>$72.99</em>
   activity_date => 2007-05-29 01:02:04
totalCount => 3

we also checked the civicrm database
select * from civicrm_activity_history where entity_id = 89913

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
id       entity_table       entity_id activity_type module         callback                           activity_id activity_summary                      activity_date         relationship_id group_id
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
85881 civicrm_contact 89913    Transaction   E-commerce ecivicrm_activity_callback 1287         Purchase of <em>$72.99</em> 2007-05-29 01:02:04
NULL  NULL

85882 civicrm_contact 89913    Transaction   E-commerce ecivicrm_activity_callback 1288         Purchase of <em>$22.57</em>  2007-05-29 01:08:47
NULL  NULL

85883 civicrm_contact 89913    Transaction   E-commerce ecivicrm_activity_callback 1289         Transaction canceled                 2007-05-29 01:13:27
NULL  NULL
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

and it does show the activity_date correctly in the db.

any idea why the date for cancelled transaction
(civicrm_activity_history.id = 85883) is showing as Dec 31st 1969 and
the other 2 are showing May 29th 2007 ?

thanks .

yashesh bhatia.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Bug in Activity History Date ? CiviCRM 1.7 - Drupal E-Commerce 5.x-3.0
May 29, 2007, 01:34:51 pm
Yash - Given that the DB data AND the data passed to the Smarty template both look correct - this is a bit mysterious. You might want to get into the template file and play around with the variable / modifier that is used for that column in the displayed selector. I'm pretty sure we use the crmDate modifier on that column with some params - so you could try eliminating the modifier first and displaying the "raw" dates - and going from there.
Protect your investment in CiviCRM by  becoming a Member!

yasheshb

  • I post occasionally
  • **
  • Posts: 72
  • Karma: 5
Re: Bug in Activity History Date ? CiviCRM 1.7 - Drupal E-Commerce 5.x-3.0
May 29, 2007, 10:21:04 pm
Dave:

    thanks for the pointers. there was a problem at my end. there was a spurious custom template in
$DRUPAL_ROOT/sites/all/civicrm_templates/CRM/History/Selector/Activity.tpl which we overlooked
so we've found the buggy custom template that's causing the date display problem.

thanks.

yashesh bhatia.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Bug in Activity History Date ? CiviCRM 1.7 - Drupal E-Commerce 5.x-3.0

This forum was archived on 2017-11-26.