Creating the plan matter (#273 ) requires that a plan has non-zero initiation date.
So let's add a new trigger: when INSERTing NEW plan, let's save the current time in lifecycle_date with lifecycle_status "02" (vireilletullut).
Also, we want a date to be present for all regulations, propositions and plan objects, so let's add the trigger in all the tables with lifecycle status. However, the date should always have same status as plan, so let's set the lifecycle_status by looking at plan lifecycle_status.
Will have to do this now to get plan matter tests up and running. Or at the very least, will have to add statuses to newly created objects.
Creating the plan matter (#273 ) requires that a plan has non-zero initiation date.
So let's add a new trigger: when INSERTing NEW plan, let's save the current time in lifecycle_date with lifecycle_status "02" (vireilletullut).
Also, we want a date to be present for all regulations, propositions and plan objects, so let's add the trigger in all the tables with lifecycle status. However, the date should always have same status as plan, so let's set the lifecycle_status by looking at plan lifecycle_status.
Will have to do this now to get plan matter tests up and running. Or at the very least, will have to add statuses to newly created objects.