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.
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.
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.
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.
Should this text field go away since it's not used? (that I can see)
There was a problem hiding this comment.
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.