Add a new base table property to Log entities for storing the timestamp that the logged event did/will occur at. Currently, Log entities have "created" and "modified" timestamp properties that are used behind the scenes merely to keep track of changes to the entity itself. But the whole idea of a Log item is that it is an event that did/will take place at a specific time. Currently, all the log types provided in farmOS have a Date field on them (field_farm_date) for this purpose. This date field should be provided by default, like the Log's name.

Note that this will also mean that when it rolls out, all existing field_farm_date fields will need to be auto-migrated to the base Log date field.

Comments

m.stenta’s picture

m.stenta’s picture

As I think about using this myself, I'm foreseeing the need for tasks that don't have a set date, though, too. So perhaps the date field should be optional - or maybe whether or not it is required can be set on the log TYPE level. So some log types require a set date, others don't.

The specific use-case I am thinking of is: imagine you are walking around, you see that something needs to be done, but you're not sure when you'll be able to do it. You still want to remember it, so you add an Activity log item with a blank date.

Perhaps we can package a default View to display logs without dates.

Need to give it more thought... maybe this is more than we need for the time being.

  • m.stenta committed dba5202 on 7.x-1.x
    Issue #2393477: New property: Timestamp
    
m.stenta’s picture

Status: Active » Closed (fixed)

Done! I'll be pushing out a new release of the Log module soon.