Skip to content

fix: auto-convert project name in settings form#4436

Open
elias-ba wants to merge 4 commits intomainfrom
fix/project-settings-name-conversion
Open

fix: auto-convert project name in settings form#4436
elias-ba wants to merge 4 commits intomainfrom
fix/project-settings-name-conversion

Conversation

@elias-ba
Copy link
Contributor

@elias-ba elias-ba commented Feb 18, 2026

Description

This PR fixes the project settings form to auto-convert project names to url-safe format (lowercase, hyphens, digits), matching the behavior of the project creation form.

Previously, entering a name like "DEP-burundi-datafi" in settings would fail validation since the form submitted the raw input directly. The creation form already handled this by converting via Helpers.url_safe_name/1, but the settings form did not.

Closes #4437

Validation steps

  1. Go to a project's settings page
  2. Edit the project name with uppercase letters or spaces (e.g., "DEP-burundi-datafi")
  3. Verify the preview badge shows the converted name ("dep-burundi-datafi")
  4. Save and confirm the project is renamed successfully

Additional notes for the reviewer

  1. The raw_name field is not a virtual schema field — it's just a form input key that gets intercepted and converted before reaching the changeset (same pattern as the creation modal)
  2. Removed the "invalid format" test for name since uppercase input is now auto-converted rather than rejected

AI Usage

  • I have used Claude Code
  • I have used another model
  • I have not used AI

Pre-submission checklist

  • I have performed an AI review of my code (we recommend using /review
    with Claude Code)
  • I have implemented and tested all related authorization policies.
    (e.g., :owner, :admin, :editor, :viewer)
  • I have updated the changelog.
  • I have ticked a box in "AI usage" in this PR

The project creation form auto-converts uppercase and spaces to the
lowercase-hyphens-digits format, but the settings form did not, causing
users to get a validation error when entering names like "DEP-burundi-datafi".

Aligns the settings form with the creation form by using a raw_name input
that gets converted via Helpers.url_safe_name/1 before saving.
@github-project-automation github-project-automation bot moved this to New Issues in v2 Feb 18, 2026
The project name input was changed from `name` to `raw_name` for the
url-safe conversion feature, but two test assertions still referenced
the old field name.
@codecov
Copy link

codecov bot commented Feb 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.38%. Comparing base (32f1001) to head (653535d).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4436      +/-   ##
==========================================
+ Coverage   89.33%   89.38%   +0.05%     
==========================================
  Files         425      425              
  Lines       20133    20137       +4     
==========================================
+ Hits        17985    17999      +14     
+ Misses       2148     2138      -10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

None yet

Projects

Status: New Issues

Development

Successfully merging this pull request may close these issues.

bug: project settings form does not auto-convert project name to url safe names

1 participant

Comments