Skip to content

Conversation

@nycotin
Copy link
Contributor

@nycotin nycotin commented Jan 17, 2026

Description

  • Fix issue with updating of mentorshipType
  • Apply fixes according to comments here: b88e3f7#r174911858

Screenshots

  • PUT Body
image
  • PUT response
image
  • GET updated mentor
image image

Change Type

  • Bug Fix
  • New Feature
  • Code Refactor
  • Documentation
  • Test
  • Other

Pull request checklist

Please check if your PR fulfills the following requirements:

@nycotin
Copy link
Contributor Author

nycotin commented Jan 18, 2026

  1. Added unit tests for PostgresMenteeSectionRepository only
  2. Adjusted MentorDto and removed reference to super.merge(), which was creating confusion on what has to be updated and invalidating the checks

What is currently not working as expected is the update of fields within objects (like menteeSection, skills, resources). In this case, MentorDto is only checking if they are empty, but it doesn't check in detail if each underlying field is empty or not and what to ignore for update. Therefore, if empty fields are provided within these objects, they will overwrite existing content.

If we want this, I wouldn't anyway include the checks in the MentorDto, but on the lower level (for ex, PostgressMenteeSectionReposiotory, PostgresMentorRepository). Let me know what you think!

nycotin and others added 3 commits January 21, 2026 20:42
…or.java

Co-authored-by: Adriana Zencke Zimmermann <dricazenck@gmail.com>
…orDto.java

Co-authored-by: Adriana Zencke Zimmermann <dricazenck@gmail.com>
@dricazenck
Copy link
Collaborator

@nycotin could you update your branch and solve the conflicts so we can merge the changes?

…x-put-mentor-api

# Conflicts:
#	src/main/java/com/wcc/platform/domain/platform/mentorship/MentorDto.java
#	src/main/java/com/wcc/platform/repository/postgres/mentorship/PostgresMenteeSectionRepository.java
#	src/main/java/com/wcc/platform/service/MentorshipService.java
@nycotin
Copy link
Contributor Author

nycotin commented Jan 26, 2026

@dricazenck I have merged main and now I am getting quite some issue from pmdAll that are unrelated to what I have done for this branch:
image

There is also a refactoring of MentorshipServiceTest that will take me quite some time, so I am wondering if I wouldn't make more sense to just merge this so the fix is done and then take care the pmd issues/refactoring in another branch?

@dricazenck
Copy link
Collaborator

@nycotin Looks like it is everything working from github actions with PMD and testing. So I will go ahead and merge. I will pull the changes locally to see what is going one. Thank you!! 🚀

@dricazenck dricazenck merged commit 1f6e1c8 into Women-Coding-Community:main Jan 26, 2026
1 check passed
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