I'm looking for a part-time remote job.

Hire me


I'm the author of:

Mastering Redmine is a comprehensive guide with tips, tricks and best practices, and an easy-to-learn structure.

Check the book's project or

Buy the book

Social pages of the book:

By buying this book you also donate to Redmine (see this page).


Follow me:

Sequent issue numbers with the project key

Currently, I use Atlassian JIRA on my job at Kayako – I use Redmine for my personal projects. And still I like Redmine more! But, what I like in JIRA is sequent numbers plus the project key in issue IDs. There are many benefits to such issue numbers, some of them are: a) you easily see how many issues the project has, b) it’s much easier to remember issue IDs (even if numbers are four-digit – not sure why, maybe because you follow numbers increasing), c) you always know, which project the issue is for. These are no way critical benefits for me, but one day I got interested – how the similar can be implemented for Redmine. So, I started to experiment… And eventually here goes the result of the experiment – the ISSUE-id plugin for Redmine!

Generally, this plugin does two things: a) it adds a special project prefix to each issue id (e.g., ISSUE-) and b) it makes all project issues to have ID numbers sequential in the project scope. Thus, the first issue of the project is going to be #ISSUE-1, the second – #ISSUE-2, and so on.

But, the main problem, the plugin is attempting to work around, is not how to generate the ISSUE-id style IDs (it’s quite easy, actually), but how to make Redmine work with such IDs. And that’s not easy at all! So, to produce less problems the plugin adds the new ID style in addition to the default style (known as “legacy” style in the plugin). This way users are going to see new issue IDs, when it’s possible, and legacy IDs, if there are any problems. The plugin does its best to resolve as much such problems as possible though.

If you are a Redmine plugin developer, check this tutorial on how to support the new issue id style in your plugin.

Certainly, the project key, which is used in new issue IDs, must be specified by the project manager beforehand. The plugin allows to do this in the project settings, below the project identifier:

Project-issue-key

Like the project identifier the project key can be set only once and cannot be changed later. At the very moment, when it’s set and the user saves it, the plugin generates new issue IDs for all project issues. This way the user actually enables new issue IDs for the project. In other words, if the project key is not set for the project, this project will continue using legacy (default) issue IDs. So, you can control, which projects use the new issue ID style and which don’t…

Uninstalling the plugin is also safe – Redmine will just use legacy issue IDs for all projects. However, the new issue ID style Wiki syntax will stop working in this case.

You might want to use the same project key for the parent project and its subprojects. If this is the case, enable the “Issue key sharing” option in Administration → Plugins → ISSUE-id → Configure:

Issue-key-sharing

In addition to the above the plugin implements some other minor features to make new issue IDs work smoothly under Redmine. Thus:

  • It adds the new Wiki syntax: strings like #ABCD-123 in the Wiki content are replaced by links to corresponding issues (if present).
  • The issue auto-completion (which is used, e.g., for “Related issues” field of the issue form) now supports the new issue style as well.
  • And so on.
 

Comments (10)

Added by Suvrat Bhat 4 years ago

Issue-ID plugin works great. Could there be an option to make the issues with ISSUE-ID searchable. I see that the issues with IssueKey-Number are not searchable

Please suggest.

Thanks,
Suvrat

Added by Andriy Lesyuk 1 year ago

I forgot about this issue, so did not include the fix into 0.0.2. Sorry.

Please report such issues via Redmine. Added it there as #ISSUE-15.

Added by Julian Chang 4 years ago

Thank you Andryi for creating this fantastic plugin, I am test-driving it and it is working great! I can link issues together using the issue-key.

The only minor problem is with specifying parent/child tasks, when redmine complains about “Parent task ID invalid”. Here is the log report for your kind reference:

Redmine 2.6.0:

I have a project with issue key “IRC”, with 4 newly defined issues (no relationships between them whatsoever), with keys respectively:

IRC-1
IRC-2
IRC-3
IRC-4

I am able to define relationships between them, e.g., IRC-1 is related to IRC-2, etc.

However, I cannot set

IRC-1 ‘s parent to IRC-4

nor can I set

IRC-4’s parent to IRC-1

Examining the logs show the following Error:

Started GET "/issue_reads/count/assigned?counter_id=e0c20af0ad02031c9b817fab3ea7c6e3&period=0" for 183.90.37.75 at 2015-04-04 09:24:29 +0800
Processing by IssueReadsController#count as JSON
  Parameters: {"counter_id"=>"e0c20af0ad02031c9b817fab3ea7c6e3", "period"=>"0", "req"=>"assigned"}
  Current user: XXXXXXX (id=5)

