Skip to content

feat: accept certificate name on fellowship application (write-through to user.name)#85

Merged
theanmolsharma merged 1 commit into
mainfrom
feat/certificate-name-write-through
Jul 2, 2026
Merged

feat: accept certificate name on fellowship application (write-through to user.name)#85
theanmolsharma merged 1 commit into
mainfrom
feat/certificate-name-write-through

Conversation

@Vayras

@Vayras Vayras commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds the applicant's certificate name to the fellowship application flow, wired the same way location already works — submitted in the proposal payload and written through to the user profile rather than stored on the application.

Per review, the certificate name reuses the existing user.name profile field, so no new column, migration, or DTO field is introduced.

Changes

  • fellowship-applications.request.dto.ts — add optional name to ProposalFieldsDto (accepted on POST /fellowship-applications and PATCH /fellowship-applications/{id}), mirroring location: @IsOptional @Transform(trim) @IsString @MaxLength(255).
  • fellowship-applications.service.ts — in applyProfileFields, write name through to user.name via emptyToNull: trimmed, empty-string clears, omitted key leaves it untouched. Not stored on the application.

Behavior (matches location)

Concern Behavior
Accepted on proposal create/update in write body
Persistence Written through to user.name; not stored on the application
Returned by proposal GET omitted (unchanged)
Returned by GET /users/me via existing name field (used for prefill)

Frontend follow-up

The frontend must send/read name (not certificateName) in the proposal body and prefill from GET /users/me -> name.

Testing

  • tsc --noEmit passes.

🤖 Generated with Claude Code

…h to user.name

Add an optional `name` field to the fellowship application proposal body
(POST /fellowship-applications and PATCH /fellowship-applications/{id}).
It is the applicant's name used on the certificate and is written through
to `user.name` rather than stored on the application, mirroring how
`location` behaves: trimmed, empty-string clears, omitted leaves untouched.

The value is served back via the existing `name` field on GET /users/me
(used by the form to prefill), so no new column, migration, or DTO field
is required.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@theanmolsharma theanmolsharma merged commit 8030b3e into main Jul 2, 2026
2 checks passed
@theanmolsharma theanmolsharma deleted the feat/certificate-name-write-through branch July 2, 2026 11:27
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