Skip to content

Commit

Permalink
Phoenix Scheduling Progressed Activities (#746)
Browse files Browse the repository at this point in the history
  • Loading branch information
joniles authored Sep 8, 2024
1 parent f7d3dc3 commit 6498937
Show file tree
Hide file tree
Showing 18 changed files with 12,736 additions and 12,946 deletions.
16 changes: 8 additions & 8 deletions jaxb/phoenix-5.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -225,15 +225,15 @@
<xs:attribute name="proposed_data_date" type="xs:dateTime"/>
<xs:attribute name="default_calendar" type="xs:string"/>
<xs:attribute name="id_increment" type="xs:int"/>
<xs:attribute name="contiguous" type="xs:string"/>
<xs:attribute name="ignore_actuals" type="xs:string"/>
<xs:attribute name="ignore_data_date" type="xs:string"/>
<xs:attribute name="interruptible" type="xs:string"/>
<xs:attribute name="contiguous" type="xs:boolean"/>
<xs:attribute name="ignore_actuals" type="xs:boolean"/>
<xs:attribute name="ignore_data_date" type="xs:boolean"/>
<xs:attribute name="interruptible" type="xs:boolean"/>
<xs:attribute name="lag_calendar" type="xs:string"/>
<xs:attribute name="progress_override" type="xs:string"/>
<xs:attribute name="retained_logic" type="xs:string"/>
<xs:attribute name="status_on_current" type="xs:string"/>
<xs:attribute name="status_on_master" type="xs:string"/>
<xs:attribute name="progress_override" type="xs:boolean"/>
<xs:attribute name="retained_logic" type="xs:boolean"/>
<xs:attribute name="status_on_current" type="xs:boolean"/>
<xs:attribute name="status_on_master" type="xs:boolean"/>
</xs:complexType>
</xs:element>
</xs:sequence>
Expand Down
1 change: 1 addition & 0 deletions src/changes/changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
</properties>
<body>
<release date="unreleased" version="13.3.2">
<action dev="joniles" type="update">Ensure the Scheduling Progressed Activities project property is populated when reading Phoenix schedules.</action>
</release>
<release date="2024-08-30" version="13.3.1">
<action dev="joniles" type="update">Handle duplicate custom field value unique IDs when reading MSPDI files.</action>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public ProjectFile read(String name)
{
/*
Project Directory Contents
ACT - Activity
ASG - Resource Assignment
BSA - Baseline Activity
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/net/sf/mpxj/openplan/ResourceDirectoryReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -124,27 +124,27 @@ public void read(String name)
// Resource Structure
System.out.println("RDS");
new TableReader(dir, "RDS").read().forEach(System.out::println);
// Resource Cost Escalation
System.out.println("RSL");
new TableReader(dir, "RSL").read().forEach(System.out::println);
// Skill Assignment
System.out.println("SKL");
new TableReader(dir, "SKL").read().forEach(System.out::println);
// Explorer Folders
System.out.println("EXF");
new TableReader(dir, "EXF").read().forEach(System.out::println);
// Project Summary Usage
System.out.println("PSU");
new TableReader(dir, "PSU").read().forEach(System.out::println);
// Explorer Folder Items
System.out.println("EXI");
new TableReader(dir, "EXI").read().forEach(System.out::println);
// Code Structure Association
// Not populated for any resources in the sample data
System.out.println("SCA");
Expand Down
13 changes: 9 additions & 4 deletions src/main/java/net/sf/mpxj/phoenix/Phoenix4Reader.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
import net.sf.mpxj.RecurrenceType;
import net.sf.mpxj.RecurringData;
import net.sf.mpxj.Relation;
import net.sf.mpxj.SchedulingProgressedActivities;
import net.sf.mpxj.common.LocalDateHelper;
import net.sf.mpxj.common.LocalDateTimeHelper;
import net.sf.mpxj.common.SlackHelper;
Expand Down Expand Up @@ -133,7 +134,7 @@ public Phoenix4Reader(boolean useActivityCodesForTaskHierarchy)

Project phoenixProject = (Project) UnmarshalHelper.unmarshal(CONTEXT, new SkipNulInputStream(stream));
Storepoint storepoint = getCurrentStorepoint(phoenixProject);
readProjectProperties(phoenixProject.getSettings(), storepoint);
readProjectProperties(phoenixProject, storepoint);
readCalendars(storepoint);
readActivityCodes(storepoint);
readTasks(phoenixProject, storepoint);
Expand Down Expand Up @@ -164,16 +165,20 @@ public Phoenix4Reader(boolean useActivityCodesForTaskHierarchy)
/**
* This method extracts project properties from a Phoenix file.
*
* @param phoenixSettings Phoenix settings
* @param phoenixProject Phoenix project
* @param storepoint Current storepoint
*/
private void readProjectProperties(Settings phoenixSettings, Storepoint storepoint)
private void readProjectProperties(Project phoenixProject, Storepoint storepoint)
{
Settings phoenixSettings = phoenixProject.getSettings();
Layout activeLayout = getActiveLayout(phoenixProject);

ProjectProperties mpxjProperties = m_projectFile.getProjectProperties();
mpxjProperties.setName(phoenixSettings.getTitle());
mpxjProperties.setDefaultDurationUnits(phoenixSettings.getBaseunit());
mpxjProperties.setStatusDate(storepoint.getDataDate());
mpxjProperties.setStartDate(storepoint.getStart());
mpxjProperties.setSchedulingProgressedActivities(activeLayout.isRetainedLogic().booleanValue()? SchedulingProgressedActivities.RETAINED_LOGIC : (activeLayout.isProgressOverride().booleanValue() ? SchedulingProgressedActivities.PROGRESS_OVERRIDE : SchedulingProgressedActivities.ACTUAL_DATES));
}

/**
Expand Down Expand Up @@ -1077,7 +1082,7 @@ private void closeLogFile()
private Map<UUID, ActivityCodeValue> m_activityCodeValues;
private Map<Activity, Map<UUID, UUID>> m_activityCodeCache;
private EventManager m_eventManager;
List<UUID> m_codeSequence;
private List<UUID> m_codeSequence;
private final boolean m_useActivityCodesForTaskHierarchy;

/**
Expand Down
9 changes: 6 additions & 3 deletions src/main/java/net/sf/mpxj/phoenix/Phoenix5Reader.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
import net.sf.mpxj.RecurringData;
import net.sf.mpxj.RelationshipLagCalendar;
import net.sf.mpxj.Relation;
import net.sf.mpxj.SchedulingProgressedActivities;
import net.sf.mpxj.common.LocalDateHelper;
import net.sf.mpxj.common.LocalDateTimeHelper;
import net.sf.mpxj.common.SlackHelper;
Expand Down Expand Up @@ -134,7 +135,7 @@ public Phoenix5Reader(boolean useActivityCodesForTaskHierarchy)

Project phoenixProject = (Project) UnmarshalHelper.unmarshal(CONTEXT, new SkipNulInputStream(stream));
Storepoint storepoint = getCurrentStorepoint(phoenixProject);
readProjectProperties(phoenixProject.getSettings(), storepoint);
readProjectProperties(phoenixProject, storepoint);
readCalendars(storepoint);
readActivityCodes(storepoint);
readTasks(phoenixProject, storepoint);
Expand Down Expand Up @@ -165,17 +166,19 @@ public Phoenix5Reader(boolean useActivityCodesForTaskHierarchy)
/**
* This method extracts project properties from a Phoenix file.
*
* @param phoenixSettings Phoenix settings
* @param phoenixProject Phoenix project
* @param storepoint Current storepoint
*/
private void readProjectProperties(Settings phoenixSettings, Storepoint storepoint)
private void readProjectProperties(Project phoenixProject, Storepoint storepoint)
{
Settings phoenixSettings = phoenixProject.getSettings();
ProjectProperties mpxjProperties = m_projectFile.getProjectProperties();
mpxjProperties.setName(phoenixSettings.getTitle());
mpxjProperties.setDefaultDurationUnits(phoenixSettings.getBaseunit());
mpxjProperties.setStatusDate(storepoint.getDataDate());
mpxjProperties.setStartDate(storepoint.getStart());
mpxjProperties.setRelationshipLagCalendar(LAG_CALENDAR_MAP.getOrDefault(storepoint.getLagCalendar(), mpxjProperties.getRelationshipLagCalendar()));
mpxjProperties.setSchedulingProgressedActivities(storepoint.isRetainedLogic().booleanValue() ? SchedulingProgressedActivities.RETAINED_LOGIC : (storepoint.isProgressOverride().booleanValue() ? SchedulingProgressedActivities.PROGRESS_OVERRIDE : SchedulingProgressedActivities.ACTUAL_DATES));
}

/**
Expand Down
21 changes: 10 additions & 11 deletions src/main/java/net/sf/mpxj/phoenix/schema/phoenix5/Adapter1.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,26 @@
// This file was generated by the Eclipse Implementation of JAXB, v3.0.2
// See https://eclipse-ee4j.github.io/jaxb-ri
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2024.07.22 at 12:22:04 PM BST
// Generated on: 2024.09.08 at 11:22:53 AM BST
//


package net.sf.mpxj.phoenix.schema.phoenix5;

import java.time.LocalDateTime;
import jakarta.xml.bind.annotation.adapters.XmlAdapter;

public class Adapter1
extends
XmlAdapter<String, LocalDateTime>
extends XmlAdapter<String, LocalDateTime>
{

@Override public LocalDateTime unmarshal(String value)
{
return (net.sf.mpxj.phoenix.DatatypeConverter.parseDateTime(value));
}

@Override public String marshal(LocalDateTime value)
{
return (net.sf.mpxj.phoenix.DatatypeConverter.printDateTime(value));
}
@Override public LocalDateTime unmarshal(String value) {
return (net.sf.mpxj.phoenix.DatatypeConverter.parseDateTime(value));
}

@Override public String marshal(LocalDateTime value) {
return (net.sf.mpxj.phoenix.DatatypeConverter.printDateTime(value));
}

}
21 changes: 10 additions & 11 deletions src/main/java/net/sf/mpxj/phoenix/schema/phoenix5/Adapter2.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,25 @@
// This file was generated by the Eclipse Implementation of JAXB, v3.0.2
// See https://eclipse-ee4j.github.io/jaxb-ri
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2024.07.22 at 12:22:04 PM BST
// Generated on: 2024.09.08 at 11:22:53 AM BST
//


package net.sf.mpxj.phoenix.schema.phoenix5;

import jakarta.xml.bind.annotation.adapters.XmlAdapter;

public class Adapter2
extends
XmlAdapter<String, Integer>
extends XmlAdapter<String, Integer>
{

@Override public Integer unmarshal(String value)
{
return (net.sf.mpxj.phoenix.DatatypeConverter.parseInteger(value));
}

@Override public String marshal(Integer value)
{
return (net.sf.mpxj.phoenix.DatatypeConverter.printInteger(value));
}
@Override public Integer unmarshal(String value) {
return (net.sf.mpxj.phoenix.DatatypeConverter.parseInteger(value));
}

@Override public String marshal(Integer value) {
return (net.sf.mpxj.phoenix.DatatypeConverter.printInteger(value));
}

}
21 changes: 10 additions & 11 deletions src/main/java/net/sf/mpxj/phoenix/schema/phoenix5/Adapter3.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,26 @@
// This file was generated by the Eclipse Implementation of JAXB, v3.0.2
// See https://eclipse-ee4j.github.io/jaxb-ri
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2024.07.22 at 12:22:04 PM BST
// Generated on: 2024.09.08 at 11:22:53 AM BST
//


package net.sf.mpxj.phoenix.schema.phoenix5;

import jakarta.xml.bind.annotation.adapters.XmlAdapter;
import net.sf.mpxj.Duration;

public class Adapter3
extends
XmlAdapter<String, Duration>
extends XmlAdapter<String, Duration>
{

@Override public Duration unmarshal(String value)
{
return (net.sf.mpxj.phoenix.DatatypeConverter.parseDuration(value));
}

@Override public String marshal(Duration value)
{
return (net.sf.mpxj.phoenix.DatatypeConverter.printDuration(value));
}
@Override public Duration unmarshal(String value) {
return (net.sf.mpxj.phoenix.DatatypeConverter.parseDuration(value));
}

@Override public String marshal(Duration value) {
return (net.sf.mpxj.phoenix.DatatypeConverter.printDuration(value));
}

}
21 changes: 10 additions & 11 deletions src/main/java/net/sf/mpxj/phoenix/schema/phoenix5/Adapter4.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,26 @@
// This file was generated by the Eclipse Implementation of JAXB, v3.0.2
// See https://eclipse-ee4j.github.io/jaxb-ri
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2024.07.22 at 12:22:04 PM BST
// Generated on: 2024.09.08 at 11:22:53 AM BST
//


package net.sf.mpxj.phoenix.schema.phoenix5;

import java.util.UUID;
import jakarta.xml.bind.annotation.adapters.XmlAdapter;

public class Adapter4
extends
XmlAdapter<String, UUID>
extends XmlAdapter<String, UUID>
{

@Override public UUID unmarshal(String value)
{
return (net.sf.mpxj.phoenix.DatatypeConverter.parseUUID(value));
}

@Override public String marshal(UUID value)
{
return (net.sf.mpxj.phoenix.DatatypeConverter.printUUID(value));
}
@Override public UUID unmarshal(String value) {
return (net.sf.mpxj.phoenix.DatatypeConverter.parseUUID(value));
}

@Override public String marshal(UUID value) {
return (net.sf.mpxj.phoenix.DatatypeConverter.printUUID(value));
}

}
21 changes: 10 additions & 11 deletions src/main/java/net/sf/mpxj/phoenix/schema/phoenix5/Adapter5.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,26 @@
// This file was generated by the Eclipse Implementation of JAXB, v3.0.2
// See https://eclipse-ee4j.github.io/jaxb-ri
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2024.07.22 at 12:22:04 PM BST
// Generated on: 2024.09.08 at 11:22:53 AM BST
//


package net.sf.mpxj.phoenix.schema.phoenix5;

import jakarta.xml.bind.annotation.adapters.XmlAdapter;
import net.sf.mpxj.RelationType;

public class Adapter5
extends
XmlAdapter<String, RelationType>
extends XmlAdapter<String, RelationType>
{

@Override public RelationType unmarshal(String value)
{
return (net.sf.mpxj.phoenix.DatatypeConverter.parseRelationType(value));
}

@Override public String marshal(RelationType value)
{
return (net.sf.mpxj.phoenix.DatatypeConverter.printRelationType(value));
}
@Override public RelationType unmarshal(String value) {
return (net.sf.mpxj.phoenix.DatatypeConverter.parseRelationType(value));
}

@Override public String marshal(RelationType value) {
return (net.sf.mpxj.phoenix.DatatypeConverter.printRelationType(value));
}

}
21 changes: 10 additions & 11 deletions src/main/java/net/sf/mpxj/phoenix/schema/phoenix5/Adapter6.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,26 @@
// This file was generated by the Eclipse Implementation of JAXB, v3.0.2
// See https://eclipse-ee4j.github.io/jaxb-ri
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2024.07.22 at 12:22:04 PM BST
// Generated on: 2024.09.08 at 11:22:53 AM BST
//


package net.sf.mpxj.phoenix.schema.phoenix5;

import jakarta.xml.bind.annotation.adapters.XmlAdapter;
import net.sf.mpxj.TimeUnit;

public class Adapter6
extends
XmlAdapter<String, TimeUnit>
extends XmlAdapter<String, TimeUnit>
{

@Override public TimeUnit unmarshal(String value)
{
return (net.sf.mpxj.phoenix.DatatypeConverter.parseTimeUnits(value));
}

@Override public String marshal(TimeUnit value)
{
return (net.sf.mpxj.phoenix.DatatypeConverter.printTimeUnits(value));
}
@Override public TimeUnit unmarshal(String value) {
return (net.sf.mpxj.phoenix.DatatypeConverter.parseTimeUnits(value));
}

@Override public String marshal(TimeUnit value) {
return (net.sf.mpxj.phoenix.DatatypeConverter.printTimeUnits(value));
}

}
Loading

0 comments on commit 6498937

Please sign in to comment.