Uploaded image for project: 'Magnolia DAM Module'
  1. Magnolia DAM Module
  2. MGNLDAM-170

Add "revert to original" action to Image Editor (for Assets)

    XMLWordPrintable

Details

    • Task
    • Resolution: Won't Do
    • Major
    • None
    • None
    • None
    • None

    Description

      Note that this action is only available when editing an Asset image, not for example a Contact image.

      While it may be possible to get this feature quickly working for just a demo - ie by storing another "original" binary on the same asset node that does not get edited - this will not satisfy the actual requirements of the specced feature. It could be that there is some overlap in the "quickfix/hack" and the actual implementation.

      Please see this page for analysis of where the binary for the original should be stored: http://wiki.magnolia-cms.com/display/DEV/Concept+-+Workspace+structure+for+assets+with+originals

      Please see this doc for full specification of original/variant functionality: http://wiki.magnolia-cms.com/display/UX/Digital+asset+management

      FYI: actual resource is stored on asset node on "/jcr:content" node.

      Quickfix Concept:

      • /jcr:content-original node can save the original resource on the same asset node.
      • On saving an edit, check if /jcr:content-original exists, if not: copy /jcr-content to it before saving edit.
      • On uploading a new file, delete /jcr:content-original node
      • On duplicating an asset - be sure /jcr:content-original is also duplicated (I guess everything is)(Of course this wastes space (duplication of original).)
      • On "Revert to original" click, copy /jcr:content-original to /jcr:content and delete /jcr:content-original

      Questions/Problems:

      • What about the "asset family" - How could you find all variants of the original? Do you need to be able to? Probably yes -this could be implemented by storing an extra reference when things are duplicated.
      • If implementation changes later, how messy would it be to have this implementation? Migration? Some nodes use once technique, some nodes use the other technique?

      Implementation Notes:

      • Resource node of asset is updated after upload and edit in FileItemWrapperImpl.populateJcrItemProperty() This could be the place to check if an original exists yet, and copy the resource there if not, before saving the changes.
      • Upload saving happens in AbstactUploadFileField.uploadFinished() with fileItem.updateProperties() and fileItem.populateJcrItemProperty()

      Checklists

        Acceptance criteria

        Attachments

          Activity

            People

              Unassigned Unassigned
              dlipp Daniel Lipp
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Checklists

                  Task DoR