Results 1 to 3 of 3

Thread: project <--> contact relationship confusing

  1. #1
    mellamokb is offline Junior Member
    Join Date
    Aug 2006
    Posts
    3

    Default What dependencies lie with project_relation table (V4.2.0c) ?

    Hi everyone,

    I have a database using a previous application (called Soft Contacts) housed in SQL Server 2003. The data layout is very different from the layout of the SugarCRM application, but I have learned the relationships well enough in my own data and developed a matching relationship template in SugarCRM that I think I can transfer the data. However, there is something that has come up, and I don't understand what is going on.

    To develop an initial startup, I have created a user exactly the same as a user in our previous application. In our previous application, there are jobs, and each job has various contacts tied to it. Each user is tied to both a job and a set of contacts in that job, so that there are multiple users working on the contacts in a given job, but none of the users works with the same contact in the same job. A job in our sense means a group of contacts to which the same questions will be asked by our tele-marketers. To translate this to SugarCRM:

    1) Jobs in our previous application are equivalent to projects in SugarCRM.
    2) All of the contacts that belong to a certain job will belong to the corresponding project in SugarCRM.
    3) All of the contacts for a given job (or project) that only a certain user should work with will be tied to that user.

    For example, suppose I have a job (or project) called "Farmers", containing all of the farmers in Illinois and Indiana. Suppose there are 3000 such farmers -- there will be 3000 account entries, and 3000 contact entries corresponding to these farmers. All 3000 will be tied to the project called "Farmers". Now suppose I have three users (Joe, Bob, Will), Joe works on the job "Farmers" and a few other jobs as well -- however, he only works with 1000 of the contacts for "Farmers". Bob also works with 1000, and Will with the remaining 1000. If I assign the 3000 contacts to their prospective users, and set the permissions for these users to "Owner" for viewing contacts, they should each be able to open the "Farmers" project when they have logged in, and see only the 1000 contacts they are to work on.

    Here is the part where I am stumped. As a test, I have stuck 433 contacts into the database. I imported these from the SugarCRM interface with no problem. I also imported the 433 accounts, and the accounts and contacts are correctly tied together. However, when I go to "assign" these contacts to a single user's project, the results don't occur the way I think they should. I didn't use the interface for this part, but worked with the data manually with PHPMyAdmin, which is why I need some help on the data relationships. What I did was insert the 433 records into `project_relation` with the correct project_id, account.id (for relation_id), and `Accounts` as the relation_type. However, when I log in as the named user, under the projects tab for this project, I see all 433 accounts, but only 223 contacts. What gives?

    Thanks in advance for your help...I have been stuck on this problem for many hours.

    mellamokb
    Last edited by mellamokb; 2006-08-17 at 10:41 PM. Reason: better title

  2. #2
    mellamokb is offline Junior Member
    Join Date
    Aug 2006
    Posts
    3

    Default Re: project <--> contact relationship confusing

    Well, since I'm not getting any responses...Here's what I have figured out so far from looking at the log with debugging turned on (since looking through 10,000 lines of php got me nowhere):

    1) There is nothing that uses the "relation_type" field in the projects tab...I wonder if it has any purpose at all.
    2) It seems that if there are contacts and accounts that have the same id, issues come up.

    I guess my next step then is to work with the id's so that no contact and account have the same id (which really shouldn't be a problem, in my opinion). If, when I make that change, all of the numbers are resolved, I will call this problem solved. Can somebody tell me the purpose of "relation_type"?

    Thanks,

    mellamokb

  3. #3
    mellamokb is offline Junior Member
    Join Date
    Aug 2006
    Posts
    3

    Default Re: project <--> contact relationship confusing

    Ha, I was right! This problem is now resolved, so I don't need help anymore. I don't know if I'm not expected to use my own id's, or what. But since I'd like to integrate these two applications, I don't want to use the new id's created by SugarCRM, unless I want to make the relationships between projects and contacts manually (which has to be done one at a time in the current interface), and that would take literally MONTHS (there are 30 to 40 jobs, around 56000 contacts and accounts, and I'm supposed to do these one at a time ????).

    Oh well, maybe I'm the only person that is trying to migrate a different data layout to SugarCRM that has encountered this problem. Enough rambling. Maybe I'll post a bug if I'm ambitious enough...

    And if anyone can answer my previous question (What is the purpose of relation_type and where is it used?), that would still be greatly appreciated.

    mellamokb

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •