Hi,
Since Scald manages "in fine" files there should be some information about creation and change of atom.
As for node, two columns should be added to the scald_atoms table : created and changed.
This should particularly useful when you provide web service with cache keys calculated on modification date.
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | scald-add_create_changed_timestamps-1955240-10.patch | 4.54 KB | pvhee |
Comments
Comment #1
nagy.balint commentedI was after the same thing not long ago. At the end I created a date field, as the atom is fieldable.
Of course then the date field should be hidden in a form alter so it keeps its default value.
Not the ideal solution but it works.
Comment #2
pvhee commentedWould be interested to see this as well, it's sort of a standard for entities in Drupal so I was surprised to see this missing in Scald.
Comment #3
jcisio commentedComment #4
jeroen.b commentedI created a patch for Scald 1.2, see attachment.
Note: This patch will not change anything in the view. It will only save the data, you will have to do the display yourself for now.
Also don't forget to drush updb or go to update.php.
Comment #5
jeroen.b commentedSorry, I made some path errors in my patch. Here's a proper version.
Comment #6
jeroen.b commentedSigh, and again.
Comment #7
ciss commentedComment #8
ciss commented@jcisio: What's your take on this issue? I suspect leaving out created/modified dates was a conscious decision. If that is the case, what was the reasoning behind it?
Comment #9
jcisio commentedWe are ok to add these two fields.
The reason why they were not present is IMO it is not always necessary: the "creation date" is not necessarily the date a media is added in Drupal (like "uid/publisher" is not "author"). And when it is needed we use a date field for some atom types.
Comment #10
pvhee commented@jeroen.b @jcisio the patch in #6 is working great. I've added Views support to these two new fields as well, see patch attached.
Comment #12
jcisio commentedI added the index creation in the hook_update_N() too, and committed and pushed. Thanks all for the team work!
Change notice created https://www.drupal.org/node/2335653 but still is brief.
Comment #13
jeroen.b commented@jcisio I think you made a typo, the update function is "scald_update_6012", shouldn't that be "scald_update_7012"?
Comment #15
jcisio commentedI was testing the update and it was half broken so I did some dirty tricks but forgot to revert this function name change. Thanks, corrected and pushed.