Project

General

Profile

Change project identifier

Added by Markus Schlichting over 15 years ago

Hi,
i've a typo in one of my projects identifiers - is it possible to change it, even if the gui shows only an disabled fieldwith the name?

thanks
Markus

p.s.: Redmine is awesome! Keep up the good work! :-)


Replies (4)

RE: Change project identifier - Added by Eric Davis over 15 years ago

Markus Schlichting wrote:

Hi,
i've a typo in one of my projects identifiers - is it possible to change it, even if the gui shows only an disabled fieldwith the name?

You can change it directly in the database but it will cause any external links to break since the identifier is used in the url. If this is a new project, there shouldn't be any reisk

Eric

RE: Change project identifier - Added by Markus Schlichting over 15 years ago

Hi,
thanks for the instant reply, it worked out well :) I've had also seen the field in MySQL and was just asking as i was not sure about references to it :)
thanks, again :)

RE: Change project identifier - Added by Andriy Lesyuk over 12 years ago

Hi, guys!
It's pretty old topic but anyway... I have written Project identify aliases plugin which can resolve this issue.
Currently it's "beta" (did not test it well) and I would be happy if someone could help testing.

RE: Change project identifier - Added by Karl Wilbur about 8 years ago

Since this is still a "issue" with Redmine, I'll just leave this here for posterity...

Project identifiers are clearly not meant to be modified. It appears that the expectation is that one should delete a project and re-create it with the new identifier. Since this is unacceptable to me, I found a way around it.

The web interface does not allow for changing the identifier and there are a few roadblocks in the Project class itself that prevents one from just opening a console and running something like this (which, as a Rails developer, I would expect to be able to do):

p = Project.find_by(identifier: 'old-identifier')
p.identifier = 'new-identifier'
p.save

However, I have found that one can do this from a production console:

p = Project.where(identifier: 'old-identifier').first
p.instance_eval { self['identifier'] = 'new-identifier' }
p.save

And, of course, as Eric mentioned above...

...it will cause any external links to break since the identifier is used in the url. If this is a new project, there shouldn't be any [risk]

    (1-4/4)