Smart issues sort plugin
Added by Vitaly Klimov almost 13 years ago
Intro¶
- Plugin replaces default Redmine issues sorting with one more intellegent. This type of sorting always puts children issues of parent issue after parent.
- Also plugin eleminates inconvenience when root issues sorted by parent issue are sorted by their ids instead.
- Plugin adds categories support for Redmine queries and displays queries grouped by categories.
- Plugin adds new option to queries which allows to always sort query by parent first thus keeping hierarchical issues structure
For details please visit plugin page
Up to date plugin page¶
Replies (55)
RE: Smart issues sort plugin - Added by Steven Wong almost 13 years ago
I tried it with redmine 1.3.X and when I rake it with errors.
please check it. Thanks.
- Invoke db:migrate_plugins (first_time)
- Invoke environment (first_time)
- Execute environment
rake aborted!
undefined method `issue_ids' for class `Query'
C:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/core_e
xt/module/aliasing.rb:33:in `alias_method'
C:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/core_e
xt/module/aliasing.rb:33:in `alias_method_chain'
C:/Test_PRJ/redmine-1.3/vendor/plugins/redmine_smart_issues_sort/lib/query_patch
.rb:11:in `included'
C:/Test_PRJ/redmine-1.3/vendor/plugins/redmine_smart_issues_sort/lib/query_patch
.rb:8:in `class_eval'
C:/Test_PRJ/redmine-1.3/vendor/plugins/redmine_smart_issues_sort/lib/query_patch
.rb:8:in `included'
C:/Test_PRJ/redmine-1.3/vendor/plugins/redmine_smart_issues_sort/init.rb:30:in `
include'
C:/Test_PRJ/redmine-1.3/vendor/plugins/redmine_smart_issues_sort/init.rb:30:in `
send'
C:/Test_PRJ/redmine-1.3/vendor/plugins/redmine_smart_issues_sort/init.rb:30:in `
evaluate_init_rb'
C:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/callba
cks.rb:182:in `call'
C:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/callba
cks.rb:182:in `evaluate_method'
C:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/callba
cks.rb:166:in `call'
C:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/callba
cks.rb:90:in `run'
C:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/callba
cks.rb:90:in `each'
C:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/callba
cks.rb:90:in `send'
C:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/callba
cks.rb:90:in `run'
... ...
RE: Smart issues sort plugin - Added by Vitaly Klimov almost 13 years ago
Sorry, my bad - method issue_ids was introduced only in 1.3.2
I have updated the plugin - please check the new version.
RE: Smart issues sort plugin - Added by Dmitry Nilsen almost 13 years ago
I got:
uninitialized constant Rails::Plugin::Dispatcher
to fix it, I add
require 'dispatcher'
to redmine_smart_issues_sort/init.rb
regards
RE: Smart issues sort plugin - Added by Dmitry Nilsen almost 13 years ago
is it also possible to collapse child tasks? such feature would be really useful
regards
RE: Smart issues sort plugin - Added by Алексей Блышко almost 13 years ago
After saving new query with category. I get that error:
Processing IssuesController#index (for 192.168.0.205 at 2012-03-20 16:46:11) [GET] Parameters: {"action"=>"index", "controller"=>"issues"} Rendering template within layouts/base Rendering issues/index ActionView::TemplateError (missing attribute: category) on line #16 of app/views/issues/_sidebar.html.erb: 13: <% end %> 14: <%= call_hook(:view_issues_sidebar_planning_bottom) %> 15: 16: <%= render_sidebar_queries %> 17: <%= call_hook(:view_issues_sidebar_queries_bottom) %> app/views/issues/_sidebar.html.erb:16 app/views/issues/index.html.erb:82 app/helpers/application_helper.rb:1033:in `content_for' app/views/issues/index.html.erb:81 app/controllers/issues_controller.rb:92:in `index' app/controllers/issues_controller.rb:91:in `index' passenger (3.0.11) lib/phusion_passenger/rack/request_handler.rb:96:in `process_request' passenger (3.0.11) lib/phusion_passenger/abstract_request_handler.rb:513:in `accept_and_process_next_request' passenger (3.0.11) lib/phusion_passenger/abstract_request_handler.rb:274:in `main_loop' passenger (3.0.11) lib/phusion_passenger/classic_rails/application_spawner.rb:321:in `start_request_handler' passenger (3.0.11) lib/phusion_passenger/classic_rails/application_spawner.rb:275:in `send' passenger (3.0.11) lib/phusion_passenger/classic_rails/application_spawner.rb:275:in `handle_spawn_application' passenger (3.0.11) lib/phusion_passenger/utils.rb:479:in `safe_fork' passenger (3.0.11) lib/phusion_passenger/classic_rails/application_spawner.rb:270:in `handle_spawn_application' passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:357:in `__send__' passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop' passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously' passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:180:in `start' passenger (3.0.11) lib/phusion_passenger/classic_rails/application_spawner.rb:149:in `start' passenger (3.0.11) lib/phusion_passenger/spawn_manager.rb:219:in `spawn_rails_application' passenger (3.0.11) lib/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add' passenger (3.0.11) lib/phusion_passenger/spawn_manager.rb:214:in `spawn_rails_application' passenger (3.0.11) lib/phusion_passenger/abstract_server_collection.rb:82:in `synchronize' passenger (3.0.11) lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize' passenger (3.0.11) lib/phusion_passenger/spawn_manager.rb:213:in `spawn_rails_application' passenger (3.0.11) lib/phusion_passenger/spawn_manager.rb:132:in `spawn_application' passenger (3.0.11) lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application' passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:357:in `__send__' passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop' passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously' passenger (3.0.11) helper-scripts/passenger-spawn-server:99 Rendering /home/nekt/redmine/public/500.html (500 Internal Server Error)
What's wrong?
RE: Smart issues sort plugin - Added by Vitaly Klimov almost 13 years ago
Have you done plugin migrations?
RE: Smart issues sort plugin - Added by Алексей Блышко almost 13 years ago
Yes.
I'm not understand ruby engine. But I see those fields in DB:
mysql> SHOW columns FROM queries; +----------------------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +----------------------+--------------+------+-----+---------+----------------+ | id | int(11) | NO | PRI | NULL | auto_increment | | project_id | int(11) | YES | MUL | NULL | | | name | varchar(255) | NO | | | | | filters | text | YES | | NULL | | | user_id | int(11) | NO | MUL | 0 | | | is_public | tinyint(1) | NO | | 0 | | | column_names | text | YES | | NULL | | | sort_criteria | text | YES | | NULL | | | group_by | varchar(255) | YES | | NULL | | | category | varchar(255) | YES | | NULL | | | sort_by_parent_first | tinyint(1) | YES | | 0 | | +----------------------+--------------+------+-----+---------+----------------+ 11 rows in set (0.01 sec)
RE: Smart issues sort plugin - Added by Vitaly Klimov almost 13 years ago
Please try new version posted on plugin page
RE: Smart issues sort plugin - Added by Dmitry Homenok over 12 years ago
We have migrated Redmine to 1.3.2 version from 1.2 one. After the upgrade some of saved queries stopped work properly showing 500 error:
NoMethodError (undefined method `name' for :spent_hours:Symbol):
app/models/query.rb:415:in `has_column?'
app/controllers/issues_controller.rb:85:in `index'
passenger (3.0.11) lib/phusion_passenger/rack/request_handler.rb:96:in `process_request'
passenger (3.0.11) lib/phusion_passenger/abstract_request_handler.rb:513:in `accept_and_process_next_request'
passenger (3.0.11) lib/phusion_passenger/abstract_request_handler.rb:274:in `main_loop'
passenger (3.0.11) lib/phusion_passenger/classic_rails/application_spawner.rb:321:in `start_request_handler'
passenger (3.0.11) lib/phusion_passenger/classic_rails/application_spawner.rb:275:in `send'
passenger (3.0.11) lib/phusion_passenger/classic_rails/application_spawner.rb:275:in `handle_spawn_application'
passenger (3.0.11) lib/phusion_passenger/utils.rb:479:in `safe_fork'
passenger (3.0.11) lib/phusion_passenger/classic_rails/application_spawner.rb:270:in `handle_spawn_application'
passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:357:in `__send__'
passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:180:in `start'
passenger (3.0.11) lib/phusion_passenger/classic_rails/application_spawner.rb:149:in `start'
passenger (3.0.11) lib/phusion_passenger/spawn_manager.rb:219:in `spawn_rails_application'
passenger (3.0.11) lib/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add'
passenger (3.0.11) lib/phusion_passenger/spawn_manager.rb:214:in `spawn_rails_application'
passenger (3.0.11) lib/phusion_passenger/abstract_server_collection.rb:82:in `synchronize'
passenger (3.0.11) lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
passenger (3.0.11) lib/phusion_passenger/spawn_manager.rb:213:in `spawn_rails_application'
passenger (3.0.11) lib/phusion_passenger/spawn_manager.rb:132:in `spawn_application'
passenger (3.0.11) lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application'
passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:357:in `__send__'
passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
passenger (3.0.11) helper-scripts/passenger-spawn-server:99
- ruby 1.8.7 (2012-02-08 patchlevel 358) [x86_64-linux]
- gem list
- LOCAL GEMS ***
- actionmailer (2.3.14)
- actionpack (2.3.14)
- activerecord (2.3.14)
- activeresource (2.3.14)
- activesupport (2.3.14)
- bundler (1.1.3)
- daemon_controller (1.0.0)
- fastthread (1.0.7)
- mysql (2.8.1)
- passenger (3.0.11)
- rack (1.1.3)
- rails (2.3.14)
- rake (0.9.2)
- rubygems-bundler (0.9.0)
- mysql Ver 14.14 Distrib 5.1.52, for redhat-linux-gnu (x86_64) using readline 5.1
Thanks.
RE: Smart issues sort plugin - Added by Eivind Tagseth over 12 years ago
Same here. spent_hours as a query field seems to be new to redmine 1.4.
I commented out the offending 5 lines from redmine_smart_issues_sort/lib/query_patch.rb
Eivind
RE: Smart issues sort plugin - Added by Steven Wong over 12 years ago
not support redmine 2.0.2 just seem the url
RE: Smart issues sort plugin - Added by Vitaly Klimov over 12 years ago
Plugin updated to support Redmine 2.x
RE: Smart issues sort plugin - Added by michal hegyi over 12 years ago
Hi
this is great plugin but i found a bug:
In case you define a public query as: For all projects then with plugin activated you will get letter (L) in the number of issues instead a number.
Next if you click on the query defined as For all projects you leave your project and you land on default redmine page without any project selected and then you see result of your query. But this is a bug as default redmine query defined for all projects will not move you out of the project.
Would it be possible to fix this please?
We are using queries as:
Assigned to me:
Recently modified:
and we have like 6 projects in redmine.
Thank you very much!
RE: Smart issues sort plugin - Added by Steven Wong over 12 years ago
it seems that i have the same problem. but i am not very sure what cause it.
RE: Smart issues sort plugin - Added by Vitaly Klimov over 12 years ago
Steven Wong wrote:
it seems that i have the same problem. but i am not very sure what cause it.
Actually it is not a problem, but a feature - by default all queries For all projects are global, i.e. query applies to all projects in Redmine.
If you want to apply this query to current project - just click L link at the end of the query name.
RE: Smart issues sort plugin - Added by Cheyenne Wills about 12 years ago
Just installed the plugin, but have a user complaining that their private query is now intermixed with the project/global queries. We are still on Redmine 1.3.2
Is there a way to get the private queries grouped as before?
RE: Smart issues sort plugin - Added by Vitaly Klimov about 12 years ago
Cheyenne Wills wrote:
Is there a way to get the private queries grouped as before?
You can apply categories to each query, so i would advise users to put all private queries to the category Private if the need this breakdown.
RE: Smart issues sort plugin - Added by # And almost 12 years ago
Vitaly, 2.2 support. =)
undefined method `issues' for class `Query' (NameError) from /usr/local/rvm/gems/ruby-1.9.3-p327/gems/activesupport-3.2.10/lib/active_support/core_ext/module/aliasing.rb:31:in `alias_method_chain' from /var/www/redmine/plugins/redmine_smart_issues_sort/lib/query_patch.rb:12:in `block in included' from /var/www/redmine/plugins/redmine_smart_issues_sort/lib/query_patch.rb:10:in `class_eval' from /var/www/redmine/plugins/redmine_smart_issues_sort/lib/query_patch.rb:10:in `included' from /var/www/redmine/plugins/redmine_smart_issues_sort/lib/query_patch.rb:98:in `include' from /var/www/redmine/plugins/redmine_smart_issues_sort/lib/query_patch.rb:98:in `<top (required)>'
Look please on http://www.redmine.org/projects/redmine/repository/revisions/10964
Very important plugin, hope you can fix it asap. Thank you very much!
RE: Smart issues sort plugin - Added by # And almost 12 years ago
Anyone fix it to work with Redmine 2.2? Can't update Redmine, such as this plugin very necessary.
RE: Smart issues sort plugin - Added by Jesse Fledderjohann almost 12 years ago
Same issue with 2.3. Love the plugin, hope it's not dead...
RE: Smart issues sort plugin - Added by Jakub Lukasik over 11 years ago
Fix for Redmine 2.3:
File plugins/redmine_smart_issues_sort/lib/issues_helper_patch.rb
17,18c17,18 < @sidebar_queries = Query.visible.all( < :order => "#{Query.table_name}.name ASC", --- > @sidebar_queries = IssueQuery.visible.all( > :order => "#{IssueQuery.table_name}.name ASC",
File plugins/redmine_smart_issues_sort/lib/query_patch.rb
< require_dependency 'query' --- > require_dependency 'issue_query' 98c99 < Query.send(:include, SmartIssuesSort::Patches::QuerySortCriteriaPatch) --- > IssueQuery.send(:include, SmartIssuesSort::Patches::QuerySortCriteriaPatch)
RE: Smart issues sort plugin - Added by Andrey Krot over 11 years ago
Jakub Lukasik wrote:
Fix for Redmine 2.3:
File plugins/redmine_smart_issues_sort/lib/issues_helper_patch.rb
[...]
File plugins/redmine_smart_issues_sort/lib/query_patch.rb
[...]
It's works on 2.3.x, but only when viewing issues.
If I try to edit or create nuw query - I get next error in production.log
Started GET "/queries/173/edit" for 192.168.247.149 at Fri Apr 26 11:44:04 +0800 Processing by QueriesController#edit as HTML Parameters: {"id"=>"173"} Current user: krot (id=3) Rendered queries/_filters.html.erb (364.9ms) Rendered queries/_columns.html.erb (72.4ms) Rendered plugins/redmine_smart_issues_sort/app/views/queries/_form.html.erb (4 Rendered queries/edit.html.erb within layouts/base (481.2ms) Completed 500 Internal Server Error in 500ms ActionView::Template::Error (undefined local variable or method `tag_name' for # 17: <td> 18: <%= label_tag "selected_columns", l(:description_selected_columns) 19: <br /> 20: <%= select_tag tag_name, 21: options_for_select(query_selected_inline_columns_options(q 22: :id => 'selected_columns', :multiple => true, :size => 10, 23: :ondblclick => "moveOptions([M V/this.form.selected_column app/views/queries/_columns.html.erb:20:in `_app_views_queries__columns_html_er app/views/queries/edit.html.erb:4:in `_app_views_queries_edit_html_erb__348627 app/views/queries/edit.html.erb:3:in `_app_views_queries_edit_html_erb__348627
Help solving this problem, please!
RE: Smart issues sort plugin - Added by # And over 11 years ago
Andrey, I'll publish fixed plugin at GitHub soon. Wait a while, please.