OpenFn / OpenFn/lightning

Extract a shared display-name helper for users

Open
#4,988 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Elixir
Stars
296
Forks
86
Avg merge
1d 13h
Merged PRs (30d)
50

Description

What

The logic that builds a user's display name from first and last name (falling back to email) is copy-pasted in several places: the mailer, workflow JSON serialization, the sandbox picker payload, and more.

Why it matters

Each copy can drift, and there is no single place to change how a name is shown.

What to do

Add one shared helper (for example on the Accounts context) and route the existing copies through it.

Surfaced during the Edit in sandbox review (#4901).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the duplicated display-name logic in the mailer, workflow JSON serialization, and sandbox picker payload mentioned in the issue, then inspect the Accounts context as a possible home for the shared helper. Done means those existing copies use one helper while preserving the current first-name, last-name, and email fallback behavior; run the relevant tests for these areas.

Written by the indexing model from the issue text.

Assessment

Tech stack
elixir
Domain
backend
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.