Published date property or published date in the past

Hi,

I have 2 questions.

  1. Publish date in api response (not present)
    Currently we have a “created” and “lastModified” date present in the data objects for items.
    But there is not a actual “publishedDate” or something of the sort.

I am currently working on a news article website and i would like to show the articles posted/published date. Now if the article is made and published at the same day and time it got created, using the “created” property is fine.

But if an article is planned to be published a day or 2 later, both “created” and “lastModified” property wont be useable to show a date.

Now i have found this topic on the support forum: [IMPLEMENTED] Align publishing flow stating the same issue and it seems there was a discussion about a published date property, but it does not seem present in the api call response for the items? Was the discussion regarding the other parts or was it ment there should be a published date property being implemented?

I like to use a property from the response from the api (like “publishedDate”) without having to add a Date Field to my items where the author has to set a date for an item manually and have to take into account a later set publish date aswell when doing so.

  1. Publish date in the past
    Currently we are migrating from an old cms/api system, meaning we have to import previously posted articles. Right now i don’t see a way to set an items “created” date (or a currently missing published date) in the past, and also the current method to set a published date only allows a date in the future.

I would rather not add a Date Field to my items where the author has to manually set a date in the past to use for our article dates that got imported. This would also lead to a Date field that will be present in all items created that wont need a date field for this and so will be left unused for new items.

So what it comes down to is that i am missing a “publishedDate” property with the actual date an item got published in the api response.

I hope i am clear, if not please let me know and i will clarify or add where needed.
I am also not 100% sure if this should have gone in the feature request section, given i found an topic there kinda of stating/asking the same that was marked “implemented”.

Thanks.

In your use I would create a published field and then I can extend scripting to provide the current date time which can be then set automatically.

So you create a field “Published” which is set to “Disable in UI”, then we write a script for this schema, which populates the field when the content item is published.

Hey Sebastian,

thanks for the help.
I have setup the proposed field “published”.
Let me know what i should do from here.

Also will this work with/allow a publish(ed) date in the past since we are migrating “old” articles?

Thanks.

For now I would suggest that you either show the publisheddate field when it exists (e.g. imported) or the “lastUpdated” property. LastUpdated is also updated when the status is changed.

I can make an extension to update the published date field automatically through custom javascript scripts.

Alright, but the LastUpdated property would also update if an author would change something a day or 2 later is it not? making this date incorrect at that point.

Also i should have been clear, we are not importing from a previous squidex app. We are moving to squidex so we manually create the articles again, but need a way to have the date it is published/created in the past for these old articles to show this date on the frontend. Sorry for being unclear about this.

Yes, I understand that, but you can start with that and improve it when I am done with the improvements for Squidex.

Ok, thanks again Sebastian. i will wait for the improvements and continue with the proposed solution.