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) »
  • 1 <=>1 relationship between a drupal node and any civicrmentity, does it exist ?
Pages: [1]

Author Topic: 1 <=>1 relationship between a drupal node and any civicrmentity, does it exist ?  (Read 1892 times)

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
1 <=>1 relationship between a drupal node and any civicrmentity, does it exist ?
May 01, 2011, 11:48:56 pm
Hi,

I've seen or developed various solutions to synchronise (as in when you create it in one side, it creates it on the other) "things" between drupal and civicrm, eg. when you create a case, it automatically creates a node of type project, when you create a node "document" it creates an activity "doc"...

Part of it is likely to be custom (eg my node document has not the same contact cck than yours, the activity type is likely to be different..), but some might/should be shared ?

eg creating a civicrm_external_ref table:
- cms_id
- cms_type
- crm_id
- crm_type
- creation_date
- author
- is_active

functions createCRM (to be called from a hook on drupal), createDrupal (to be called from a hook on civi), same for deleteCRM deleteDrupal

And an example or two of hooks using that.

Something like that exists already ? Should be part of the drupal modules in the standard distrib?

X+

P.S. Better names more than welcome, not inspired.
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

tobiaseigen

  • I post frequently
  • ***
  • Posts: 151
  • Karma: 5
    • Kabissa - Space for Change in Africa
Re: 1 <=>1 relationship between a drupal node and any civicrmentity, does it exist ?
May 02, 2011, 12:19:31 am
Hey Xavier,

Thanks for the tweet to @kabissa to raise my awareness of this post.

I'm not really sure what your use cases are. Have you seen the webform_civicrm drupal module, which creates/updates civicrm contacts and records activity when someone completes a webform? That is extremely handy and I have been using it actively for Kabissa's volunteering application form.

og_mailinglist is about creating nodes or comments to nodes by email in organic groups and distributing those as messages to group subscribers - I'm not sure what this has to do with civicrm.

Cheers,

Tobias
Kabissa - Space for Change in Africa http://kabissa.org

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: 1 <=>1 relationship between a drupal node and any civicrmentity, does it exist ?
May 02, 2011, 12:35:28 am
I only use og_mailinglist in one case so far, as a discussion on new features and developments.

Each project is an OG, each issue is a node, and each subsequent discussion on the issue a comment.

So you can send an email to newissue@kabissa.org that would send  that to the other in the group, that can reply...

How does it relate in civi ? Each project is a case, each issue an activity, it would make sense to sync the two.

What was your need for kabissa ?
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

tobiaseigen

  • I post frequently
  • ***
  • Posts: 151
  • Karma: 5
    • Kabissa - Space for Change in Africa
Re: 1 <=>1 relationship between a drupal node and any civicrmentity, does it exist ?
May 02, 2011, 12:48:47 am
Hey Xavier,

Thanks for clarifying, though I still don't really get it.

Why would you want to have issues in both places - as nodes/comments in OG and cases/activities in CiviCRM? One or the other would seem more than adequate.

My own use case at Kabissa is that we use og_mailinglist to turn organic groups into email discussion lists, like Mailman but with better web interfaces for archive searching etc. This increases participation in our network.

I could imagine it being nice to be able to use civicrm cases to track email correspondence with members about for example volunteering or other one-to-one issues, and to ensure that issues are taken to their conclusion.

We use CiviCRM for other things, especially contribution management and sending out newsletters/mailings. If you have ideas on how we can do more, I'd be glad to hear it.

Cheers,

Tobias
Kabissa - Space for Change in Africa http://kabissa.org

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: 1 <=>1 relationship between a drupal node and any civicrmentity, does it exist ?
May 02, 2011, 01:28:12 am
Quote from: tobiaseigen on May 02, 2011, 12:48:47 am
Why would you want to have issues in both places - as nodes/comments in OG and cases/activities in CiviCRM? One or the other would seem more than adequate.

Because all the details and discussions and files are "content" (ie comment/node/OG), and using OG_mailinglist works great for that IMO.

On the other hand, an overview of activities (eg. how often they are activities in the group, are they all closed, should some be part of case needing follows up) is about contacts, hence in civicrm.

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

tobiaseigen

  • I post frequently
  • ***
  • Posts: 151
  • Karma: 5
    • Kabissa - Space for Change in Africa
