[MGNLRES-31] set the creation date/modification date on resource installation Created: 01/Dec/10  Updated: 29/Mar/22  Resolved: 03/Dec/10

Status: Closed
Project: Magnolia Resources Module
Component/s: None
Affects Version/s: 1.4
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Philipp Bärfuss Assignee: Philipp Bärfuss
Resolution: Obsolete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to MGNLRES-62 Modification date of reinstalled reso... Closed
dependency
depends upon MAGNOLIA-3437 Change activation menu in all trees t... Closed
relation
is related to MAGNOLIA-3442 modification date is null for content... Closed
supersession
supersedes MGNLRES-30 installation tasks should set the cre... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Team: Nucleus

 Description   

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);



 Comments   
Comment by Philipp Bärfuss [ 01/Dec/10 ]

All I have committed for MGNLRES-30 are changes in spaces! Grrrr!

Comment by Philipp Bärfuss [ 03/Dec/10 ]

We are going to fix that by MAGNOLIA-3442 (return creation date if modification date doesn't exist)

Comment by Philipp Bärfuss [ 03/Dec/10 ]

This fix becomes obsolete due to MAGNOLIA-3442

Generated at Mon Feb 12 06:46:41 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.