right now there is no Web api call for renaming projects, only for project key api/projects/update_key .
Did a rename in Sonarqube DB - normally you should treat the DB as black box - when i needed to rename a bunch of project names.
When creating a project, the name takes blanks, but not the key. You’ll get the error message: Malformed key for Project: com.foo.bar : Foo Bar. Allowed characters are alphanumeric, '-', '_', '.' and ':', with at least one non-digit. com.foo.bar:FooBar is a valid project key.
The problem is that the display name doesn’t take blanks (spaces). I can press the space-bar as much as I want but they don’t appear in the field. The project key is fine as it also provides feedback on which characters are allowed.
Furthermore, the display name cannot be altered in the Web GUI after creating the project. So, I filed this as a bug.
you’re right, it’s not possible to edit the project name via Web UI or web api after creation.
But the create project form definitely takes blanks for the project name, see
I just want to point out that there’s no UI functionality to rename the project because it’s expected that the project name will be passed at each analysis (that’s optional by now, but that’s the history) and anything you set in the UI would just get overwritten. So your best bet here is to set sonar.projectName during analysis. (The docs.)
Correct. It takes spaces through the API or rather like G Ann suggests. However, if I try to add blanks in either Firefox or Chrome when creating the project through the web GUI I cannot provide a display name with spaces in it.
For now I’ve opted to add the sonar.projectName option to the scanner. I still feel that the web GUI should have the same capabilities.
Indeed, I can reproduce the error: you cannot add a space while typing (at the end of the name). It gets stripped out. This is indeed a bug, thanks for reporting it.
For now, here’s a workaround: type out your full project name, no spaces, and move the caret back. You can add spaces between letters without problems.