Skip to content

fix(PM-4202): Skills section completion logic update#95

Merged
kkartunov merged 3 commits intodevelopfrom
pm-4202
Mar 12, 2026
Merged

fix(PM-4202): Skills section completion logic update#95
kkartunov merged 3 commits intodevelopfrom
pm-4202

Conversation

@hentrymartin
Copy link
Collaborator

What's in this PR?

  • Updated the logic to make a profile completed on skills section

Ticket link - https://topcoder.atlassian.net/browse/PM-4202

@hentrymartin hentrymartin requested a review from kkartunov March 10, 2026 17:45
Copy link
Contributor

@kkartunov kkartunov left a comment

Choose a reason for hiding this comment

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

Also fix conflicts.

// 1 principal skill and 1 additional skill
if (member.skills && member.skills.length > 0) {
const principalCount = member.skills.filter(skill => _.get(skill, 'displayMode.name') === 'principal').length
const additionalCount = member.skills.filter(skill => _.get(skill, 'displayMode.name') !== 'principal').length
Copy link
Contributor

Choose a reason for hiding this comment

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

Please make this explicitly check for additional name.

// 1 principal skill and 1 additional skill
if (member.skills && member.skills.length > 0) {
const principalCount = member.skills.filter(skill => _.get(skill, 'displayMode.name') === 'principal').length
const additionalCount = member.skills.filter(skill => _.get(skill, 'displayMode.name') !== 'additional').length

Choose a reason for hiding this comment

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

[❗❗ correctness]
The condition for additionalCount is incorrect. It should count skills where displayMode.name is 'additional', not where it is not 'additional'. This change will lead to incorrect profile completeness calculation.

@kkartunov kkartunov merged commit 3b1f499 into develop Mar 12, 2026
4 of 5 checks 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