Closed (fixed)
Project:
CRM Core
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
11 Feb 2013 at 17:02 UTC
Updated:
30 May 2014 at 18:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
pingers commentedShouldn't be too much more than this patch... reviews welcome.
Comment #2
rosk0Looks like this issue is bigger that seems at first glance.
Description of crm_core_contact_revision.uid said: "The users.uid that created this version.". But it stores UID of user that create the contact OR UID of user associated with contact. That's not all - there is no revisions of contacts. The revisions table is just an extended version of base table. I've also discovered that there is some bugs it saving created/changed timestamps, but have no time to collect more info. All of this probably should be decomposed to several issues, but I really have no time for it right now.
Comment #3
pingers commentedThese have little do with this issue... they're just things you noticed while looking at it. Please open issues as appropriate.
Comment #4
pingers commented"Description of crm_core_contact_revision.uid said: "The users.uid that created this version.". But it stores UID of user that create the contact OR UID of user associated with contact."
- What makes you think the role of uid column is shared? I.e. there's a relation to handle user->contact relationship. This is ONLY about which user created/updated the contact.
"That's not all - there is no revisions of contacts. The revisions table is just an extended version of base table."
- Yes, we have not enabled revisions, but entity api supports revisions. You should just need to set $entity->is_new_revision when saving a contact to create a revision. Haven't tried it though.
"I've also discovered that there is some bugs it saving created/changed timestamps, but have no time to collect more info. All of this probably should be decomposed to several issues, but I really have no time for it right now."
- Okay, so let's figure out if this is a real bug when we get time.
Comment #5
dealancer commentedThe solution looks good.
I would prefer to test it when creating new contacts. Need to make sure uid field is populated correctly.
Comment #6
pingers commentedPlease do :)
Comment #7
dealancer commentedGood work: update and new contact creating works well.
Comment #8
pingers commentedCommitted in 84aa361
Comment #9
Anonymous (not verified) commentedwh00t!