Re: 1 <=>1 relationship between a drupal node and any civicrmentity, does it exist ?
May 02, 2011, 01:36:56 am
I'm not sure it makes sense to try to track all site activity in civicrm.

Have you looked at mixpanel and the mixpanel drupal module? http://kyle.mathews2000.com/blog/2011/04/23/new-drupal-mixpanel-integration-module-released-track-event-based-analytics
Kabissa - Space for Change in Africa http://kabissa.org

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: 1 <=>1 relationship between a drupal node and any civicrmentity, does it exist ?
May 02, 2011, 02:07:27 am
Right, probably not all of them indeed, but would be useful to be able to "flag" one to be synced with civi because you want to follow up, or in general want to keep it in the activity.

Another usage of sync is that we are using the forum usage as a way of gauging the topics of interest, eg if you post in the forum "transparency & democracy" we tag your contact "transparency".

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

tobiaseigen

  • I post frequently
  • ***
  • Posts: 151
  • Karma: 5
    • Kabissa - Space for Change in Africa
Re: 1 <=>1 relationship between a drupal node and any civicrmentity, does it exist ?
May 02, 2011, 02:17:56 am
interesting re the tagging of contacts based on their participation. why not use civicrm's mail-in functionality to record this info in civicrm from og_mailinglist powered groups?

cheers,

tobias
Kabissa - Space for Change in Africa http://kabissa.org

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: 1 <=>1 relationship between a drupal node and any civicrmentity, does it exist ?
May 02, 2011, 02:25:04 am
Not sure I'm following your suggestion, an incoming email creates an activity, but doesn't tag the contact.

This being said, my initial point was that there is a need that have been expressed several time to sync between drupal and civi, and seems to me that everyone is re-inventing the same underlying table and structure to handle the same basic need (1<->1 between two ids, checking if the records exists already...). But it might be that's a common need of us only.

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

tobiaseigen

  • I post frequently
  • ***
  • Posts: 151
  • Karma: 5
    • Kabissa - Space for Change in Africa
Re: 1 <=>1 relationship between a drupal node and any civicrmentity, does it exist ?
May 02, 2011, 02:37:31 am
I don't use the civicrm mail-in feature myself (tho would like to) but was imagining you could have an email address eg transparency@foo.com that is subscribed to the transparency group. When someone posts to the group, a "posted to transparency" activity is recorded in civicrm which you can then use to track that activity or do some post-processing on.

This all seems like overkill to me too though and I personally don't see the benefit over other site activity tracking tools. Other people (like you say) may also want to work with you on replicating the content in CiviCRM if you have common use cases that it would serve.

I'd be interested in learning more about what you're doing with CiviCRM - can you tell me more about your project, perhaps in a DM?

Cheers,

Tobias
Kabissa - Space for Change in Africa http://kabissa.org

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: 1 <=>1 relationship between a drupal node and any civicrmentity, does it exist ?
May 02, 2011, 02:59:15 am
Hi,

I have been looking at doing something like this in the context of using 'Rules' module.

The request was to have an organic group created whenever an event was created and to add participants to it as group members when they registered. When the registration role is 'tutor' they are made the groups owner.

We wanted to get a feeling for the potential of rules module so explored it that way. Effectively it moves the ability to configure these interactions from code into the UI.

One issue I hit was the one you described here - how do I link the event & then group. I decided to add a cck field type called 'cck_civicrm_event' (although it's being renamed to 'civicrm_entity' I think).

So, the cck field is attached to the node & holds a reference to an entity & that makes it possible to link them via rules. One issue is that more than one event could be linked to a node but I'm just using 'limit = 1' ATM
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: 1 <=>1 relationship between a drupal node and any civicrmentity, does it exist ?
May 02, 2011, 03:15:35 am
Ok I have a slight bias against configuration using the UI, because that's always a pain for the migration from dev to staging to prod and I always forget something at one point or another.

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

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: 1 <=>1 relationship between a drupal node and any civicrmentity, does it exist ?
May 02, 2011, 03:16:37 am
The point of the UI is to make it so other people can do it & I don't have to!
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

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: 1 <=>1 relationship between a drupal node and any civicrmentity, does it exist ?
May 02, 2011, 03:17:06 am
OH, & migrating UI config - features module
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

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • 1 <=>1 relationship between a drupal node and any civicrmentity, does it exist ?

This forum was archived on 2017-11-26.