Closed (fixed)
Project:
Profile 2
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
21 Jan 2011 at 20:03 UTC
Updated:
19 Jan 2012 at 19:20 UTC
Is there any way to know when a profile was last updated (equivalent of 'changed' value for nodes). The use case is to display when a profile was last updated and show how current it is.
Comments
Comment #1
fagoNo, currently not. However I agree that we should keep that date, as well as a creation date.
Comment #2
scor commentedShould that be pushed to entity API to have some more generic metadata on all entities?
Comment #3
geerlingguy commentedI would really like this feature as well, as it would help in synchronizing data on the drupal site with external systems that aren't well-built (many Churches and nonprofits I work with use Excel or other weak member storage systems and manually synchronize data based on updated dates. Even though it's silly, this would help them a lot).
Comment #4
geerlingguy commentedIt seems Node module currently has to do the date stuff on it's own, but if Entity API could handle dates and revisioning for all entities, that would be a bonus. I wouldn't hold my breath, though :)
Comment #5
MacRonin commentedJust another person mentioning that I would find having the updated/created date to be a very useful addition.
While including as part of the Entity code would probably be the most generic(and beneficial) solution. Since Entity has a whole bunch of things in their wish-list, as @geerlingguy mentions it probably won;'t be happening at that level anytime soon.
Personally I'd like to have that info ( updated/created date ) for each field but I'm not that greedy :-)
Comment #6
geerlingguy commentedFor field data, the Profile2 Revisions module might be able to help - aren't field API fields' revisions stored with a time stamp? Anyways, node.module handles the updated column itself... So yeah, not thinking Entity API will do this soon.
Comment #7
MacRonin commentedThanks @geerlingguy I didn't know about the 'Profile2 Revisions module'
I took a quick search and didn't see it, but I'll look deeper in case it's part of a general Revision, Diff or Entity project
Comment #8
fourmi4x commentedI counld't find the "Profile2 Revisions module" either.
I agree that having the creation date, at least, would be great.
In fact, I badly need this... Any idea how I could get it, even if it's not a very "clean" way ?
EDIT: Ok I just created a date field with default value "Now" on the profile...
Comment #9
geerlingguy commentedOh... I actually meant User revision, though if Entity API supported revisions (#996696: Support revisions in Entity API), then this would all be a bit easier.
Comment #10
scor commentedThis will work for "Creation date" but for last updated date, you will need to update that field value programmatically on entity save.
Comment #11
fourmi4x commentedYep, but I just needed the creation date.
I guess using the Computed field module would do it for an updated date field.
Comment #12
a.siebel commentedI think a "updated" field would be very important - I have an adressbook filled with uder profiles - Without "Updated date" field users have no information when the adress was last updatet.
Comment #13
fagoI've implemented that (created + changed) as usual with regular entity properties. For existing profiles the values will be just NULL, while upon edit the changed date is going to be set.
Of course, those properties are also available in views, rules, search api, as tokens, ...
Comment #14
geerlingguy commentedThank you, fago!
Comment #15
scor commentedFor the records: http://drupalcode.org/project/profile2.git/commit/3b948e7