11 June, 2010
By xavier
Relationship are a natural way of storing relations between contacts. However, it doesn't work so well if you have several hundreds of related contacts as the realationship tab becomes unreadable quite quickly. One of our client needed to associate each individual in their base to a local branch (we implemented a nice geo lookup based on the postal code to identify the local branch, but that's another story). It means that each local branch has 1000th of individuals. This could happen in other situations, for instance to keep a relationship between a "main teacher" and each pupil or who is the latest volunteer that contacted each person in a GOTV/ Canvassing campaign... We choose to store that relation as a custom field of the type "contact reference". Each individual has a new field "nearest local branch", that is a reference to an organisation (the local branch). It works fine and you have a nice autocomplete field, like the search field in the top left corner in the... Read more
09 June, 2010
By lobo
Filed under Architecture, Drupal, Schools
We've been hard at work implementing an online set of forms to collect family information for the school module. This is one of our final projects for the year and eliminates the tedious summer ritual for the admin staff of sending paper forms to the 200 school families and for the parent to fill out the same information every year. This also saves the admin staff from entering that same information into the SIS We've built this work on the parent portal that we launched late last year. Parents can update information on themselves and their children anytime via their drupal account. The form is composed of 5 sub-forms:
  • Household Information: Name, Email, Phone and Address of the household. We currently support 2 household and 4 contacts. These are stored as CiviCRM contacts with a relationship link of type Parent / Child to the student. We created a custom group to store which household a parent belonged to. We did not use...
Read more
08 June, 2010
Filed under Architecture, CiviCRM

I am writing this post to take community feedback on porting CiviCRM to PostgreSQL, the best way to do it, and to team up with any possible members willing to contribute to this effort. Here are my efforts until now. I have not been able to make it 'all' work on PostgreSQL, but certainly to a degree where I can see light at the end of the long tunnel. I am linking 3 PostgreSQL compatible files here:

structure.sql - this has the columns, primary keys, indexes, unique constraints
data.sql - this is the sample data included with CiviCRM
fk_constraints.sql - this has the ALTER statements to introduce foreign key constraints into the structure, after the data has been loaded


Read more
11 May, 2010
By mbriney
Filed under Architecture, CiviCRM
I am working on an import guide to help organizations match fields to CiviCRM's standard fieldsets. I noticed that the existing ERDs are pretty outdated. The new database schema is pretty large for one map so I decided to create a map for contacts. When I get finished with the mapping guide I will post that as well.
28 April, 2010
By shot
As you have already read in the previous blog posts, one of the outcomes of the translation sprint is the fact that we’re switching our translation server to a new tool, Transifex. We decided to go with Transifex for various reasons:
  • Transifex allows teams of people to collaborate on translations – this is not an issue when you have a single person working on a translation, but as soon as you have two or more contributors working remotely, it’s crucial to use a tool that streamlines the process and allows for easy and centralised communication,
  • the user hierarchy is simple, clean and seems to be efficient: project maintainers accept language maintainers who, in turn, accept language team members and coordinate given language’s...
Read more
27 April, 2010
By goran
Filed under Architecture, CiviCRM, Sprints
It is said that optimizing too early is the root of all evil. However it is not so easy to say when is the right time. Looking at CiviCRM performance there are a number of instances where even on medium sized installations search queries take a long time to execute. One of the searches that caught my eye is the AJAX search at the top left in the menu bar. Returning a maximum of ten entries from a medium sized database (~50k records) should take negligible time and on the CiviCRM test data this request was taking around 3 seconds (putting full load on server). The culprit query from CRM/Contact/Page/AJAX.php is: $query = " SELECT DISTINCT(cc.id) as id, CONCAT_WS( ' :: ', {$select} ) as data FROM civicrm_contact cc {$from} {$aclFrom} {$additionalFrom} {$whereClause} ORDER BY sort_name LIMIT 0, {$limit} "; First of all, MySQL does not have DISTINCT(field) statement that returns rows distinct only in value of a single field. Still MySQL does not give errors on ... Read more
26 April, 2010
By mbriney

The following notes were gathered from the CiviCon session on what the community would like to see in CiviCRM 4.0:

* Goals
* No new features
* Framework switch
* Not as major a rewrite as it looks
* Don't want to change many of the private APIs
* Want to switch away from pear
* Test unit coverage
* Better API hooks
* What users would like to see
* Continuous Integration
* Hudson - as you submit code runs through suite of unit tests to see what's broken
* Better decoupling
* Drupal Forms API
* * Better integration with Drupal DB layer
* Scale better
* Drush installation of managed hosting CRM
* Support Aegir usage
* * Better plugin architecture
* Payment processors
* Custom searches
* Custom reports...

Read more
06 January, 2010
By pkeogan
Filed under Architecture

How much server (disk space and memory) do I need to run my CiviCRM implementation....

The answer is, of course, it depends. But what are the critical factors?

-- Data base size (Number of contacts and number of custom data fields, relationships, groups, etc.)
-- Number of users (light usage vs. heavy usage)
-- What other applications will be running? (A CMS with a small data base or Jasper Reports with a lot of simultaneous users.)

I think it would be good to put forth some guidelines or rules of thumb.

For example for a database with 30,000 contacts, 200 custom data fields, a few dozen groups and relationships, integrated with a Drupal website with 200 pages with 5-10 heavy Civi users and a few hundred authenticated users….what you recommend and why? What if those 5-10 Civi users were also running Jasper reports?

If you have experience hardware sizing or, even better, if you are a hosting provider I’d love to hear what...

Read more
06 January, 2010
By Eileen
Filed under Architecture

Recently someone asked about setting up an autocomplete in a profile where the person completing the form would be offered the name of existing organisations in the database. We have implemented this with a couple of different variations and I did promise to provide some information on this so here goes. I’ll try to explain a whole lot of ‘customising civicrm’ concepts but this isn’t a step-by-step recipe you’ll have to add a fair bit of technical know-how/ extra reading to flesh this out for your own purposes. I have added a recipe-type summary at the end just to sum up. Areas I will touch on are:




  • Customising a template
  • ...
Read more
09 December, 2009
By shot
Filed under Architecture, CiviCRM

As we’re closer and closer to the release of CiviCRM 3.1, we began thinking what to schedule in CiviCRM 3.2. As one of the features we want to add is the ability to undelete certain CiviCRM entities, we want to discuss with the community the initial approach to undelete that we came up with – along with a sketch of logging functionality that we consider for a future release.

General Remarks

To make both of these features successful, we need something that’s both generic (i.e., works in the same way – or, at least, similarily – for all/most of the CiviCRM tables) and transparent from the perspective of the existing codebase. The experience with multilingual support done in that matter convinced us that it’s a sane approach; move as much as possible to the database layer, sprinkle with views and triggers if needed, add a bit of logic to CRM_Core_DAO and make the existing codebase blissfully unaware that there’s hidden functionality beneath (with the...

Read more