Sinar / popolo.contenttypes

GNU General Public License v2.0
1 stars 2 forks source link

Show correct date in author section. #43

Closed arky closed 3 years ago

arky commented 3 years ago

This minor fix ensure that correct date is show in the Author view instead of the beginning of unix epoch.

image

Downstream bug https://github.com/OpenDevelopmentMekong/InvestmentMappingProject/issues/20

kaerumy commented 3 years ago

Fix for this would be to show "Unknown" or "Not Set" if effective date has not been set. It shows epoch, becuase guessing it is 0 because it hasn't been set. Effective date is basically Publication date for Dublin Core.

Replacing it with modified as per pull request will mean that instead of showing the publication date of the source, it will show the last time the content has been modified, which is whenever the Source information has been edited and saved.

A better fix would be to modify the python schema fieldset so that Publication date field selection is shown on the main form instead of hidden in the "Dates" tab, which will improve usability and get the user to enter publication date before saving.

https://docs.plone.org/develop/addons/schema-driven-forms/customising-form-behaviour/fieldsets.html

arky commented 3 years ago

Thanks @kaerumy used EffectiveDate which returns none correctly.

There is no need to set 'Unknown' or 'Not Set' as empty string signifies the same thing.