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 Drupal Modules (Moderator: Donald Lobo) »
  • A Way For A "Main Person" of An Org to Add CiviCRM Contacts to Their Org
Pages: [1]

Author Topic: A Way For A "Main Person" of An Org to Add CiviCRM Contacts to Their Org  (Read 2970 times)

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
A Way For A "Main Person" of An Org to Add CiviCRM Contacts to Their Org
August 28, 2009, 06:37:38 pm
This functionality doesn't currently exist with in the Contact Dashboard, but I'd like to see about getting it made.  Here is the idea:

1) Currently an Individual known as "main person" can have a permission'd relationship with an Org
2) That Org can have a membership will extends to all Individuals who are Employees of that Org

I'd like to add this feature through Contact Dashboard (or thereabouts):

1) "main person" Individual with Permission'd Relationship on Org has ability to Add Individual Contacts through the Contact Dashboard who will
   a) Be assigned as Employees of the "main person"s Org
   b) Be assigned as "subordinates" (for lack of a better term) so that each Employee has a Permission'd relationship with "main person"

2) "main person" can then edit the information of his/her Org as well as his or her subordinate employees

3) "main person" can delete Individual contacts who have an Employee relationship with "main person" Org

Restriction: "main person" need not have more than one Org.  "main person" cannot add or delete Contacts who are not individuals.  "main person" cannot add or delete contacts that are not Employees of the Org

I think there are a lot of people who would enjoy this functionality.  My dream is that it is "done right" by hiring the CiviCRM core team to do it, in a way that is helpful for all who use CiviCRM.  I am willing to chip in $, and hopefully other are out there too!!!

In talking with Lobo he estimates that this effort would take 30 - 50 hours of programming time.  I'd be willing to pony up about 1/2 the cost of the development, if others can fill in the rest let's see if we can make it happen.  Also an wild/wacky alternative might be to make this a "class project" for the Sep 9-10 CiviCRM class in New York, which I am still seeing if I can make it to ($ allowing).

Let me know guys!  Any takers?
Try CiviTeacher: the online video tutorial CiviCRM learning library.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: A Way For A "Main Person" of An Org to Add CiviCRM Contacts to Their Org
August 28, 2009, 09:04:03 pm

I suspect this should be done as a custom drupal module with module specific urls. Since the permissioning is one level off (main person to org to employees of the org), i dont think u can use civicrm "relationship" permissioning features as it currently stands

this is probably too big a project to tackle for the camp :) In the sfschool module, i do a fair amount with permissioned relationships (parent -> child), its similar to the above but a lot simpler

lob
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Re: A Way For A "Main Person" of An Org to Add CiviCRM Contacts to Their Org
August 29, 2009, 09:08:04 am
I'm afraid I don't understand.  I've already got a situation with my site where I have 2 types of relationships

1) main person > org
2) main person > employee

If both are established when a new contact record is created as a permissioned relationship, then the main person is not "1 level off" as you said, there is direct relationship between the main person and his/her subordinates.  This situation already exists for my site.  I simply also want the main person to be able to add and delete contacts.

So are you saying you don't think it's appropriate or a "value added" to  have this capability ( for "main people" to create contacts for their organization) to be part of CiviCRM funtionality directly?  

Stuart

« Last Edit: August 29, 2009, 05:03:54 pm by Stoob »
Try CiviTeacher: the online video tutorial CiviCRM learning library.

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: A Way For A "Main Person" of An Org to Add CiviCRM Contacts to Their Org
August 29, 2009, 03:01:30 pm
The relationship for 'main person' to 'organisation' will obviously not be an 'employee/r' one - presumably the 'main contact' gains their super powers manually at the back end?

I agree it is a really useful extension and one I am looking to see how I can contribute to it.

It also seems like a potential solution for situations where a 'team leader' needs to 'add/delete' team members

in our 'team' case we have been looking at re/mis-using the 'current employer' as the easiest route to manage this 'special relationship'.

Partly for the benefit of other forum readers, I would like to flag that the whole issue of 'special permissions' for this type of case, as well as for teams and households is one where we are slowly building up a toolkit of solutions including the list below.

it would be great if this could in some way converge further down the road

- stoob#1 = enables custom Org data to be collected during Membership sign up) http://wiki.civicrm.org/confluence/display/CRMDOC/Enhance+Organizational+Membership+Functionality

- hufs = provides a drupal Tab that displays an Org Profile for users that have 'permissioned relationship' http://civicrm.org/node/587

- wwoofs (i maybe premature on this) = enables user with permissioned relationship to modify Orgs custom data via Dashboard.
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Re: A Way For A "Main Person" of An Org to Add CiviCRM Contacts to Their Org
August 29, 2009, 03:58:49 pm
peterd, thanks.

Just to clarify how I've set up my relationships on my site, which may be redundant or may not, but this is how I did it...

A) 1 Org > Many Employees  Relationship name: Employee/r  (none of these relationships need be permissioned, but could if desired)
B) 1 Main Person > 1 Org  Relationship name: Main person for... (this relationship is a one person per one org permissioned  a>b, so main person can edit org)
C) 1 Main Person > Many Subordinate Individuals (who happen to work at the same Org as the main)  Relationship name: Representative (or possibly could be called 'supervisor') of...

By making C) a permissioned relationship a main can edit all his/her subordinates.  The C) Relationship is established using the "Import Contacts" feature, and made permissioned using a custom MySQL that runs using Cron.

This is all detailed in the documentation (to which peterd kindly provided a link above)...


Try CiviTeacher: the online video tutorial CiviCRM learning library.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: A Way For A "Main Person" of An Org to Add CiviCRM Contacts to Their Org
August 29, 2009, 07:58:58 pm

Since you have the C relationship, the problem gets a whole lot simpler :)

Permissioned profiles give you automatic edit privileges. So all you need to do is:

1. extend the code (via hooks) to deal with adding a new individual that is related to an org and the main person. This can be done via the buildForm and postProcess hook and passing in the right ids to the URL. I do this a fair amount in the sfschool module

2. extend the code to also deal with deleting an individual. This can be done by adding a "delete" button to the edit page of the person. The delete can be implemented in the postProcess hook

overall, i dont think it should be too hard and will be a good test of hooks and extensibility :)

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Re: A Way For A "Main Person" of An Org to Add CiviCRM Contacts to Their Org
August 31, 2009, 09:22:07 am
Ok thanks -- I'm willing to try. 

Just let me clarify then, I'm not actually going to be creating a Drupal module (that uses CiviCRM hooks) then, I'm just going to extend the CiviCRM code itself?
Try CiviTeacher: the online video tutorial CiviCRM learning library.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: A Way For A "Main Person" of An Org to Add CiviCRM Contacts to Their Org
August 31, 2009, 10:42:49 am

in drupal, u would need to implement this using a module. the hook implementation is part of the module code

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: A Way For A "Main Person" of An Org to Add CiviCRM Contacts to Their Org
September 10, 2009, 05:31:19 pm
how did you go with this, stoob?
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • A Way For A "Main Person" of An Org to Add CiviCRM Contacts to Their Org

This forum was archived on 2017-11-26.