Maintain Relative Dates of Original Assets

0 Kudos

We need to see a list of assets by their original publish date.  So far it looks like the dates available to us in reports and file view are limited to the specific asset rather than the original.  For example, if a web page goes live on 1/1/2022, but we branch the asset on 2/1/2022 to promote an update that goes live on 3/1/2022, then the 1/1/2022 date is lost and replaced by information only about the branched asset.  In other popular systems dates are maintained in context so that backend reports are more functional and functionality is accomplishable (ie, show user list of web pages sorted by oldest to newest).

2 Comments
EdwardChan
Crownpeak Employee
Crownpeak Employee

The CMS stores the dates for an assets state changes (eg. draft, stage, live) via a StatusDate property. When you branch an asset the branch generally enters into a new state (eg. the draft state) and so the asset would get a new value for the StatusDate. There are no properties out of the box for when the original branch enters the live state. If you want to maintain the date for when an asset initially goes live, what you could do is save that date to the asset's content fields. For example you could use the following code in the post_publish.aspx template file:

if(string.IsNullOrWhiteSpace(asset["live_date"]))
{
   if(asset.WorkflowStatus.Name.ToLower() == "live")
   {
      asset.SaveContentField("live_date", asset.StatusDate.ToString());
   }
}

When you branch an asset, the content fields are cloned to the branch so the initial date is maintained. Hope this helps.

 

mburgess
Elite Observer

Ed,  Thank you for the suggestion.  This feels a bit like a hack to accomplish what is standard functionality in other platforms. Would love to see this simple improvement become standard functionality.