-
Notifications
You must be signed in to change notification settings - Fork 6
Feature 2870/edit kudos #2881
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
Feature 2870/edit kudos #2881
Conversation
|
|
||
| if (!savedKudos.getPubliclyVisible()) { | ||
| // Private kudos do not need to be approved by another party. | ||
| savedKudos.setDateApproved(LocalDate.now()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously we didn't require any approved date for non-public kudos, so we didn't set one. I'm guessing something has shifted somewhere in the logic such that we need this date now? If so, then we might need to make a migration to add these dates to existing private kudos.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will have to look to see if anything changed anywhere to see why private kudos weren't being displayed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found the root of the problem.
private List<KudosResponseDTO> findAllToMember(UUID memberId) {
UUID currentUserId = currentUserServices.getCurrentUser().getId();
if (!currentUserId.equals(memberId) &&
!hasAdministerKudosPermission()) {
throw new PermissionException("You are not authorized to retrieve the kudos another user has received");
}
List<KudosRecipient> kudosRecipients = kudosRecipientRepository.findByMemberId(memberId);
List<KudosResponseDTO> kudosList = new ArrayList<>();
kudosRecipients.forEach(kudosRecipient -> {
UUID kudosId = kudosRecipient.getKudosId();
Kudos relatedKudos = kudosRepository.findById(kudosId).orElseThrow(() ->
new NotFoundException(KUDOS_DOES_NOT_EXIST_MSG.formatted(kudosId)));
if (relatedKudos.getDateApproved() != null) {
kudosList.add(constructKudosResponseDTO(relatedKudos));
}
});
return kudosList;
}
When we retrieve all of the received kudos, we are requiring an approved date. According to git, it's been like this for 3 years. I will undo my date changes and fix this method (and some display stuff too).
| Are you sure you want to complete this action? The kudos | ||
| will be deleted. | ||
| </DialogContentText> | ||
| <TextField |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this text field go away since it's not used? (that I can see)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm all for removing the text field.
|
@ocielliottc I think we may also want to "unapprove" (remove the approval date) a public kudos that has the text edited. |
…check-ins into feature-2870/edit-kudos
…t retrieves kudos for receiver. Updated UI to not show pending for private kudos.
This implements editing public/private, message text, and recipients and the ability for a user to delete kudos they have sent.