Skip to content

Assign and normalize a task due date

This operation runs whenever TaskDate is assigned, normalizing non-working-day dates to a working day according to the configured TaskDateModifierType.

Field Value
Operation ID OP-5
Trigger Any assignment to TaskDate
Inputs Candidate date, TaskDateModifier
Outputs Normalized TaskDate, TaskDateModified flag
Primary components clsTask.AssignTaskDate
Entry point SAIF.Business.Tasks/clsTask.vb

Steps

  1. Store the date and reset TaskDateModified = False.
  2. If the date is neither Date.MinValue nor Date.MaxValue, branch on TaskDateModifier:
  3. CurrentDay: no adjustment.
  4. NextWorkDay: if not a working day, move to m_TaskDate.NextWorkDay and set TaskDateModified.
  5. PriorWorkDay (default): if not a working day, step back one day at a time until a working day is found and set TaskDateModified (BR-009).

    Origin: Working-day determination (clsSmartDate.IsWorkingDay / NextWorkDay) is implemented in the SAIF BOF Framework and was not traced in this analysis pass.**

  6. The CheckDateModified rule then raises a non-blocking warning when TaskDateModified is true (BR-008).

Process flow

The following diagram visualizes this operation's control flow.

flowchart TD
    Start([TaskDate assigned]) --> S1[Reset TaskDateModified]
    S1 --> D{"Date is MinValue or<br>MaxValue?"}
    D -->|Yes| EndNoAdj([No adjustment])
    D -->|No| M{TaskDateModifier}
    M -->|CurrentDay| EndNoAdj
    M -->|NextWorkDay| S2["Move to NextWorkDay if<br>needed"]
    M -->|PriorWorkDay| S3["Step back to prior working<br>day if needed"]
    S2 --> EndAdj([TaskDateModified set])
    S3 --> EndAdj

Failure and edge-case behavior

  • Date.MinValue/Date.MaxValue sentinel values bypass normalization entirely (used to represent "no date").
  • Automatic shifting is surfaced only as a non-blocking warning, not a save-blocking error (BR-008).

Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with ** could not be confirmed; treat as unknown until verified.

Sources

  • SAIF.Business.Tasks/clsTask.vb