Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The answer Jon gave above was correct at the time, but as of version 4.2 of MPXJ, the api for dealing with timephased work (and cost) has been changed considerably. Here's what you would do now:</p> <p>This part's the same:</p> <pre><code>TimescaleUtility timescale = new TimescaleUtility(); ArrayList&lt;DateRange&gt; dateList = timescale.createTimescale(startDate, TimescaleUnits.DAYS, length); </code></pre> <p>This has changed (notice the different return type and method for getting the planned work, and the new method on the TimephasedUtility class):</p> <pre><code>List&lt;TimephasedWork&gt; plannedWork = assignment.getTimephasedWork(); ProjectCalendar calendar = assignment.getCalendar(); TimephasedUtility util = new TimephasedUtility(); ArrayList&lt;Duration&gt; durationList = util.segmentWork(calendar, plannedWork, TimescaleUnits.DAYS, dateList); </code></pre> <p>One thing you also have to know is that the planned work data <strong>only contains values for work that has not been completed yet</strong> (ie, no actual values have been recorded for that time). For example, if your assignment lasts for 4 days, and you've completed 50% of the work, then you will have timephased ACTUAL work values for the first two days, and timephased PLANNED work values only for the last two days. They do not overlap or duplicate. </p> <p>So if you are trying to show planned work values for the whole time period of the assignment (like what you'd see in the Task Usage views in MS Project), you'd need to also retrieve the timephased actual work values and use them as if they were planned work too.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload