[MAGNOLIA-5625] Time of creation should be set automatically when adding new nodes Created: 15/Jan/14  Updated: 28/Jan/14  Resolved: 25/Jan/14

Status: Closed
Project: Magnolia
Component/s: core
Affects Version/s: None
Fix Version/s: 5.2.2

Type: Improvement Priority: Major
Reporter: Tobias Mattsson Assignee: Daniel Lipp
Resolution: Fixed Votes: 0
Labels: next
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
dependency
depends upon MAGNOLIA-5634 SecuritySupport will always be null w... Closed
is depended upon by MGNLDAM-381 Do no longer explicitly set mgnl:created Closed
is depended upon by MGNLUI-2625 Do no longer explicitly set mgnl:created 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)
Release notes required:
Yes
Date of First Response:

 Description   

The mgnl:created mixin defines a property mgnl:created which contains the time when the node was created. It needs to be set explicitly which is currently done in the content api, by JcrNewNodeAdapter and in AddNodeAction.

A better solution would be to add this automatically whenever a new node is created. We have this in place for the mgnl:lastModified mixins.

We should extend the LastUpdateContentDecorator to also manage creation date. It should also be renamed to match its new scope of responsibility.



 Comments   
Comment by Daniel Lipp [ 24/Jan/14 ]

Resolved by adding an extended version of LUD-wrapper.

Comment by Magnolia International [ 24/Jan/14 ]

Issues spotted so far:

  • some unused code was left in (info.magnolia.jcr.wrapper.MgnlPropertySettingContentDecorator.SetMgnlCreatedDateOp)
  • in case of copy we should also set the mgnl:created date to now - luckily we already have the session and workspace wrappers that do it for the mgnl:lastModified properties)
Generated at Mon Feb 12 04:06:52 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.