@outbuild-company/schedule-core 1.15.12 → 1.15.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2959,6 +2959,7 @@ async function alapPass(reversedIds, links, asapPlans, adapter, _options, isCurr
2959
2959
  const boundary = getParentBoundary(activity);
2960
2960
  let latestEnd = boundary;
2961
2961
  let successorAnchor = null;
2962
+ let successorAnchorType = null;
2962
2963
  let anchorInSubtree = false;
2963
2964
  const outgoing = outgoingLinks.get(String(activityId)) ?? [];
2964
2965
  for (const link of outgoing) {
@@ -2983,6 +2984,7 @@ async function alapPass(reversedIds, links, asapPlans, adapter, _options, isCurr
2983
2984
  }
2984
2985
  if (successorAnchor === null || predecessorEnd < successorAnchor) {
2985
2986
  successorAnchor = predecessorEnd;
2987
+ successorAnchorType = link.type;
2986
2988
  anchorInSubtree = activity.parentId && !isRootParent(activity.parentId) ? isInSubtree(link.target, activity.parentId) : false;
2987
2989
  }
2988
2990
  }
@@ -3026,7 +3028,9 @@ async function alapPass(reversedIds, links, asapPlans, adapter, _options, isCurr
3026
3028
  task: activity
3027
3029
  });
3028
3030
  } else if (activity.durationHours === 0) {
3029
- if (isFinishMarker) {
3031
+ if (successorAnchor !== null && successorAnchorType === LINK_TYPE.FINISH_TO_START && latestEnd.getTime() === successorAnchor.getTime()) {
3032
+ snappedEnd = latestEnd;
3033
+ } else if (isFinishMarker) {
3030
3034
  snappedEnd = finishMarkerEnd();
3031
3035
  } else {
3032
3036
  snappedEnd = adapter.getClosestWorkTime({