Skip to content

Commit

Permalink
Improve accuracy of populate fields
Browse files Browse the repository at this point in the history
  • Loading branch information
joniles committed Dec 16, 2024
1 parent 31abebb commit 9107aab
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 15 deletions.
16 changes: 8 additions & 8 deletions mkdocs/docs/field-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Currency Digits|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|
Currency Symbol|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓
Currency Symbol Position|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓
Current Date|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓
Custom Properties|✓|✓|✓|✓|✓|✓|✓| |✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓
Custom Properties| | | | | | | | |✓| | | | | | | | | | | | | | | 
Date Format|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓
Date Order|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓
Date Separator|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓
Expand Down Expand Up @@ -124,7 +124,7 @@ Planned Start| | | | | | | | | | | | | | |✓|✓|✓| | | | |
Presentation Format| | | | | | | | |✓| | | | | | | | | | | | | | | 
Preserve Minimum Float When Leveling|✓|✓|✓|✓|✓|✓|✓| |✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓
Preserve Scheduled Early and Late Dates|✓|✓|✓|✓|✓|✓|✓| |✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓
Project Code Values|✓|✓|✓|✓|✓|✓|✓| |✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓
Project Code Values| | | | | | | | | | | | | | |✓|✓|✓| | | | | | | 
Project Externally Edited| | | | | | | | | | |✓| | | | | | | | | | | | | 
Project File Path| | | | | | | | |✓| | | | | | | | | | | | | | | 
Project ID| | | | | | | | | | | | | | |✓|✓|✓| | | | | | | 
Expand Down Expand Up @@ -189,7 +189,7 @@ Field|Asta (PP)|ConceptDraw PROJECT (CDP)|Deltek OpenPlan (BK3)|FastTrack (FTS)|
% Work Complete| | | | | | | |✓|✓|✓|✓| | |✓|✓|✓|✓| | | | | | | 
ACWP| | | | | | | |✓| | |✓| | | | | | | | | | | | | 
Active|✓|✓|✓|✓|✓|✓|✓| |✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓
Activity Code Values|✓||✓|✓|✓|✓|✓| |✓|✓|✓|✓|✓||✓|✓|✓|✓|✓|✓|✓|✓|✓|✓
Activity Code Values|✓| |✓| | | | | | | | | |✓| |✓|✓|✓| | | | | | | 
Activity ID|✓| |✓| | | | | | | | |✓|✓| |✓|✓|✓| | |✓| |✓|✓| 
Activity Percent Complete|✓|✓| |✓|✓|✓| | |✓|✓|✓|✓|✓|✓|✓|✓|✓| | |✓| |✓|✓| 
Activity Status| | | | | | | | | | | | | | |✓|✓|✓| | | | | | | 
Expand Down Expand Up @@ -233,7 +233,7 @@ Effort Driven| | | |✓| | | |✓|✓| |✓| | |✓| | | | |✓| |
Estimated| | | | | | | |✓|✓| |✓| | | | | | | |✓| | | | | 
Expanded|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓
Expected Finish| | | | | | | | | | | | | | |✓| |✓| | | | | | | 
Expense Items|✓|✓|✓|✓|✓|✓|✓| |✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓
Expense Items| | | | | | | | | | | | | | |✓|✓|✓| | | | | | | 
External Early Start| | | | | | | | | | | | | | |✓| |✓| | | | | | | 
External Late Finish| | | | | | | | | | | | | | |✓| |✓| | | | | | | 
External Project| | | | | | | | |✓| |✓| | | | | | | | | | | | | 
Expand Down Expand Up @@ -328,7 +328,7 @@ Sprint ID| | | | | | | | |✓| | | | | | | | | | | | | | |
Start|✓|✓|✓|✓|✓|✓| |✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓
Start Slack|✓| |✓|✓| | | | |✓|✓|✓|✓|✓| |✓|✓|✓| | |✓|✓|✓| | 
Start Variance|✓|✓| |✓| | | | |✓|✓|✓| | | |✓|✓|✓| | | | | | | 
Steps|✓|✓|✓|✓|✓|✓|✓| |✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓
Steps| | | | | | | | | | | | | | |✓|✓|✓| | | | | | | 
Stop| | | | | | | |✓|✓|✓|✓| | | | | | | | | | | | | 
Subproject File| | | | | | | |✓|✓| |✓| | | | | | | | | | | | | 
Subproject GUID| | | | | | | | |✓| | | | | | | | | | | | | | | 
Expand Down Expand Up @@ -749,10 +749,10 @@ Remaining Cost| | | | | | | |✓|✓|✓|✓| | | | | | | | | |
Remaining Overtime Cost| | | | | | | |✓|✓| |✓| | | | | | | | | | | | | 
Remaining Overtime Work| | | | | | | |✓|✓| |✓| | | | | | | | | | | | | 
Remaining Work| | | | | | | |✓|✓|✓|✓| | | | | | | | | | | | | 
Resource Code Values|✓|✓|✓|✓| |✓|✓| |✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓| | |✓|✓|✓
Resource Code Values| | | | | | | | | | | | | | |✓|✓|✓| | | | | | | 
Resource ID| | |✓| | | | | | | | | | | |✓|✓|✓| | | | | | | 
Role| | | | | | | | | | | | | | |✓|✓|✓| | | | | | | 
Role Code Values|✓|✓|✓|✓| |✓|✓| |✓|✓|✓|✓|✓|✓|✓||✓|✓|✓| | |✓|✓|✓
Role Code Values| | | | | | | | | | | | | | |✓| |✓| | | | | | | 
SV| | | | | | | | | | |✓| | | | | | | | | | | | | 
Sequence Number| | | | | | | | | | | | | | |✓|✓|✓| | | | | | | 
Shift Unique ID| | | | | | | | | | | | | | |✓| |✓| | | | | | | 
Expand Down Expand Up @@ -1047,7 +1047,7 @@ Remaining Late Start| | | | | | | | | | | | | | | |✓|✓| | |
Remaining Overtime Cost| | | | | | | |✓|✓| |✓| | | | | | | | | | | | | 
Remaining Overtime Work| | | | | | | |✓|✓| |✓| | | | | | | | | | | | | 
Remaining Work|✓| |✓| | | |✓|✓|✓|✓|✓| | |✓|✓|✓|✓|✓|✓| | | | | 
Resource Assignment Code Values|✓|✓|✓|✓| |✓|✓| |✓|✓|✓|✓|✓|✓|✓||✓|✓|✓| | |✓|✓|✓
Resource Assignment Code Values| | | | | | | | | | | | | | |✓| |✓| | | | | | | 
Resource Request Type| | | | | | | | |✓| | | | | | | | | | | | | | | 
Resource Unique ID|✓|✓|✓|✓| |✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓|✓| | | |✓|✓|✓
Response Pending| | | | | | | |✓|✓| | | | | | | | | | | | | | | 
Expand Down
7 changes: 0 additions & 7 deletions mkdocs/docs/mpp-field-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ PM Text|✓|✓|✓|✓
Presentation Format| |✓|✓|✓
Preserve Minimum Float When Leveling|✓|✓|✓|✓
Preserve Scheduled Early and Late Dates|✓|✓|✓|✓
Project Code Values|✓|✓|✓|✓
Project File Path| |✓|✓|✓
Project Title|✓|✓|✓|✓
Relationship Lag Calendar|✓|✓|✓|✓
Expand Down Expand Up @@ -149,7 +148,6 @@ Field|MPP8|MPP9|MPP12|MPP14
% Complete|✓|✓|✓|✓
% Work Complete|✓|✓|✓|✓
Active|✓|✓|✓|✓
Activity Code Values|✓|✓|✓|✓
Activity Percent Complete|✓|✓|✓|✓
Actual Cost|✓|✓|✓|✓
Actual Duration|✓|✓|✓|✓
Expand Down Expand Up @@ -182,7 +180,6 @@ Earned Value Method| | |✓|✓
Effort Driven|✓|✓|✓|✓
Estimated| |✓|✓|✓
Expanded|✓|✓|✓|✓
Expense Items|✓|✓|✓|✓
External Project| |✓|✓|✓
External Task| |✓|✓|✓
Finish|✓|✓|✓|✓
Expand Down Expand Up @@ -243,7 +240,6 @@ Sprint ID| | | |✓
Start|✓|✓|✓|✓
Start Slack|✓|✓|✓|✓
Start Variance|✓|✓|✓|✓
Steps|✓|✓|✓|✓
Stop|✓|✓|✓|✓
Subproject File| |✓|✓|✓
Subproject GUID| | |✓|✓
Expand Down Expand Up @@ -649,8 +645,6 @@ Remaining Cost|✓|✓|✓|✓
Remaining Overtime Cost| |✓|✓|✓
Remaining Overtime Work| |✓|✓|✓
Remaining Work|✓|✓|✓|✓
Resource Code Values|✓|✓|✓|✓
Role Code Values|✓|✓|✓|✓
Standard Rate| |✓|✓|✓
Standard Rate Units| |✓|✓|✓
Subproject Unique Resource ID| |✓|✓| 
Expand Down Expand Up @@ -926,7 +920,6 @@ Remaining Cost| |✓|✓|✓
Remaining Overtime Cost| |✓|✓|✓
Remaining Overtime Work| |✓|✓|✓
Remaining Work|✓|✓|✓|✓
Resource Assignment Code Values|✓|✓|✓|✓
Resource Request Type| | |✓|✓
Resource Unique ID|✓|✓|✓|✓
Response Pending| |✓|✓|✓
Expand Down
11 changes: 11 additions & 0 deletions src/main/java/net/sf/mpxj/common/PopulatedFields.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import java.util.Collection;
import java.util.EnumSet;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

import net.sf.mpxj.AccrueType;
Expand Down Expand Up @@ -116,6 +117,16 @@ private boolean fieldIsNotDefaultValue(Object value, FieldType type)
{
boolean result;

if (value instanceof Collection<?>)
{
return !((Collection<?>)value).isEmpty();
}

if (value instanceof Map<?,?>)
{
return !((Map<?,?>)value).isEmpty();
}

switch (type.getDataType())
{
case STRING:
Expand Down

0 comments on commit 9107aab

Please sign in to comment.