Project

General

Profile

Ticket grouping plugin

Added by Andrew Chaika over 15 years ago

I have developed ticket (issues) grouping plugin and tested it on current trunk.
There is a sample screenshot:

Maybe it will be usefull for someone.


Replies (217)

RE: Ticket grouping plugin - Added by Ilya Prokazov over 15 years ago

When I install your plugin, getted from "github" I getting an error on step "migrating database":
Redmine 0.8 stable

rake db:migrate_plugins RAILS_ENV=production
(in /var/redmine)
rake aborted!

RE: Ticket grouping plugin - Added by Ilya Prokazov over 15 years ago

sorry, forgot last error line:

uninitialized constant CollectiveIdea

RE: Ticket grouping plugin - Added by Andrew Chaika over 15 years ago

Ilya Prokazov wrote:

When I install your plugin, getted from "github" I getting an error on step "migrating database":
Redmine 0.8 stable

You need to install awesome_nested_set rails plugin, in Redmine trunk it's already included but in stable 0.8.x branch it does't.
Just extract attached archive to vendor/plugins folder of Redmine and migration and plugin himself should work.
In current github version of my plugin is missing some translation strings for 0.8.x stable branch, I will correct it soon.

RE: Ticket grouping plugin - Added by Marek Kreft over 15 years ago

Hi!

I have the latest trunk version of Redmine for testing new features, but I can't find the way to enable subissues feature. Is it possible to make some simple HOW TO on that subject please?

And by the way: Andrew where did You get that nice layout (subissues.png) of Redmine from?

Thank you for any help.
Marek

RE: Ticket grouping plugin - Added by Andrew Chaika over 15 years ago

I don't test current trunk version of Redmine (after issue grouping feature have been implemented into the core). I think that they are incompatible. This plugin is tested and works well on 0.8.3 version and on r2641 trunk.
I plan to make separated plugin with subissues feature compatible with current trunk.
Layout that I show in subissues.png is a Issues List overridden by this plugin on my installation of Redmine (r2641 revision).

RE: Ticket grouping plugin - Added by Alexey Lustin over 15 years ago

current version is incompatible with current version of Redmine (trunk)

because where is new feature in Redmine core (group result by):

1. It is conflict with group by feature in plugin in part of the custom_field group by
2. conflict migration in plugin and in core

$ cat ./db/migrate/20090425161243_add_queries_group_by.rb
class AddQueriesGroupBy < ActiveRecord::Migration
  def self.up
    add_column :queries, :group_by, :string
  end

  def self.down
    remove_column :queries, :group_by
  end
end

$ cat ./vendor/plugins/redmine_issues_group/db/migrate/001_add_queries_group_by.rb
  class AddQueriesGroupBy < ActiveRecord::Migration
    def self.up
      add_column :queries, :group_by, :string
    end

    def self.down
      remove_column :queries, :group_by
    end
  end

for example you will get this exception if you try to group by custom field

 ActiveRecord::StatementInvalid in IssuesController#index

PGError: ERROR:  column "cf_12" does not exist
LINE 1: SELECT count(DISTINCT "issues".id) AS count_all, cf_12 AS cf...

and after all in issues list there is TWO field Result group by

RE: Ticket grouping plugin - Added by Mykhaylo Sorochan over 15 years ago

I'm using grouping plugin 0.0.8 with r2757.

RE: Ticket grouping plugin - Added by Andrew Chaika over 15 years ago

New version 0.1.1:
  • Added some compatibility with trunk version (issues grouping does not work well yet)
  • Added ability to view & add subissues in issue details
  • Plugin now work in development mode (without classes caching)

RE: Ticket grouping plugin - Added by Kirill Ponomarev over 15 years ago

It doesn't work on my copy of trunk (2768). I got message, "Object is not missing constant User!" when run comman: "cmd /K rake db:migrate_plugins RAILS_ENV="production" --trace".

RE: Ticket grouping plugin - Added by Andrew Chaika over 15 years ago

Please give full listing of migration, I will check

RE: Ticket grouping plugin - Added by yusuke kokubo over 15 years ago

I had error on Redmine trunk(r2768)

OK when current user is admin.
NG when current user is not admin.

#Sorry for my cheap English...

backtrace is below.
-----
Processing IssuesController#show (for xxxxxxx at 2009-05-28 14:56:07) [GET]
Parameters: {"action"=>"show", "id"=>"xxx", "controller"=>"issues"}
Rendering template within layouts/base
Rendering issues/show.rhtml

ActionView::TemplateError (undefined method `role' for #<Member:0x6ebe514>) on line #17 of vendor/plugins/redmine_issues_group/app/views/issues/_subissues_list.rhtml:
14: if User.current.admin?
15: @allowed_projects = Project.find(:all, :conditions => Project.visible_by(User.current))
16: else
17: User.current.memberships.each {|m| @allowed_projects << m.project if m.role.allowed_to?(:edit_parent)}
18: end
19: @target_project = @allowed_projects.detect {|p| p.id.to_s == params[:new_project_id]} if params[:new_project_id]
20: @target_project ||= @issue.project

C:/Program Files/ruby-1.8.6/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/attribute_methods.rb:260:in `method_missing'
vendor/plugins/redmine_issues_group/app/views/issues/_subissues_list.rhtml:17
C:/Program Files/ruby-1.8.6/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/associations/association_collection.rb:359:in `method_missing'
C:/Program Files/ruby-1.8.6/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/associations/association_proxy.rb:212:in `method_missing'
C:/Program Files/ruby-1.8.6/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/associations/association_proxy.rb:212:in `each'
C:/Program Files/ruby-1.8.6/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/associations/association_proxy.rb:212:in `send'
C:/Program Files/ruby-1.8.6/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/associations/association_proxy.rb:212:in `method_missing'
C:/Program Files/ruby-1.8.6/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/associations/association_collection.rb:359:in `method_missing'
vendor/plugins/redmine_issues_group/app/views/issues/_subissues_list.rhtml:17
C:/Program Files/ruby-1.8.6/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/renderable.rb:39:in `send'
C:/Program Files/ruby-1.8.6/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/renderable.rb:39:in `render'
C:/Program Files/ruby-1.8.6/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/renderable_partial.rb:20:in `render'
C:/Program Files/ruby-1.8.6/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:30:in `benchmark'
C:/Program Files/ruby-1.8.6/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/renderable_partial.rb:19:in `render'
C:/Program Files/ruby-1.8.6/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/template.rb:73:in `render_template'
C:/Program Files/ruby-1.8.6/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/renderable_partial.rb:45:in `render_partial'
C:/Program Files/ruby-1.8.6/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/partials.rb:152:in `render_partial'
C:/Program Files/ruby-1.8.6/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/base.rb:258:in `render'
C:/Program Files/ruby-1.8.6/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:926:in `render_without_benchmark'
C:/Program Files/ruby-1.8.6/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:51:in `render'
C:/Program Files/ruby-1.8.6/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/core_ext/benchmark.rb:8:in `realtime'
C:/Program Files/ruby-1.8.6/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:51:in `render'
C:/Program Files/ruby-1.8.6/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:948:in `render_to_string'
lib/redmine/hook.rb:113:in `send'
lib/redmine/hook.rb:113:in `view_issues_show_description_bottom'
lib/redmine/hook.rb:63:in `send'
lib/redmine/hook.rb:63:in `call_hook'
lib/redmine/hook.rb:63:in `each'
lib/redmine/hook.rb:63:in `call_hook'
C:/Program Files/ruby-1.8.6/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/core_ext/object/misc.rb:39:in `returning'
lib/redmine/hook.rb:60:in `call_hook'
lib/redmine/hook.rb:144:in `call_hook'
app/views/issues/show.rhtml:75

RE: Ticket grouping plugin - Added by Andrew Chaika over 15 years ago

Version 0.1.2:
  • Corrected roles
  • Migration should work fine
  • Some small bugs fixed

RE: Ticket grouping plugin - Added by Kirill Ponomarev over 15 years ago

Thanks! Now it work well. =)

RE: Ticket grouping plugin - Added by Nikolay Tuman over 15 years ago

Sorry about my bad Engnlish.
I'm install your plugins, but when I open page: /projects/cs/issues I see:

NoMethodError in Issues#index

Showing queries/_filters.rhtml where line #105 raised:

undefined method `<' for nil:NilClass

Extracted source (around line #105):

102:                                                                         :name => nil %>
103: </td>
104: </tr>
105: <% if (Redmine::VERSION::REVISION < 2696)  %>
106: <tr>
107: <td class="add-filter">
108: <%= l(:label_group_by) %>:

Trace of template inclusion: /app/views/issues/index.rhtml

RAILS_ROOT: C:/red
Application Trace | Framework Trace | Full Trace

vendor/plugins/redmine_issues_group/app/views/queries/_filters.rhtml:105:in `_run_erb_47vendor47plugins47redmine_issues_group47app47views47queries47_filters46rhtml'
vendor/rails/actionpack/lib/action_view/base.rb:342:in `send'
vendor/rails/actionpack/lib/action_view/base.rb:342:in `execute'
vendor/rails/actionpack/lib/action_view/template_handlers/compilable.rb:29:in `send'
vendor/rails/actionpack/lib/action_view/template_handlers/compilable.rb:29:in `render'
vendor/rails/actionpack/lib/action_view/partial_template.rb:20:in `render'
vendor/rails/actionpack/lib/action_controller/benchmarking.rb:30:in `benchmark'
vendor/rails/actionpack/lib/action_view/partial_template.rb:19:in `render'
vendor/rails/actionpack/lib/action_view/template.rb:22:in `render_template'
vendor/rails/actionpack/lib/action_view/partials.rb:110:in `render_partial'
vendor/rails/actionpack/lib/action_view/base.rb:277:in `render'
app/views/issues/index.rhtml:8:in `_run_erb_47app47views47issues47index46rhtml'
app/views/issues/index.rhtml:5:in `_run_erb_47app47views47issues47index46rhtml'
app/controllers/issues_controller.rb:67:in `index'
app/controllers/issues_controller.rb:66:in `index'

RE: Ticket grouping plugin - Added by Andrew Chaika over 15 years ago

Which version of Redmine and environment (Ruby, Rails) you have used?

RE: Ticket grouping plugin - Added by Nikolay Tuman over 15 years ago

I'm use:
Redmine - 0.8.4
Ruby - 1.8.6
Rails - 2.3.2

RE: Ticket grouping plugin - Added by Andrew Chaika over 15 years ago

You have installed plugin not from svn. Please try new version. Problem should be solved.

RE: Ticket grouping plugin - Added by Andrew Chaika over 15 years ago

Andrew Chaika wrote:

You have installed plugin not from svn.

Sorry not plugin, Redmine.

RE: Ticket grouping plugin - Added by Jason Messmer over 15 years ago

Thanks for fixing it...I should have came here first, I was ready to upload the patch for checking the VERSION. Thanks for an awesome plugin...

RE: Ticket grouping plugin - Added by Jason Messmer over 15 years ago

Is project_tree_options_for select option implemented?

ActionView::TemplateError (undefined method `project_tree_options_for_select' for #<ActionView::Base:0x3f26790>) on line #73 of issues/_add_subissue.rhtml:

RE: Ticket grouping plugin - Added by Jason Messmer over 15 years ago

Jason Messmer wrote:

Is project_tree_options_for select option implemented?

[...]

0.8.4 does not include project_tree_options_for_select it is not implemented in app/helpers/application_helper.rb

RE: Ticket grouping plugin - Added by Andrew Chaika over 15 years ago

Jason Messmer wrote:

0.8.4 does not include project_tree_options_for_select it is not implemented in app/helpers/application_helper.rb

Yes I see. One moment please...

RE: Ticket grouping plugin - Added by Andrew Chaika over 15 years ago

Jason Messmer wrote:

0.8.4 does not include project_tree_options_for_select it is not implemented in app/helpers/application_helper.rb

New corrected version 0.1.4.

(26-50/217)