Would be nice if we could use this in combination with workbench moderation module.

Members fund testing for the Drupal project. Drupal Association Learn more

Comments

malcomio’s picture

Yes this would be ideal - the use case we have is for allowing editors to create pending drafts of files that can be published on a specific date.

If possible, I will try to put a patch together for this

damianrobinson’s picture

This new patch adds basic workflow to file entities. Functionality includes:

  1. When a new file is uploaded, the new file revision does not become the current revision. The new file is an unpublished revision of the file.
  2. New columns added in the Revisions tab - Revision Operations which allows download of each file revision, and Moderation Actions - which enables publishing and unpublishing of each file revision.
  3. Integration with Scheduled publishing still works as expected

Notes
This patch is based the following 2 patches - which are rolled into this new one,
https://www.drupal.org/node/2097975
https://www.drupal.org/node/2228441

damianrobinson’s picture

damianrobinson’s picture

missed part of the patch

pcrats33’s picture

I've been working with your patch and I have a couple small concerns regarding the function file_entity_revisions_persist_file_revision. Its purpose is to not make the new revision the current revision, but it does this even if the previous revision is a draft (ie draft to new draft, previous draft is still current). Also it doesn't copy over the uri so the current uri can be invalidated. Otherwise I like where this is going, i'm trying to see about using it with workflow now.

damianrobinson’s picture

Thanks, yes I agree there are a lot of scenarios to think about here. Any contribution would be appreciated.

farse’s picture

looks like this patch fails on the latest 7.x-2.x-dev version as it was made for 1.x