AronGahagan / cpt-dev

Code repository for the ClearPlan Toolbar
https://www.ClearPlanConsulting.com
3 stars 1 forks source link

[Cobra Export] - [Impossible Assignment Date Errors] #320

Open ryanbeard82 opened 1 year ago

ryanbeard82 commented 1 year ago

Describe the bug When assignment Baseline Finish < Baseline Start, unhandled error occurs on line 279: Set tsvs = tAss.TimeScaleData(tAss.BaselineStart, tAss.BaselineFinish, pjAssignmentTimescaledBaselineWork)

This occurs on both the BCWS export and in the Validation Report because the TimeScaleData evaluation fails entirely.

Expected behavior Need error handling to mitigate impossible date scenarios when dealing with TimeScaleData. Should consider evaluating pjAssignmentTimescaledBaselineWork and backing into Baseline Start / Finish dates when an error is encountered.

AronGahagan commented 1 year ago

suggestion - since at this point all we're trying to get is the total of the timescaled baseline work/cost, and baseline date alignment will be checked elsewhere, how about we use something like Set tsvs = tAss.TimeScaleData(ActiveProject.ProjectSummaryTask.BaselineStart, ActiveProject.ProjectSummaryTask.BaselineFinish, pjAssignmentTimescaledBaselineWork, pjTimescaleYears, 1)?

ryanbeard82 commented 1 year ago

Theoretically could experience the same issue at the summary level - the problem is that baseline date fields are static and not tied to the timescales values for baseline work. Just need to implement some additional logic to check for the assignment baseline date issues before pulling timescale values.