AbstractAction with notBeforeDate
GG-CE recognizes the following action states:
-
in progress: Action has a
startDate
but nocompletedDate
-
completed: Action has a
completedDate
and astartDate
-
pending: Action does not have
startDate
The startDate
documents the date and time when the action actually began and is in progress. One could set the startDate = tomorrow
and that means that the action will definitely be started (tomorrow). When we look at the action records tomorrow, this action will be marked as in progress.
The current data model allows us to capture actions that we do, but it does not allow for effective planning of activities. When we add 1000 pending actions for viability testing, then we have 1000 pending actions with no mechanism to prioritize or delay the actions.
notBeforeDate
The new field notBeforeDate
in AbstractAction
allows the user to register an action that does not need to be considered before the specified date. This effectively introduces a change in states of action records:
-
pending: Action does not have a
startDate
andnotBeforeDate
is not defined or is before today (notBeforeDate is null OR notBeforeDate <= today
) -
scheduled: Action does not have a
startDate
and has anotBeforeDate > today
Code changes
Add to AbstractAction
:
@Basic
@Column(name = "not_before_date")
protected Date notBeforeDate;
@Basic
@Column(name = "not_before_date_code", length = 20)
@CodeValueField(CommunityCodeValues.DATE_FORMAT)
protected String notBeforeDateCode;
Update ActionFilter
with public DateFilter notBeforeDate
.
The current controllers and services seem to be OK even with this addition.