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.

Comments

nagy.balint’s picture

I 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.

pvhee’s picture

Issue summary: View changes

Would 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.

jcisio’s picture

Version: 7.x-1.0-rc1 » 7.x-1.x-dev
jeroen.b’s picture

I 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.

jeroen.b’s picture

StatusFileSize
new3.51 KB

Sorry, I made some path errors in my patch. Here's a proper version.

jeroen.b’s picture

StatusFileSize
new3.34 KB

Sigh, and again.

ciss’s picture

Status: Active » Needs review
ciss’s picture

@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?

jcisio’s picture

We 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.

pvhee’s picture

StatusFileSize
new4.54 KB

@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.

  • jcisio committed 3aaecf8 on 7.x-1.x authored by jeroen.b
    Issue #1955240 by jeroen.b, pvhee, jcisio | teenage: Added Missing Atom...
jcisio’s picture

Status: Needs review » Fixed

I 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.

jeroen.b’s picture

Status: Fixed » Needs work

@jcisio I think you made a typo, the update function is "scald_update_6012", shouldn't that be "scald_update_7012"?

  • jcisio committed fb6db5c on 7.x-1.x
    Issue #1955240: fix commit 3aaecf8
    
jcisio’s picture

Status: Needs work » Fixed

I 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.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.