Skip to content

Nco/enh/calculation option#7

Merged
lfasani merged 4 commits into
mainfrom
nco/enh/calculationOption
Apr 24, 2026
Merged

Nco/enh/calculation option#7
lfasani merged 4 commits into
mainfrom
nco/enh/calculationOption

Conversation

@ncouvert
Copy link
Copy Markdown
Collaborator

Add a Calculation Option to the tasks to determine their Start or End time based on it and Fix task initialization dates
Then bump to pepper-mm 2026.4.0

@ncouvert ncouvert force-pushed the nco/enh/calculationOption branch 3 times, most recently from 0845790 to 79bd6eb Compare April 20, 2026 11:22
@ncouvert ncouvert force-pushed the nco/enh/dependencyLink branch from 99b11f2 to 7ca97b2 Compare April 20, 2026 14:01
@ncouvert ncouvert force-pushed the nco/enh/calculationOption branch from 79bd6eb to af5466e Compare April 20, 2026 14:06
@ncouvert ncouvert force-pushed the nco/enh/dependencyLink branch 3 times, most recently from a7e2072 to ef752ad Compare April 21, 2026 10:01
@ncouvert ncouvert force-pushed the nco/enh/calculationOption branch from af5466e to a684255 Compare April 21, 2026 11:29
Base automatically changed from nco/enh/dependencyLink to main April 21, 2026 15:05
@lfasani lfasani force-pushed the nco/enh/calculationOption branch from a684255 to 0748558 Compare April 21, 2026 15:15
if (lastTask.getEndTime().equals(lastTask.getStartTime())) {
// If the last task is a Milestone
task.setStartTime(lastTask.getEndTime());
task.setEndTime(Instant.ofEpochSecond(2 * lastTask.getEndTime().getEpochSecond() - lastTask.getStartTime().getEpochSecond()));
Copy link
Copy Markdown
Collaborator

@lfasani lfasani Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

your code is equal to task.setEndTime(lastTask.getEndTime())
Please add a comment to what you intend to.
Currently it leads to the same milestone. Is that what you want?

Perhaps we should not have a ChildDescriptor in case of mile stone

Copy link
Copy Markdown
Collaborator Author

@ncouvert ncouvert Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When creating a task from another task, the new task is created one minute after the parent task.
From a milestone, we want to create the child task/milestone at the exact same time of the parent.

Not have a ChildDescriptor for the milestones could also be an option, but this code is taking the last subtask of each task, whether it's a milestone or not

Copy link
Copy Markdown
Collaborator Author

@ncouvert ncouvert Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed the code from task.setEndTime(Instant.ofEpochSecond(2 * lastTask.getEndTime().getEpochSecond() - lastTask.getStartTime().getEpochSecond())); to task.setEndTime(lastTask.getEndTime());

Comment thread pepper-edit/src/main/java/pepper/peppermm/provider/WorkpackageItemProvider.java Outdated
Comment thread pepper-mm/src/main/java/pepper/peppermm/impl/AbstractTaskImpl.java Outdated
Comment thread pepper-mm/src/main/java/pepper/peppermm/impl/AbstractTaskImpl.java Outdated
Comment thread pepper-mm/src/main/java/pepper/peppermm/impl/AbstractTaskImpl.java Outdated
Comment thread pepper-mm/src/main/java/pepper/peppermm/impl/WorkpackageImpl.java Outdated
Comment thread pepper-mm/src/main/java/pepper/peppermm/impl/WorkpackageImpl.java Outdated
Comment thread pepper-mm/src/main/java/pepper/peppermm/impl/WorkpackageImpl.java Outdated
@ncouvert ncouvert force-pushed the nco/enh/calculationOption branch from 0748558 to 71b4ce4 Compare April 23, 2026 12:24
@ncouvert ncouvert requested a review from lfasani April 23, 2026 12:24
Copy link
Copy Markdown
Collaborator

@lfasani lfasani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By the way, we should not have any mention of a downstream project such as pepper.
So you should remove the reference to pepper issue in the commit message.
You will set these reference in the pepper commit that will consume that new pepper-mm version.

@ncouvert ncouvert force-pushed the nco/enh/calculationOption branch from 71b4ce4 to a342614 Compare April 23, 2026 14:42
@ncouvert ncouvert requested a review from lfasani April 23, 2026 14:43
@lfasani lfasani merged commit 6444039 into main Apr 24, 2026
3 checks passed
@lfasani lfasani deleted the nco/enh/calculationOption branch April 24, 2026 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants