Skip to content

Conversation

@geniusYoo
Copy link
Contributor

@geniusYoo geniusYoo commented Apr 8, 2025

Related issue 🛠

Work Description ✏️

솝트로그 관련 이슈를 해결합니다.

1. 솝트로그 기수 미상 값 제거

  • 명예오비 앱잼이나 프로젝트를 활동한 기수가 아닐 때 수행했을 시, 미상으로 파트 이름을 추출하도록 되어있어요.
  • 이를 솝트로그 API 응답에서 미상 값을 명시적으로 제거했어요.
    .part(playgroundProfile.getAllActivities().stream()
    .map(c -> c.getPlaygroundPart().getPartName())
    .filter(c -> !c.equals(PlaygroundPart.NONE.getPartName()))
    .collect(Collectors.joining("/")))

2. 솝트로그 명예오비 오류나는 이슈 해결

  • 솝트로그 조회 시, isActive 를 판단하는 기준이 모호하여 오류가 있었어요.
  • 기존에는 가장 최근의 Activity을 가져와서 현재 기수와 같으면 isActive로 판단했는데, 명예OB 앱잼의 경우도 활동 기수의 활동으로 플그에서 응답이 오기 때문에 이 경우를 filter로 제외하도록 했어요.
    Optional<Long> latestGeneration = playgroundProfile.getAllActivities().stream()
    .filter(c -> !c.getPlaygroundPart().getPartName().equals(PlaygroundPart.NONE.getPartName()))
    .map(PlaygroundProfileInfo.ActivityCardinalInfo::getGeneration)
    .max(Comparator.naturalOrder());
    Boolean isActive = latestGeneration.isPresent() && latestGeneration.get().equals(generation);

3. 솝트로그 솝탬프 등수 다시 오픈

  • 이제 솝탬프를 오픈해야 하므로, 솝트로그에서 솝탬프 등수를 다시 표시하도록 변경했어요.
  • isActive가 reference 타입으로 지정되어 있어, equals() 비교가 아닌 Boolean.TRUE.equals(isActive) 로 안전하게 비교하도록 했어요.
    if (Boolean.TRUE.equals(isActive)) {
    soptampRank = rankFacade.findUserRank(user.getId());
    } else {

Trouble Shooting ⚽️

Related ScreenShot 📷

Uncompleted Tasks 😅

To Reviewers 📢

@height
Copy link

height bot commented Apr 8, 2025

Link Height tasks by mentioning a task ID in the pull request title or commit messages, or description and comments with the keyword link (e.g. "Link T-123").

💡Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.

@geniusYoo geniusYoo requested a review from Copilot April 8, 2025 07:52
@geniusYoo geniusYoo self-assigned this Apr 8, 2025
@geniusYoo geniusYoo added the 🛠️ BugFix 버그 해결 label Apr 8, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (2)

src/main/java/org/sopt/app/presentation/user/UserResponse.java:177

  • [nitpick] Consider extracting the hardcoded string '미상' into a named constant to improve code maintainability and clarity.
.filter(c -> !c.equals("미상"))

src/main/java/org/sopt/app/presentation/user/UserController.java:115

  • [nitpick] Consider renaming 'latestGeneration' to 'maxGeneration' to more accurately reflect that it represents the highest generation number, thereby enhancing code readability.
Boolean isActive = latestGeneration.isPresent() && latestGeneration.get().equals(generation);

@geniusYoo geniusYoo merged commit 0872c27 into dev Apr 8, 2025
1 check passed
@hyerinhwang-sailin
Copy link
Collaborator

미상 파트, 명예오비 관련 이슈 모두 잘 해결하셨네요!
isActive 값 비교도 안전하게 처리하신 점 좋습니다 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FIX] 솝트로그 조회 시 미상으로 표시되는 값 제거

2 participants