Project

General

Profile

Smart issues sort plugin

Added by Vitaly Klimov over 12 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

http://www.redmine.org/plugins/redmine_smart_issues_sort


Replies (55)

RE: Smart issues sort plugin - Added by Alex Vanino over 11 years ago

I'm having the same issue with the fix posted above by Jakub.

Started GET "/redmine/queries/2/edit" for 192.32.0.146 at 2013-05-15 15:26:42 +0000
Processing by QueriesController#edit as HTML
  Parameters: {"id"=>"2"}
  Current user: avanino (id=1)
  Rendered queries/_filters.html.erb (30.3ms)
  Rendered queries/_columns.html.erb (99.0ms)
  Rendered plugins/redmine_smart_issues_sort/app/views/queries/_form.html.erb (146.2ms)
  Rendered queries/edit.html.erb within layouts/base (148.3ms)
Completed 500 Internal Server Error in 160ms

ActionView::Template::Error (undefined local variable or method `tag_name' for #<#<Class:0x007f06c8e9d3d0>:0x007f06c8ea4f40>):
    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(query)),
    22:               :id => 'selected_columns', :multiple => true, :size => 10, :style => "width:150px",
    23:               :ondblclick => "moveOptions(this.form.selected_columns, this.form.available_columns);" %>
  app/views/queries/_columns.html.erb:20:in `_app_views_queries__columns_html_erb__2774146173728988389_69833559840520'
  app/views/queries/edit.html.erb:4:in `block in _app_views_queries_edit_html_erb___2958167760804875963_69833558672460'
  app/views/queries/edit.html.erb:3:in `_app_views_queries_edit_html_erb___2958167760804875963_69833558672460'

RE: Smart issues sort plugin - Added by Andrey Krot over 11 years ago

  1. And wrote:

Andrey, I'll publish fixed plugin at GitHub soon. Wait a while, please.

I'm still waiting for plugin fix. Did you forgot about it?

RE: Smart issues sort plugin - Added by Jaroslav Povolný over 11 years ago

Hi, this is great plugin, but it does not work for 2.3 version. Pretty please, can this be fixed? Thank you very much!

RE: Smart issues sort plugin - Added by Miroslav Zaťko over 11 years ago

sorry, was in wrong thread...

RE: Smart issues sort plugin - Added by Massimo Rossello over 11 years ago

Hi all,
I prepared a patch for 2.3.
Please report if it is full functional

RE: Smart issues sort plugin - Added by Alex Vanino over 11 years ago

That patch doesn't seem to be working for me.

root@mayerredmine:/opt/bitnami/apps/redmine/htdocs/plugins/redmine_smart_issues_sort# patch -i redmine_smart_issues_sort-2.3.patch 
can't find file to patch at input line 5
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/plugins/redmine_smart_issues_sort/lib/issues_helper_patch.rb b/plugins/redmine_smart_issues_sort/lib/issues_helper_patch.rb
|index f3b07fb..2bcea2d 100644
|--- a/plugins/redmine_smart_issues_sort/lib/issues_helper_patch.rb
|+++ b/plugins/redmine_smart_issues_sort/lib/issues_helper_patch.rb
--------------------------

RE: Smart issues sort plugin - Added by Massimo Rossello over 11 years ago

Yes, that was just a diff from the installation path. Probably it would work if you cd into /opt/bitnami/apps/redmine/htdocs

In any case here is the stripped one

redmine_smart_issues_sort-2.3.patch (2.07 KB) redmine_smart_issues_sort-2.3.patch Patch for redmine 2.3.x (stripped)

RE: Smart issues sort plugin - Added by Alex Vanino over 11 years ago

I tried from htdocs as well and got the same error. I'm going to try the stripped patch you just put up.

RE: Smart issues sort plugin - Added by Alex Vanino over 11 years ago

Just tried again.

From htdocs:
root@mayerredmine:/opt/bitnami/apps/redmine/htdocs# patch -i redmine_smart_issues_sort-2.3.patch         
can't find file to patch at input line 5
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/lib/issues_helper_patch.rb b/lib/issues_helper_patch.rb
|index f3b07fb..2bcea2d 100644
|--- a/lib/issues_helper_patch.rb
|+++ b/lib/issues_helper_patch.rb
--------------------------
File to patch: 

From the smart issues plugin dir:
root@mayerredmine:/opt/bitnami/apps/redmine/htdocs/plugins/redmine_smart_issues_sort# patch -i redmine_smart_issues_sort-2.3.patch         
can't find file to patch at input line 5
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/lib/issues_helper_patch.rb b/lib/issues_helper_patch.rb
|index f3b07fb..2bcea2d 100644
|--- a/lib/issues_helper_patch.rb
|+++ b/lib/issues_helper_patch.rb
--------------------------
File to patch: 

From the Plugins Dir:
root@mayerredmine:/opt/bitnami/apps/redmine/htdocs/plugins# patch -i redmine_smart_issues_sort-2.3.patch 
can't find file to patch at input line 5
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/lib/issues_helper_patch.rb b/lib/issues_helper_patch.rb
|index f3b07fb..2bcea2d 100644
|--- a/lib/issues_helper_patch.rb
|+++ b/lib/issues_helper_patch.rb
--------------------------
File to patch:

RE: Smart issues sort plugin - Added by Alex Vanino over 11 years ago

OK, so I couldn't get that patch working at all, however I did open the patch file and manually add the changes into each of the required files. So far everything looks good.

RE: Smart issues sort plugin - Added by Massimo Rossello over 11 years ago

Use
patch -p1 -i redmine_smart_issues_sort-2.3.patch

from the plugins/redmine_smart_issues_sort folder

Not specifying any -p flag would try to search files in flatten folder

RE: Smart issues sort plugin - Added by Andrey Krot over 11 years ago

I found the trouble in plugin.

1. In some cases when I try to see issues in project with many issues link, plugin fails with error "Stack overflow" in production.log. Thi problem disappear after check box " By default sort by parent issue first " in plugin configuration was unchecked.
2. Issue filtering, fields set changing and grouping does not work. When I try to change set of fields, and click "Apply", the default set of fields appear in issues view.
Environment info

Environment:
  Redmine version                2.3.2.stable
  Ruby version                   1.9.3-p448 (2013-06-27) [i686-linux]
  Rails version                  3.2.13
  Environment                    production
  Database adapter               Mysql2
Redmine plugins:
  redmine_plugin_views_revisions 0.0.1
  redmine_smart_issues_sort      0.3.1
  redmine_theme_changer          0.1.0
  redmine_xls_export             0.2.1.t3

RE: Smart issues sort plugin - Added by Steven Wong about 11 years ago

a new issue found

when I used the issue list to save my query, I click [save] button and 500 error

could anyone solve it. Thanks.

the error informaiton is


Started GET "/redmine/projects/mmmp/queries/new?utf8=%E2%9C%93&set_filter=1&f%5B%5D=status_id&op%5Bstatus_id%5D=o&f%5B%5D=&selected_columns%5B%5D=tracker&selected_columns%5B%5D=subject&selected_columns%5B%5D=status&selected_columns%5B%5D=assigned_to&selected_columns%5B%5D=updated_on&selected_columns%5B%5D=fixed_version&group_by=" for 127.0.0.1 at 2013-08-26 16:11:33 +0800
Processing by QueriesController#new as HTML
  Parameters: {"utf8"=>"?", "set_filter"=>"1", "f"=>["status_id", ""], "op"=>{"status_id"=>"o"}, "selected_columns"=>["tracker", "subject", "status", "assigned_to", "updated_on", "fixed_version"], "group_by"=>"", "project_id"=>"mmmp"}
  Current user: wanghui (id=3)
  Rendered plugins/redmine_smart_issues_sort/app/views/queries/_form.html.erb (0.0ms)
  Rendered queries/new.html.erb within layouts/base (0.0ms)
Completed 500 Internal Server Error in 47ms

ActionView::Template::Error (undefined method `category' for #<IssueQuery:0x2b8bb20>):
    8: <%# VVK start %>
    9: <p>
    10:   <label for="query_category"><%=l(:field_category)%></label>
    11:   <%= text_field 'query', 'category', :size => "80" %>
    12: </p>
    13: <div id="query_categories_choices" class="autocomplete">
    14: </div>
  app/views/queries/new.html.erb:4:in `block in _app_views_queries_new_html_erb___1038067327_26445144'
  app/views/queries/new.html.erb:3:in `_app_views_queries_new_html_erb___1038067327_26445144'

RE: Smart issues sort plugin - Added by Imre Tóth about 11 years ago

I solved some compatibility problems with the Redmine 2.3.2.

RE: Smart issues sort plugin - Added by # And about 11 years ago

Thanks Imre, I added your patch to repo. Anyone can get the updated version right here: https://github.com/logical-and/redmine_smart_issues_sort

RE: Smart issues sort plugin - Added by Andrey Krot about 11 years ago

Good work!
Issue filtering and field configuring is working now!
But, I have one problem.
So, plugin works correctly in all my projects, except one.
Tehe are about 170 issues in this project. And when I try to view a list of them - error 500 code occures.
Full message test in browser

Internal error

An error occurred on the page you were trying to access.
If you continue to experience problems please contact your Redmine administrator for assistance.

If you are the Redmine administrator, check your log files for details about the error.

Back

In production log I see next messages

Started GET "/projects/kis-distrfs/issues?utf8=%E2%9C%93&set_filter=1&f%5B%5D=status_id&op%5Bstatus_id%5D=o&f%5B%5D=&c%5B%5D=tracker&c%5B%5D=status&c%5B%5D=priority&c%5B%5D=subject&c%5B%5D=assigned_to&c%5B%5D=updated_on&c%5B%5D=due_date&group_by=" for 192.168.247.149 at 2013-09-02 20:38:04 +0800
Processing by IssuesController#index as HTML
  Parameters: {"utf8"=>"вњ“", "set_filter"=>"1", "f"=>["status_id", ""], "op"=>{"status_id"=>"o"}, "c"=>["tracker", "status", "priority", "subject", "assigned_to", "updated_on", "due_date"], "group_by"=>"", "project_id"=>"kis-distrfs"}
  Current user: krot (id=3)
Completed 500 Internal Server Error in 651ms

SystemStackError (stack level too deep):
  activesupport (3.2.13) lib/active_support/callbacks.rb:409

If I uncheck "Sort by parent first" checkbox in plugin configuration - all works.
Do you have some ideas? How to solve this problem&

RE: Smart issues sort plugin - Added by Daniel Rauer about 11 years ago

Steven Wong wrote:

a new issue found

when I used the issue list to save my query, I click [save] button and 500 error

could anyone solve it. Thanks.

the error informaiton is

[...ActionView::Template::Error (undefined method `category' for #<IssueQuery:0x2b8bb20>):...]

We are also running into this error. Using Redmine 2.3.2, Redmine plugin views revisions plugin is installed, and we are using current GitHub checkout of the smart issues sort plugin. Any ideas on how to fix this, or is a workaround existing?

Kind regards,
Daniel

RE: Smart issues sort plugin - Added by Mark Zalavari about 11 years ago

We using the trunk version ea86379cd0 without any problems.
Thank you for your work!

Environment:
Redmine version 2.3.3.stable
Ruby version 1.9.3-p448 (2013-06-27) [x86_64-linux]
Rails version 3.2.13
Environment production
Database adapter Mysql2
Redmine plugins:
redmine_default_columns 0.1.1
redmine_plugin_views_revisions 0.0.1
redmine_smart_issues_sort 0.3.1
redmine_taskjuggler 0.1.0
status_button 0.1.0

RE: Smart issues sort plugin - Added by Kaskade LNA about 11 years ago

I tried several redmine version (2.0, 2.2, 2.3) with the plugin redmine_smart_issues_sort 0.3.1, also encounters 500 Internal Server Error. and the below stack error show in log file. when "By default sort by parent issue first" is enabled. and issue status filter change to all or closed. Actually, we've got more than 20K issues in total and 17K closed status. However, I removed most of closed issues and leave around 3K records there. everything goes fine. Would you please help to solve it? this is a blocking issue for our upgrade.

SystemStackError (stack level too deep):
activesupport (3.2.6) lib/active_support/callbacks.rb:409

RE: Smart issues sort plugin - Added by Kaskade LNA about 11 years ago

with 2.3 fix that your pushed to github in 2 months ago. the problem still encountered.

RE: Smart issues sort plugin - Added by Adnan Topçu about 11 years ago

Hi,
This plugin works in our redmine 2.3 but it works slowly. this plugin increased issue list time from 2 sec. to 5.5 sec. in my project.
i get this times from log. when I remove the plugin, this time back to 2 sec. again.
there are 150 open and 1200 closed issues in that project.
I do not want to give up this plugin. Does anyone have a solution to decrease this time?

Environment:
Redmine version 2.3.3.stable
Ruby version 1.9.3-p448 (2013-06-27) [x86_64-linux]
Rails version 3.2.13
Environment production
Database adapter Mysql2
Redmine plugins:
author 0.1.0
autowatch 0.1.0
due_date_reminder 0.3.2
extended_fields 0.2.2
periodictask 2.0.0
redmine_assets_plugin 0.0.1
redmine_banner 0.0.9
redmine_category_tree 0.0.3
redmine_changeauthor 1.0.0
redmine_contacts 3.2.5-pro
redmine_contacts_helpdesk 2.2.5-pro
redmine_dmsf 1.4.6 stable
redmine_extended_watchers 0.0.4
redmine_favourite_projects 0.6.3
redmine_gemavatar 1.0.3
redmine_ics_export 2.0.0.dev
redmine_information 1.0.2
redmine_inline_attach_screenshot 0.4.6
redmine_inline_note_images_plugin 0.0.1
redmine_issue_checklist 2.0.5
redmine_ldap_sync 2.0.2
redmine_login_audit 0.1.1
redmine_logs 0.0.5y
redmine_reorder_links_arbitrary 0.0.7
redmine_stealth 0.6.0
redmine_textilizable_custom_fields 0.0.1
redmine_theme_changer 0.1.0
redmine_wiki_extensions 0.6.4
role_shift 0.1.0b
sidebar_hide 0.0.4
under_construction 0.0.1
wiking 0.0.4

Best Regards,

RE: Smart issues sort plugin - Added by Imre Telek almost 11 years ago

It thows the following error with redmine 2.4.2: (redmine_smart_issues_sort version: 0.3.1)

ActionView::Template::Error (undefined method `is_public' for #<IssueQuery:0x45a6260>):
17:
18: <% if User.current.admin? || User.current.allowed_to?(:manage_public_queries, Herve Harster) >
19: <p><label for="query_is_public"><
=l(:field_is_public)%></label>
20: <%= check_box 'query', 'is_public',
21: :onchange => (User.current.admin? ? nil : 'if (this.checked) {$("#query_is_for_all").removeAttr("checked"); $("#query_is_for_all").attr("disabled", true);} else {$("#query_is_for_all").removeAttr("disabled");}') ></p>
22:
23: <
end %>
app/views/queries/new.html.erb:4:in `block in app_views_queries_new_html_erb_116586891_42293064'
app/views/queries/new.html.erb:3:in `_app_views_queries_new_html_erb__116586891_42293064'

RE: Smart issues sort plugin - Added by Shak Shak almost 11 years ago

I managed to install the plugin okay without any of the issues seen above.

However I dont think it's working as expected. When sorting by priority I see the following:

http://i.imgur.com/goqjHj8.png

Ie I have a low priority task, then a parent/hierarchy, and then the remaining normal and low tasks. Is priority not honoured if sorting by parent is enabled?

RE: Smart issues sort plugin - Added by Muditha Jayawardana over 10 years ago

We got the same issue with redmine 2.4.5, when saving or editing the custom queries

ActionView::Template::Error (undefined method `is_public' for #<IssueQuery:0x89887>):
18: <% if User.current.admin? || User.current.allowed_to?(:manage_public_queries, Herve Harster) >
19: <p><label for="query_is_public"><
=l(:field_is_public)%></label>
20: <%= check_box 'query', 'is_public',
21: :onchange => (User.current.admin? ? nil : 'if (this.checked) {$("#query_is_for_all").removeAttr("checked"); $("#query_is_for_all").attr("disabled", true);} else {$("#query_is_for_all").removeAttr("disabled");}') ></p>
22:
23: <
end %>
app/views/queries/new.html.erb:4:in `block in app_views_queries_new_html_erb__98788_687687'
app/views/queries/new.html.erb:3:in `_app_views_queries_new_html_erb___2411066153653_700'

(26-50/55)