Completed 500 Internal Server Error in 10.2ms

NoMethodError (undefined method `issues' for nil:NilClass):
  plugins/unread_issues/app/controllers/issue_reads_controller.rb:22:in `count'
  actionpack (3.2.21) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
  actionpack (3.2.21) lib/abstract_controller/base.rb:167:in `process_action'
  actionpack (3.2.21) lib/action_controller/metal/rendering.rb:10:in `process_action'
  actionpack (3.2.21) lib/abstract_controller/callbacks.rb:18:in `block in process_action'
  activesupport (3.2.21) lib/active_support/callbacks.rb:491:in `_run__4214543072989287071__process_action__329029205341008864__callbacks'
  activesupport (3.2.21) lib/active_support/callbacks.rb:405:in `__run_callback'
  activesupport (3.2.21) lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
  activesupport (3.2.21) lib/active_support/callbacks.rb:81:in `run_callbacks'
  actionpack (3.2.21) lib/abstract_controller/callbacks.rb:17:in `process_action'
  actionpack (3.2.21) lib/action_controller/metal/rescue.rb:29:in `process_action'
  actionpack (3.2.21) lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
  activesupport (3.2.21) lib/active_support/notifications.rb:123:in `block in instrument'
  activesupport (3.2.21) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  activesupport (3.2.21) lib/active_support/notifications.rb:123:in `instrument'
  actionpack (3.2.21) lib/action_controller/metal/instrumentation.rb:29:in `process_action'
  actionpack (3.2.21) lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
  activerecord (3.2.21) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
  actionpack (3.2.21) lib/abstract_controller/base.rb:121:in `process'
  actionpack (3.2.21) lib/abstract_controller/rendering.rb:45:in `process'
  actionpack (3.2.21) lib/action_controller/metal.rb:203:in `dispatch'
  actionpack (3.2.21) lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
  actionpack (3.2.21) lib/action_controller/metal.rb:246:in `block in action'
  actionpack (3.2.21) lib/action_dispatch/routing/route_set.rb:73:in `call'
  actionpack (3.2.21) lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
  actionpack (3.2.21) lib/action_dispatch/routing/route_set.rb:36:in `call'
  journey (1.0.4) lib/journey/router.rb:68:in `block in call'
  journey (1.0.4) lib/journey/router.rb:56:in `each'
  journey (1.0.4) lib/journey/router.rb:56:in `call'
  actionpack (3.2.21) lib/action_dispatch/routing/route_set.rb:608:in `call'
  rack-raw-upload (1.1.1) lib/rack/raw_upload.rb:18:in `call'
  rack-openid (1.4.2) lib/rack/openid.rb:98:in `call'
  request_store (1.0.5) lib/request_store/middleware.rb:9:in `call'
  actionpack (3.2.21) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
  rack (1.4.5) lib/rack/etag.rb:23:in `call'
  rack (1.4.5) lib/rack/conditionalget.rb:25:in `call'
  actionpack (3.2.21) lib/action_dispatch/middleware/head.rb:14:in `call'
  actionpack (3.2.21) lib/action_dispatch/middleware/params_parser.rb:21:in `call'
  plugins/redmine_dmsf/lib/redmine_dmsf/webdav/no_parse.rb:33:in `call'
  actionpack (3.2.21) lib/action_dispatch/middleware/flash.rb:242:in `call'
  rack (1.4.5) lib/rack/session/abstract/id.rb:210:in `context'
  rack (1.4.5) lib/rack/session/abstract/id.rb:205:in `call'
  actionpack (3.2.21) lib/action_dispatch/middleware/cookies.rb:341:in `call'
  activerecord (3.2.21) lib/active_record/query_cache.rb:64:in `call'
  activerecord (3.2.21) lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call'
  actionpack (3.2.21) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
  activesupport (3.2.21) lib/active_support/callbacks.rb:405:in `_run__2304286636443705379__call__2415184334725675777__callbacks'
  activesupport (3.2.21) lib/active_support/callbacks.rb:405:in `__run_callback'
  activesupport (3.2.21) lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
  activesupport (3.2.21) lib/active_support/callbacks.rb:81:in `run_callbacks'
  actionpack (3.2.21) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
  actionpack (3.2.21) lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
  actionpack (3.2.21) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
  actionpack (3.2.21) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
  railties (3.2.21) lib/rails/rack/logger.rb:32:in `call_app'
  railties (3.2.21) lib/rails/rack/logger.rb:16:in `block in call'
  activesupport (3.2.21) lib/active_support/tagged_logging.rb:22:in `tagged'
  railties (3.2.21) lib/rails/rack/logger.rb:16:in `call'
  actionpack (3.2.21) lib/action_dispatch/middleware/request_id.rb:22:in `call'
  rack (1.4.5) lib/rack/methodoverride.rb:21:in `call'
  rack (1.4.5) lib/rack/runtime.rb:17:in `call'
  activesupport (3.2.21) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
  rack (1.4.5) lib/rack/lock.rb:15:in `call'
  actionpack (3.2.21) lib/action_dispatch/middleware/static.rb:83:in `call'
  rack-cache (1.2) lib/rack/cache/context.rb:136:in `forward'
  rack-cache (1.2) lib/rack/cache/context.rb:245:in `fetch'
  rack-cache (1.2) lib/rack/cache/context.rb:185:in `lookup'
  rack-cache (1.2) lib/rack/cache/context.rb:66:in `call!'
  rack-cache (1.2) lib/rack/cache/context.rb:51:in `call'
  railties (3.2.21) lib/rails/engine.rb:484:in `call'
  railties (3.2.21) lib/rails/application.rb:231:in `call'
  railties (3.2.21) lib/rails/railtie/configurable.rb:30:in `method_missing'
  thin (1.6.3) lib/thin/connection.rb:86:in `block in pre_process'
  thin (1.6.3) lib/thin/connection.rb:84:in `catch'
  thin (1.6.3) lib/thin/connection.rb:84:in `pre_process'
  thin (1.6.3) lib/thin/connection.rb:53:in `process'
  thin (1.6.3) lib/thin/connection.rb:39:in `receive_data'
  eventmachine (1.0.3) lib/eventmachine.rb:187:in `run_machine'
  eventmachine (1.0.3) lib/eventmachine.rb:187:in `run'
  thin (1.6.3) lib/thin/backends/base.rb:73:in `start'
  thin (1.6.3) lib/thin/server.rb:162:in `start'
  thin (1.6.3) lib/thin/controllers/controller.rb:87:in `start'
  thin (1.6.3) lib/thin/runner.rb:200:in `run_command'
  thin (1.6.3) lib/thin/runner.rb:156:in `run!'
  thin (1.6.3) bin/thin:6:in `'
  /usr/bin/thin:23:in `load'
  /usr/bin/thin:23:in `'
  /usr/local/rvm/gems/ruby-1.9.3-p484@redmine/bin/ruby_executable_hooks:15:in `eval'

Added by Julian Chang 4 years ago

Sorry for posting the bug report here instead of using an issue, I tried registering an account on your site, but was unsuccessful. My loginID/email (I don’t have openID) is in your system, but I cannot login.

Recovering password did not generate a link for me, either.

Thank you for your time again!

Added by Andriy Lesyuk 1 year ago

This sounds like #ISSUE-4, which was fixed in 0.0.2.

The log is, however, related to third-party “unread_issues” plugin. This conflict can also be, probably, already fixed in 0.0.2 (needs testing).

Added by John Pankowicz 4 years ago

Andriy,

Thanks for creating this plugin. It will be extremely useful.
However, it is not working right now for Rails 4. When I first ran:

rake redmine:plugins:migrate RAILS_ENV=production

I got:

rake aborted!
ArgumentError: The provided regular expression is using multiline anchors (^ or $), which may present a security risk

I fixed this problem by changing all $ and ^ usage to \A and \z to satisfy the Rails security concerns.

Re-running the rake command then gave this error:

An error occurred while loading the routes definition of issue_id plugin (c:/row/dev/redmine-3.0.1/plugins/issue_id/config/routes.rb): Invalid route name, already in use: 'quoted_issue'
You may have defined two routes with the same name using the `:as` option, or you may be overriding a route already defined by a resource with the same naming.
For the latter, you can restrict the routes created with `resources` as explained here:
http://guides.rubyonrails.org/routing.html#restricting-the-routes-created.

I do not know enough about Rails to try solving this problem.

Added by Andriy Lesyuk 1 year ago

This was fixed in 0.0.2 too. Sorry for the delay.

Added by voku 3 years ago

Hello !

I have the same issue with redmine 3.0.3 stable.
i sthere a fix for this problem available ?

br
VoKu

Added by Andriy Lesyuk 1 year ago

It’s available now – in 0.0.2.

Added by Master5597 3 years ago

I’d look at this fork.
https://github.com/jett/issue-id

Also available in: Atom

Add a comment