Changeset 17825

Show
Ignore:
Timestamp:
08/05/08 03:52:11 (4 months ago)
Author:
sjmittal
Message:

fix for 5789
retain decimal precision for baselines

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/core/src/net/project/schedule/TaskFinder.java

    r17022 r17825  
    737737        task.setBaselineEnd(DatabaseUtils.makeDate(result.getTimestamp(BASELINE_END_COL_ID))); 
    738738        if (result.getString(BASELINE_WORK_COL_ID) != null) { 
    739             task.setBaselineWork(new TimeQuantity(result.getInt(BASELINE_WORK_COL_ID), TimeQuantityUnit.getForID(result.getInt(BASELINE_WORK_UNITS_COL_ID)))); 
     739            task.setBaselineWork(new TimeQuantity(result.getDouble(BASELINE_WORK_COL_ID), TimeQuantityUnit.getForID(result.getInt(BASELINE_WORK_UNITS_COL_ID)))); 
    740740        } 
    741741        if (result.getString(BASELINE_DURATION_COL_ID) != null) { 
    742             task.setBaselineDuration(new TimeQuantity(result.getInt(BASELINE_DURATION_COL_ID), TimeQuantityUnit.getForID(result.getInt(BASELINE_DURATION_UNITS_COL_ID)))); 
     742            // Construct the baseline duration as a TimeQuantity 
     743            TimeQuantityUnit basseLineDurationUnits = TimeQuantityUnit.getForID(result.getString(BASELINE_DURATION_UNITS_COL_ID)); 
     744            task.setBaselineDuration(new TimeQuantity(new BigDecimal(result.getString(BASELINE_DURATION_COL_ID)), basseLineDurationUnits)); 
    743745        } 
    744746