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 (Moderator: Donald Lobo) »
  • Activity search based on related contact data
Pages: [1]

Author Topic: Activity search based on related contact data  (Read 1384 times)

Michael McAndrew

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1274
  • Karma: 55
    • Third Sector Design
  • CiviCRM version: various
  • CMS version: Nearly always Drupal
  • MySQL version: 5.5
  • PHP version: 5.3
Activity search based on related contact data
January 23, 2009, 10:05:33 am
Hello there,

I’m starting to develop some custom search and report functionality that will use relationships to allow people to search and report on activities of individuals based on data about their organisation.

I hope this will be generally useful at some point in the future but am starting with my particular  use cases which go along the lines of:

* Report on the number of organizations working with disabled people that have sent people on a training course this year
* Send an email to all trustees of organizations that work with children and young people
* Find out how many hours of support we have delivered to faith based groups this year

I’ve started a wiki page to outline how the query will be structured and so on. http://wiki.civicrm.org/confluence/display/CRMDOC/Activity+search+based+on+related+contact+data.  It would be great to hear from you if you have done anything similar that you think would be useful, or you would like to contribute to this functionality in some way, and of course if you are a CiviCRM guru, it would be great to hear what you think about this approach, how I can simplify it, etc.

Key to my approach, and key to making it generalisable is being able to replicate custom fields that apply to organisations and to activities in the custom search form.

I am also hoping that I will be able to redeploy a couple of already existing queries to do the majority of the leg work.
Does this sound feasible?  Any pointers at this early stage?

« Last Edit: January 23, 2009, 05:08:43 pm by michaelmcandrew »
Service providers: Grow your business, build your reputation and support CiviCRM. Become a partner today

emilyf

  • Ask me questions
  • ****
  • Posts: 696
  • Karma: 54
  • CiviCRM version: 2.x - 4.x
  • CMS version: Drupal 5, 6, 7
Re: Activity search based on related contact data
January 23, 2009, 11:48:15 am
This sounds somewhat similar to the custom activity search i made that is now part of civicrm. there is a couple problems with the code (you can follow the issue here: http://issues.civicrm.org/jira/browse/CRM-2870), but in general you might want some of the same query structure, etc. the file is at civicrm/CRM/Contact/Form/Search/Custom/ActivitySearch.php

Michael McAndrew

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1274
  • Karma: 55
    • Third Sector Design
  • CiviCRM version: various
  • CMS version: Nearly always Drupal
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Activity search based on related contact data
January 27, 2009, 02:03:34 am
Hi Emily,

Yes I saw that work you have been doing.  It does look similar and will most likely use it as my starting point.

Thanks,
Michael
Service providers: Grow your business, build your reputation and support CiviCRM. Become a partner today

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Activity search based on related contact data

This forum was archived on 2017-11-26.