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) »
  • Discussion (deprecated) »
  • Feature Requests and Suggestions »
  • Community Sponsored Improvements (Moderator: Donald Lobo) »
  • Contact versioning / revision history
Pages: [1]

Author Topic: Contact versioning / revision history  (Read 9293 times)

mfb

  • Guest
Contact versioning / revision history
June 13, 2008, 07:49:17 pm
I am on the lookout for CiviCRM users who might be interested in co-sponsoring development of versioning / revision history for CiviCRM contacts.

This is a built-in and very widely used functionality in Drupal, where nodes store most their data against a version id rather than a node id, but so far has been lacking in CiviCRM.

Many CiviCRM users would benefit from, and some may even require a complete audit trail of contact data as it is entered and modified over time.

By storing each version of a contact, including built-in and custom data fields, we can generate change records for any modification made to the data, and a revision log/audit trail UI where these records can be viewed, with date/timestamp of the change, who made the change, and any comments.  There should be an ability to export a CSV of all change data.  Arbitrary reporting capabilities on the data may be needed; CiviCRM API methods could allow developers to search and extract data from the revision history.

Please chime in here if you're interested in this feature and/or could help support development.

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Contact versioning / revision history (attribute level)
June 14, 2008, 01:32:20 am
Hi,

My specific needs are fairly basic and would be covered by what you describes:

- being able to track changes before/after the contact himself modifies his datas (eg. registration on an event with a profile)
- being able to track changes on the imports (easy way to quickly mess a lot of contacts in a row).

My experience with storing all the versions of all the fields everytime you modify a single letter is that it quickly becomes unbearably slow (won't drop name, but the guilty should recognise themselves). I personally think there is a much bigger risk in slowing down the regular "edit" of a contact by 0.5 second than overwriting the previous version.

Instead of storing the before/after of all the fields, I'd rather have a system that only stores the ones that have changed (Yes, I'm aware that checking which ones have changed might be as time consuming as copying them). However, having a "attribute granularity" in the history would fit very well with another feature i'd love seeing:

front office "web 2"  editing, eg. in the view contact page, you double click on the first name on the person, this transforms it into a field and add a save/cancel button, you can alter the first name and saves it directly, without having to go through the complete edit page with all the fields. In this usage scenario, saving the fields separately (even with keeping the history) would actually be quicker than saving all the fields of the contact.

Another feature that is somehow related to the contact/field versioning is provide a beloved "undo" instead of the uber annoying "are you sure you want... ?".

What do you think ?

On my side, I'm willing to put some money on the table to see an contact versioning, I'd strongly suggest doing it at the attribute level, and I'm going to try enrole people around for that idea.

Stay tuned...

X+


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

geilhufe

  • I post frequently
  • ***
  • Posts: 293
  • Karma: 33
    • Social Source Software
Re: Contact versioning / revision history
June 15, 2008, 07:55:00 pm
Not sure versioning is really the answer here. Most other systems basically write a log of changes... time, user, original value, new value.

Basically if you want to "revert" a contact, you manually figure out the fields that need to be reverted. Easier on the system, not complex functionality. And if you want to do something sophisticated, you can build code to do it.

This is been kicking around since 2005:  http://issues.civicrm.org/jira/browse/CRM-231
Drupal and CiviCRM consulting, strategy and configuration
http://www.social-source.com/

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: Contact versioning / revision history
June 15, 2008, 11:27:05 pm

I think one potential solution for this is to use a combination of triggers and stored procedures. the system can use some UI screens to modify the default tables / fields that are being tracked. On any insert/update/delete for a row in a table, the appropriate trigger is invoked. This can call a stored procedure and based on how you want the differential stored, you can either store it in a shadow table or a log table.

There is a fair amount of info on the web on various ways to do so (search for shadow table, versioning, logging). I suspect doing it at the database level will be a faster, cleaner and more scalable approach

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: Contact versioning / revision history
June 18, 2008, 12:36:29 am
Glad to see this discussion happening. Was definitely on our list of 'hoped it would be there but it wasn't'. Depending on when this happens we may be able to chip in.
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

cap10morgan

  • I post occasionally
  • **
  • Posts: 56
  • Karma: 9
Re: Contact versioning / revision history
June 18, 2008, 08:23:48 am
Lobo's database-based solution sounds like the way to go. Especially if we can (eventually) expose some admin controls for it in the UI and functions in the API. A revision browser, revert controls, audit log viewer based on the revisions (on 9/1/07 user X edited the foo field from "blah" to "meh"), etc.

We'll probably need this too in the not-so-distant future (i.e. once more of the folks I work with start using Civi, they'll ask for it). :)

hoffmanc

  • Guest
Re: Contact versioning / revision history
February 04, 2009, 07:24:31 am
What is the status of this improvement?

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: Contact versioning / revision history
February 04, 2009, 07:51:07 am

tha same place as it was on june 18. still in the feature request/suggestion queue. this is currently not on the short/medium term roadmap. will need to be either community contributed or sponsored feature

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

JoeMurray

  • Administrator
  • Ask me questions
  • *****
  • Posts: 578
  • Karma: 24
    • JMA Consulting
  • CiviCRM version: 4.4 and 4.5 (as of Nov 2014)
  • CMS version: Drupal, WordPress, Joomla
  • MySQL version: MySQL 5.5, 5.6, MariaDB 10.0 (as of Nov 2014)
Re: Contact versioning / revision history
November 11, 2009, 04:01:58 am
A client of mine who is considering CiviCRM would like to support a workflow where all additions/updates/deletes to contact information need to be QA'd by one role. There are some fairly simple business rules around what to do with contacts which have not yet been QA'd (eg don't use for direct mail til QA'd, use new info immediately for telemarketing and online engagement). The QA function seems to require a bit of workflow to support QA'ing oldest un-QA'd contacts first, and marking a NeedsQA field appropriately. The versioning doesn't need to be deep and can be flattened to the current record after QA. For our purposes, it would only be necessary to store the last QA'd version and the cumulative changes through multiple edits until the upcoming QA. Other organizations likely have different or supplementary needs along the lines of an audit log.

I think there is a much stronger need for versioning Contact information in the community than there is for versioning other CiviCRM data (CiviContribute, Activities, etc).

What would be a ballpark estimate to add versioning?

My strong sense is that the client cannot support the whole tab for this, and we would need to seek other sponsors from community. People should pipe in if there is any possibility of funding in early 2010 for this.
Co-author of Using CiviCRM https://www.packtpub.com/using-civicrm/book

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: Contact versioning / revision history
November 11, 2009, 06:35:17 am

if i had to take a random guess, revisioning for contacts is probably a HUGE project (note that this encompasses a lot of other tables in addition to civicrm_contact (address, phone, email,  notes, activity, all custom fields etc). This is not including any of the component tables (contribution etc)

i'd probably throw out at least 300-400 hours to begin with. it will be a major release (IMO)

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

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Feature Requests and Suggestions »
  • Community Sponsored Improvements (Moderator: Donald Lobo) »
  • Contact versioning / revision history

This forum was archived on 2017-11-26.