Skip to content

Yu Yan taking over for Ujjwal - feat: Resolved Merge Conflicts and added reasons array in infringements in user profile#1817

Closed
ujjwalbPipKcK wants to merge 1 commit intodevelopmentfrom
ujjwal-merge-conflicts-resolved-upd-infg-array-reasons
Closed

Yu Yan taking over for Ujjwal - feat: Resolved Merge Conflicts and added reasons array in infringements in user profile#1817
ujjwalbPipKcK wants to merge 1 commit intodevelopmentfrom
ujjwal-merge-conflicts-resolved-upd-infg-array-reasons

Conversation

@ujjwalbPipKcK
Copy link
Copy Markdown

@ujjwalbPipKcK ujjwalbPipKcK commented Oct 17, 2025

Description

Please include the exact bug/functionality description and a summary of the changes/ related issues. Please also include any other relevant motivation and context:
Fixes # (PRIORITY HIGH)
image

Related PRS (if any):

PR 1686

Main changes explained:

Added functionality to easily parse reasons for Blue Squares using a reasons array. Added the reasons a

  • Added reasons field under infringements in userProfile with predefined options (which can be modified as required)

How to test:

  1. check into current branch
  2. do npm run build and npm start to run this PR locally
  3. send a POST request to api/userProfile/:userId/addInfringement to add an infringement
  4. reasons = ['time not met', 'missing summary', 'missed video call', 'late reporting', 'other']

Screenshots or videos of changes:

2025-08-29.18-57-46.mp4

@one-community one-community added the High Priority - Please Review First This is an important PR we'd like to get merged as soon as possible label Dec 15, 2025
Copy link
Copy Markdown

@Anusha-Gali Anusha-Gali left a comment

Choose a reason for hiding this comment

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

Hi Ujjwal,

I tried testing your PR but in the API response it doesn't specify the various reasons and only mentions "other", same with mongoDb.
Screenshot 2025-12-16 at 7 30 01 PM
Screenshot 2025-12-16 at 7 36 35 PM
Screenshot 2025-12-16 at 7 37 19 PM

@VijayAnirudh
Copy link
Copy Markdown

I've tested your PR, in mongoDB, no reasons populated. "other" is the only reason I can see.
image
image

@one-community one-community changed the title Ujjwal - feat: Resolved Merge Conflicts and added reasons array in infringements in user profile Yu Yan taking over for Ujjwal - feat: Resolved Merge Conflicts and added reasons array in infringements in user profile Feb 27, 2026
yany960 pushed a commit that referenced this pull request Mar 16, 2026
- Add reasons field to infringement schema with enum validation
- Supported values: 'time not met', 'missing summary', 'missed video call', 'late reporting', 'other'
- Default value: ['other']
- Process reasons array in addInfringements controller:
  - Normalize to lowercase
  - Deduplicate values
  - Filter valid enum values only
  - Default to ['other'] if empty
- Maintain backward compatibility with existing reason field
- Resolves merge conflicts from PR #1686 and #1817
@one-community
Copy link
Copy Markdown
Member

Redone with this PR: #2106

1 similar comment
@one-community
Copy link
Copy Markdown
Member

Redone with this PR: #2106

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

Labels

High Priority - Please Review First This is an important PR we'd like to get merged as soon as possible

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants