Project

General

Profile

Reset issue ID#

Added by Rocky Stephens about 7 years ago

Attempting to reset the issue ID# when starting new project. Our current setup continues incrementing from last, but we do need it to restart from 1. Need any help to do this, as I am learning redmine on the fly.


Replies (7)

RE: Reset issue ID# - Added by Mischa The Evil about 7 years ago

This is something that has been discussed (and rejected) many times before. See #5765 and all its related issues.

RE: Reset issue ID# - Added by Rocky Stephens about 7 years ago

Yeah, I read thru that before posting. Not asking for the feature to be added, just wanting to know if there is a way to have the DB start from zero. Think this may work...

On console (since we're using linux):
mysql -u<user> -p<password> redmine
Replace <user> and <password> with the correct information to connect to
your database.
Now, run this command on the mysql console:

mysql> ALTER TABLE issues SET auto_increment = <number>;
mysql> quit;

Replace <number> with the number you want to use as the 'starting point' for
your issues.

RE: Reset issue ID# - Added by Mischa The Evil about 7 years ago

Rocky Stephens wrote:

[...] Think this may work... [...]

I personally wouldn't recommend (re)setting the auto_increment value manually as this may pose problems lateron. However, if you know what you're doing and you are willing to take the 'risk', YMMV.

RE: Reset issue ID# - Added by Kaung KK over 1 year ago

Please kindly help, I face the same issue that is I also want to start Issue No.1

That above script can't work because of it show error message at auto_increment

Please kindly give another suggection.

RE: Reset issue ID# - Added by Ivan Cenov over 1 year ago

Redmine is not designed to reset its issue numbers or to have numbering per project. There were plugins in the past that added this functionality though.

RE: Reset issue ID# - Added by C S over 1 year ago

I don't understand the reason for this need either...
If only 1 project is required at a time, then set up Redmine freshly and then make a backup of the database before the first issue is created - this way you can import this backup again after the project is completed and start over - with issue id 1 (forget not to delete all possible file attachments beforehand!)

RE: Reset issue ID# - Added by Bernhard Rohloff over 1 year ago

There's a plugin which tries to achieve this, but it's quite outdated and not compatible with current versions of Redmine.
If one's willing to make it compatible again, here's the link: https://www.redmine.org/plugins/issue_id

    (1-7/7)