Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug/1255 Duplicating a objective does not bring all properties of the KeyResults #1294

Open
wants to merge 27 commits into
base: main
Choose a base branch
from

Conversation

ManuelMoeri
Copy link
Collaborator

No description provided.

@ManuelMoeri ManuelMoeri linked an issue Jan 13, 2025 that may be closed by this pull request
19 tasks
@nevio18324 nevio18324 force-pushed the bug/1255-duplicating-of-objective-should-bring-all-properties branch from d8561be to f090a48 Compare January 14, 2025 12:20
@nevio18324 nevio18324 marked this pull request as ready for review January 14, 2025 14:29
@ManuelMoeri ManuelMoeri removed the request for review from RandomTannenbaum January 15, 2025 06:54
Copy link
Collaborator

@MasterEvarior MasterEvarior left a comment

Choose a reason for hiding this comment

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

Overall it looks already quite good. There are a couple of minor things and also the the organization of the code that should be improved.

BDDMockito.given(keyResultMapper.toDto(any(KeyResultMetric.class), any())).willReturn(keyResultMetricDto);
BDDMockito.given(keyResultMapper.toDto(any(KeyResultOrdinal.class), any())).willReturn(keyResultOrdinalDto);
BDDMockito.given(objectiveAuthorizationService.getAuthorizationService()).willReturn(authorizationService);
BDDMockito.given(objectiveMapper.toDto(objective1)).willReturn(objective1Dto);
BDDMockito.given(objectiveMapper.toDto(any())).willReturn(objective1Dto);
Copy link
Collaborator

Choose a reason for hiding this comment

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

be careful using any here, could lead to unexpected behavior. Generally it's considered to be best practice to mock as precise as possible.

CompletedBusinessService completedBusinessService) {
CompletedBusinessService completedBusinessService,
ActionPersistenceService actionPersistenceService,
ActionBusinessService actionBusinessService) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

action business service should be enough there should be no need to use action persisstence service here

}

List<Action> copiedActions = actionBusinessService.createDuplicateOfActions(keyResult, newKeyResult);
Copy link
Collaborator

@peggimann peggimann Jan 15, 2025

Choose a reason for hiding this comment

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

handle the entity in the actionBusinessService

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.

Duplizieren eines Objectives übernimmt nicht alle Eigenschaften
4 participants