Feature: Award profile-completion membership after any 3 quest categories #501

Open
opened 2026-04-28 07:07:04 +00:00 by jjalangtry · 1 comment
jjalangtry commented 2026-04-28 07:07:04 +00:00 (Migrated from github.com)

Problem

Profile-completion membership is currently all-or-nothing. The code grants membership only when every existing profile field is filled:

user.graduationTerm &&
user.graduationYear &&
user.major?.trim() &&
user.gitHub?.trim() &&
user.linkedIn?.trim()

That check appears in:

  • next/lib/services/profileCompletionService.ts
  • next/lib/services/authLevelService.ts
  • next/lib/authLevelResolver.ts

With the category-based Profile Quest, members should earn membership after completing any 3 of 5 quest categories instead of every individual field.

Proposed Rule

A member is profile-completion eligible when at least 3 of these 5 categories are complete:

Category Completion rule
RIT Info graduationTerm, graduationYear, and major are filled
LinkedIn linkedIn is filled
GitHub gitHub is filled
Personal Email personalEmail is filled and valid
Personal Website personalWebsiteUrl is filled and valid

Examples:

  • RIT Info + GitHub + LinkedIn = eligible
  • RIT Info + Personal Email + Personal Website = eligible
  • GitHub + LinkedIn only = not eligible
  • Graduation term/year/major alone = only 1 category, not eligible

Scope

In scope:

  • Add a shared helper for computing quest category completion and completed category count
  • Replace duplicated profile-complete boolean logic with the shared helper
  • Update maybeGrantProfileCompletionMembership to award membership when completed category count is at least 3
  • Preserve current term-based grant tracking via profileCompletionGrantedTerm and profileCompletionGrantedYear
  • Revoke the profile-completion membership for the current term if the member drops below 3 complete categories
  • Update the Profile Quest progress copy and badge to communicate N / 3 categories or equivalent
  • Add tests for the category-count helper and membership grant/revoke edge cases

Out of scope:

  • Adding the personal email and personal website profile fields themselves; tracked in #499
  • Email communications consent; tracked separately in #474
  • Changing officer-created membership records or non-profile membership reasons

Acceptance Criteria

  • Membership is awarded when a user completes any 3 of the 5 quest categories
  • Membership is not awarded with fewer than 3 complete categories
  • RIT Info counts as one category, not three separate categories
  • Existing users who already completed graduation term, graduation year, major, GitHub, and LinkedIn remain eligible
  • profileCompletionService, authLevelService, and authLevelResolver all use the same shared eligibility logic
  • The profile quest UI matches the backend rule and does not imply all five categories are required
  • Current-term profile-completion membership is revoked if the user falls below 3 complete categories
  • Unit tests cover at least: 0/5, 2/5, 3/5, 5/5, and incomplete RIT Info category cases

Additional Context

Related existing quest work:

  • Epic: #472
  • Existing Membership Quests System issue: #474
  • Category/profile field setup: #499
## Problem Profile-completion membership is currently all-or-nothing. The code grants membership only when every existing profile field is filled: ```ts user.graduationTerm && user.graduationYear && user.major?.trim() && user.gitHub?.trim() && user.linkedIn?.trim() ``` That check appears in: - `next/lib/services/profileCompletionService.ts` - `next/lib/services/authLevelService.ts` - `next/lib/authLevelResolver.ts` With the category-based Profile Quest, members should earn membership after completing **any 3 of 5** quest categories instead of every individual field. ## Proposed Rule A member is profile-completion eligible when at least 3 of these 5 categories are complete: | Category | Completion rule | |---|---| | RIT Info | `graduationTerm`, `graduationYear`, and `major` are filled | | LinkedIn | `linkedIn` is filled | | GitHub | `gitHub` is filled | | Personal Email | `personalEmail` is filled and valid | | Personal Website | `personalWebsiteUrl` is filled and valid | Examples: - RIT Info + GitHub + LinkedIn = eligible - RIT Info + Personal Email + Personal Website = eligible - GitHub + LinkedIn only = not eligible - Graduation term/year/major alone = only 1 category, not eligible ## Scope In scope: - Add a shared helper for computing quest category completion and completed category count - Replace duplicated profile-complete boolean logic with the shared helper - Update `maybeGrantProfileCompletionMembership` to award membership when completed category count is at least 3 - Preserve current term-based grant tracking via `profileCompletionGrantedTerm` and `profileCompletionGrantedYear` - Revoke the profile-completion membership for the current term if the member drops below 3 complete categories - Update the Profile Quest progress copy and badge to communicate `N / 3 categories` or equivalent - Add tests for the category-count helper and membership grant/revoke edge cases Out of scope: - Adding the personal email and personal website profile fields themselves; tracked in #499 - Email communications consent; tracked separately in #474 - Changing officer-created membership records or non-profile membership reasons ## Acceptance Criteria - [ ] Membership is awarded when a user completes any 3 of the 5 quest categories - [ ] Membership is not awarded with fewer than 3 complete categories - [ ] RIT Info counts as one category, not three separate categories - [ ] Existing users who already completed graduation term, graduation year, major, GitHub, and LinkedIn remain eligible - [ ] `profileCompletionService`, `authLevelService`, and `authLevelResolver` all use the same shared eligibility logic - [ ] The profile quest UI matches the backend rule and does not imply all five categories are required - [ ] Current-term profile-completion membership is revoked if the user falls below 3 complete categories - [ ] Unit tests cover at least: 0/5, 2/5, 3/5, 5/5, and incomplete RIT Info category cases ## Additional Context Related existing quest work: - Epic: #472 - Existing Membership Quests System issue: #474 - Category/profile field setup: #499
tristenkurutz commented 2026-05-03 01:01:23 +00:00 (Migrated from github.com)

@smlavine

@smlavine
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
SSE/WebsiteTheSSEquel#501
No description provided.