Skip to content

Commit

Permalink
Calendar copy issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
joniles committed Sep 26, 2019
1 parent 883d41e commit 9f96cdd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## 7.9.4 (git master)
* Ensure attribute names are valid when exporting JSON.
* Improve handling of custom field lookup values (Based on a contribution by Nick Darlington).
* Fix an issue when copying a calendar which has exceptions defined.

## 7.9.3 (10/09/2019)
* Add support for reading task early finish and late finish attributes from Asta PP files.
Expand Down
1 change: 1 addition & 0 deletions src/changes/changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<release date="git master" version="7.9.4">
<action dev="joniles" type="update">Ensure attribute names are valid when exporting JSON.</action>
<action dev="joniles" type="update">Improve handling of custom field lookup values (Based on a contribution by Nick Darlington).</action>
<action dev="joniles" type="update">Fix an issue when copying a calendar which has exceptions defined.</action>
</release>
<release date="10/09/2019" version="7.9.3">
<action dev="joniles" type="add">Add support for reading task early finish and late finish attributes from Asta PP files.</action>
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/net/sf/mpxj/ProjectCalendar.java
Original file line number Diff line number Diff line change
Expand Up @@ -1841,10 +1841,10 @@ public void copy(ProjectCalendar cal)
System.arraycopy(cal.getDays(), 0, getDays(), 0, getDays().length);
for (ProjectCalendarException ex : cal.m_exceptions)
{
addCalendarException(ex.getFromDate(), ex.getToDate());
ProjectCalendarException copyException = addCalendarException(ex.getFromDate(), ex.getToDate());
for (DateRange range : ex)
{
ex.addRange(new DateRange(range.getStart(), range.getEnd()));
copyException.addRange(new DateRange(range.getStart(), range.getEnd()));
}
}

Expand Down

0 comments on commit 9f96cdd

Please sign in to comment.