wadewomersley/redmine-auto-identifier — Issue #3: Doesn't work when creating first project
Author: zextra
Created: 2011-12-14 03:31:31+00:00
State: open

If you install this plugin and then try to create first project, javascript error is thrown, because document.getElementById('project_parent_id') is undefined, thus rest of javascript code never runs.

I have modified [app/views/projects/_js_autocomplete.erb](https://github.com/wadewomersley/redmine-auto-identifier/blob/master/app/views/projects/_js_autocomplete.erb#L10) file's code to be something like this:

var parentProject = '';
if (document.getElementById('project_parent_id'))
parentProject = tidyIdentText( //.... etc, rest of the code

Now it works fine for me.