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) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • activity api
Pages: [1]

Author Topic: activity api  (Read 768 times)

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
activity api
January 18, 2012, 11:47:11 pm
I'm getting unexpected results from the activity get api.
passing:

Code: [Select]
Array
(
    [version] => 3
    [contact_id] => 10
    [activity_type_id] => 46
)

I receive all activities for the contact -- i.e. it's not filtering on type.
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: activity api
January 19, 2012, 02:31:30 am
Yeah - that's the way the v2 version was written - it calls a fairly unsympathetic core function. The v3 api defaults back to a generic API call if you pass in source_contact_id instead of contact_id but that call doesn't support assignee_contact_id.

We have a bunch of generic API functions & they have standardised behaviour but aren't much more than an SQL query on a single table. The more elaborate BAO get functions based on the query object can do more but are more erratic
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: activity api
January 23, 2012, 07:50:25 am
Hi,

Part of the problem is that the way the tuples activity contact are stored is showing its age (spread between various tables...). Eileen & Lobo discussed about refactoring to a better solution (a single table with a contactid, role ENUM, activity id)  if I recall.

That would likely speed a lot some requests (both for case or the activity tab for instance), but that's not broken enough to have had someone willing to have a go at it... so far...


X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • activity api

This forum was archived on 2017-11-26.