Project Removal/Redirection plugin¶
When removing or archiving a project one should always remember, that there can be some links saved in users’ bookmarks, search engines’ databases, forums etc. After removing or archiving such links will point to the error page having no explanation about what happened, why project has been removed, did it move to some other location etc. So for these reasons it is better not to remove/archive projects in Redmine and ChiliProject unless...
By installing the Project Removal/Redirection plugin for Redmine and ChiliProject you can now get rid of these issues. With this plugin removing behaves as before but archiving allows at least to specify a custom text, which can explain the reason for project removal. But it also allows to redirect users to another location – this can be just a new URL of the project or another Redmine/ChiliProject host (e.g. on another domain). When redirection to another Redmine/ChiliProject is used, users can be redirected exactly to the same issue, Wiki page etc (the same URI path but on new Redmine/ChiliProject host).
Using¶
The plugin gets activated, when a user archives a project (it does not effect deletion). After clicking on the “Archive” link in the project list in the Administration section the user gets forwarded to the redirection form:
This form supports the following “types” of redirection:
- “Without redirection” – the message is displayed, no redirection occurs;
- “Redirect to URL” – redirects to the specified URL;
- “Redirect to Redmine” – redirects to appropriate page on another Redmine/ChiliProject (on another host).
Unlike the “Without redirection” type two other types come with two additional fields: “URL” or “Redmine base URL” and “Delay”.
In the case, when the value for “Delay” is zero or none, that is, when you give no time for users to read the message, the plugin will use the SEO-friendly 301 HTTP status code (Moved Permanently) for the redirection.
Redirection to URL¶
In the “Redirect to URL” mode the user is redirected to the specified URL. If the “Delay” is equal to “0”, the user is redirected immediately (and the message is not shown), otherwise the page waits for the specified number of seconds (the message is shown in this case) and then redirects.
Redirection to Redmine/ChiliProject¶
In the “Redirect to Redmine” mode the user gets redirected to the same page (having the same URI path) on another Redmine/ChiliProject.
For example:
- Let’s take the URL of this page which is:
http://projects.andriylesyuk.com/projects/project-removal/wiki
. - If the field “Redmine base URL” contained e.g.:
http://another.host.com/redmine
. - The new URL a user would be going to be redirected to would be:
http://another.host.com/redmine/projects/redmine-removal/wiki
.
Therefore using this type of redirection means, that the project has been transferred to another Redmine/ChiliProject host.
If the “Delay” is equal to “0”, the user is redirected immediately (and the message is not shown) otherwise a page waits for the specified number of seconds (the message is shown in this case) and then redirects.
Changing settings¶
After submitting the form the new link appears in the project list (near the “Unarchive” link):
This link opens the redirection form and allows changing redirection settings. The link will also be available for previously archived projects, even for those ones, which do not use redirection and do not have any removal message.
Sample screenshots¶
Check the following settings:
If the user accessed the page of the project, he/she would get:
Install¶
To install the plugin do:
- For Redmine 2.x.x and above:
- Copy
project_removal
directory to#{RAILS_ROOT}/plugins
. - Run:
rake redmine:plugins:migrate RAILS_ENV=production
.
- Copy
- For older Redmine and ChiliProject:
- Copy
project_removal
directory to#{RAILS_ROOT}/vendor/plugins
. - Run:
rake db:migrate:plugins RAILS_ENV=production
.
- Copy
- Restart Redmine/ChiliProject.