Patch #9225
closedGenerate project identifier automatically with JavaScript
0%
Description
At *Planio Redmine Hosting*, we found that a considerable number of first-time users got stuck while creating their first project. The reason: the project identifier. As it is now, it's not clear what it is for and quite a few of our users tried identifiers starting with a number which yields a validation error that is not specific enough to help them understand that it actually has to start with an a-z
character.
This patch attempts to solve the issue by two small improvements:
- automatically generate the identifier while the name is typed in
- let the user know that the identifier must start with a lower case letter
Appreciate your comments and would love to see this making it into the core - I think it will improve the first time Redmine experience.
Files
Related issues
Updated by Etienne Massip about 13 years ago
There is already a legend (edit: caption?) under the input box that tells Length between 1 and 100 characters. Only lower case letters (a-z), numbers and dashes are allowed?
Why not add an 'auto-generate' AJAX button?
Updated by Jean-Baptiste Barth about 13 years ago
- Target version set to Candidate for next major release
I personnaly love the "non-intrusive" approach, it would be a really cool addition in the next major release.
Jan: isn't there any standard function to replace special characters in Prototype ? I don't do much Prototype these days...
Updated by Etienne Massip about 13 years ago
I already have an identifier for my project when I create a project in RM, so I should have to remove the proposed id in order to insert mine. What's the point with proposing a name to beginners when you can just check Generate sequential project identifiers in administration?
Also, if you have 2 projects with same generated id (even if I admit that this is very unlikely), you'll need to check DB to append a serial to the name, like my_project2
or whatsoever, thus the need for an AJAX call.
Updated by Jean-Baptiste Barth about 13 years ago
Etienne Massip wrote:
I already have an identifier for my project when I create a project in RM, so I should have to remove the proposed id in order to insert mine.
Not if you fill the identifier first, but well, maybe it could be just a "fallback" identifier (in a hidden field) if you don't fill any identifier before submitting ?
What's the point with proposing a name to beginners when you can just check Generate sequential project identifiers in administration?
Actually, beginners don't know this option, and they don't understand what to put in the "identifier" field. I also have an internal SaaS Redmine hosting and I can say the same thing as Jan, it's a bit confusing new users...
Also, if you have 2 projects with same generated id (even if I admit that this is very unlikely), you'll need to check DB to append a serial to the name, like
my_project2
or whatsoever, thus the need for an AJAX call.
It would be too complicated for something "very unlikely", imho.
Tell me what you think about this :- we don't fill project identifier automatically
- on form submission, if no project identifier is set, it's auto-generated with Jan's script
- there is not step 3
It has a drawback, it could be confusing too because Redmine would do a bit of magick behind the scenes. If we adopt this approach, the fallback identifier could well be generated server-side, not sure what's the best option.
A third option would be to propose the identifier in an alert box before submitting.
Updated by Jan from Planio www.plan.io about 13 years ago
Jean-Baptiste:
Jan: isn't there any standard function to replace special characters in Prototype ? I don't do much Prototype these days...
Holger over at Chili has proposed this: http://lehelk.com/2011/05/06/script-to-remove-diacritics/
Etienne:
What's the point with proposing a name to beginners when you can just check Generate sequential project identifiers in administration?
I strongly agree with Jean-Baptiste: first timers never find this.
Also, if you have 2 projects with same generated id (even if I admit that this is very unlikely), you'll need to check DB to append a serial to the name, like my_project2 or whatsoever, thus the need for an AJAX call.
Should you chose a name that generates the same identifier it will most likely be the same name as another project. Simply for that reason, validation will jump in. For those rare cases, I'd say we don't need ajax here. If we had Ajax, it would only be used to add a "2" or something at the end which usually looks ugly and would (without explanation) prompt users to remove it yielding the same validation problem.
Jean-Baptiste:
Tell me what you think about this :
- we don't fill project identifier automatically
- on form submission, if no project identifier is set, it's auto-generated with Jan's script
I think that's even more confusing, especially since the identifier cannot be changed afterwards. As they end up in almost every link to project items, that could be an unfortunate situation for some (I have had this feedback).
Actually, I like my initial approach much better:
- while you type a name, the identifier gets filled in in real time, so you will definitely notice it
- if you chose to set/change the identifier yourself, changing the name afterwards will not update the identifier, so it is non-intrusive
After all, our approach was modeled a bit after how Wordpress does it with permalinks. And: If they do it, can it be wrong? :-D
Updated by Etienne Massip about 13 years ago
Jan from Planio www.plan.io wrote:
Etienne:
What's the point with proposing a name to beginners when you can just check Generate sequential project identifiers in administration?
I strongly agree with Jean-Baptiste: first timers never find this.
Of course, since this is an Administration option, but Systems integrator/Administrator knows well this option and he will check it since he also knows that its Project managers are mostly newcomers.
What about:Also, if you have 2 projects with same generated id (even if I admit that this is very unlikely), you'll need to check DB to append a serial to the name, like my_project2 or whatsoever, thus the need for an AJAX call.
- changing administration option Generate sequential project identifiers to By default, generate project identifiers
- adding a checkbox Generate project identifier in the project creation screen which default state is set according to above administration option
- unchecking the checkbox will enable and empty the Identifier input box, thus allowing you to input your own project id
- if checked, identifier will be generated (being generated from project name can be another administration option) after validation (as it is now) so we can be sure that it is not a (unlikely but still possible) duplicate.
So, beginners don't have to worry about finding a project identifier and people like me will quickly uncheck the checkbox and input their own?
Updated by Etienne Massip about 13 years ago
I feel like you didn't like this idea :D
Updated by Jan from Planio www.plan.io about 13 years ago
- File generate_project_identifier_automatically_with_javascript.diff generate_project_identifier_automatically_with_javascript.diff added
sorry for the delay - I understand the general concern you have about generating sequential identifiers. I have uploaded a new patch which - in my opinion - solves your problem without adding more complexity to the settings. the simple change is:
should the identifier field already be filled (with the auto-generated value e.g.), entering a name will not override it.
on a sidenote, I have also included Holgers hint about diacritics.
Updated by Terence Mill almost 12 years ago
I thinh tjis i overruled by actual implentation and useless so far
Updated by Daniel Felix almost 12 years ago
Terence Mill wrote:
I thinh tjis i overruled by actual implentation and useless so far
Well, I don't think so. As I see, the identifier is still some input field. This patch would be good for newcomer. Maybe this is just my opinion. But each thing, which mades a system more intuitive, is a good thing. ;-)
Updated by Jean-Philippe Lang almost 12 years ago
- Status changed from New to Closed
- Assignee set to Jean-Philippe Lang
- Target version changed from Candidate for next major release to 2.3.0
- moved the js code to a separate script
- ported it to JQuery
- removed global variables
Thanks.
Updated by Go MAEDA almost 10 years ago
- Related to Defect #15950: Project identifier instructions still too ambiguous added
Updated by Mischa The Evil about 7 years ago
- Related to Defect #27101: Project identifier model constraint doesn't match with text_project_identifier_info and JS-generated identifiers added