Uploaded image for project: 'Magnolia Resources Module'
  1. Magnolia Resources Module
  2. MGNLRES-31

set the creation date/modification date on resource installation

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Major Major
    • None
    • 1.4
    • None
    • None

      In MGNLRES-30 the update of the creation date was not committed. This has to be fixed. We should problably also set a creation date on the files which have no such date yet (in an update task)

      The patch:

      Index: InstallResourceTask.java
      ===================================================================
      --- InstallResourceTask.java	(revision 39888)
      +++ InstallResourceTask.java	(working copy)
      @@ -99,6 +99,12 @@
                   name = StringUtils.replace(name, ".", "-");
                   Content node = ContentUtil.getOrCreateContent(parent, name, ItemType.CONTENT);
                   node.getMetaData().setTemplate(template);
      +            if(node.getMetaData().getCreationDate() == null){
      +                node.getMetaData().setCreationDate();
      +            }
      +            else{
      +                node.getMetaData().setModificationDate();
      +            }
                   NodeDataUtil.getOrCreate(node, "text").setValue(content);
                   NodeDataUtil.getOrCreate(node, "extension").setValue(extension);
                   NodeDataUtil.getOrCreate(node, "version").setValue(version);
      
      

        Acceptance criteria

              pbaerfuss Philipp Bärfuss
              pbaerfuss Philipp Bärfuss
              Nucleus
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: