GithubHelp home page GithubHelp logo

redmine_category_tree's People

Contributors

giraypultar avatar kappanossi avatar pattebre avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

redmine_category_tree's Issues

Error 500 when copying a project with subcategories

It appears that the code in redmine related to copying a project to another project (with the intent of the source copy as a template) does not understand the nested category hierarchy and throws an error 500 when committing the copy. It only takes one category with a child to cause this to happen.

Here's a snip of the log file, and below that an environment description.

Completed 500 Internal Server Error in 179.6ms

ActiveRecord::ActiveRecordError (Unauthorized assignment to lft: it's an internal field handled by acts_as_nested_set code, use move_to_* methods instead.):
lib/plugins/awesome_nested_set/lib/awesome_nested_set/awesome_nested_set.rb:88:in lft=' app/models/project.rb:835:inblock in copy_issue_categories'
app/models/project.rb:833:in copy_issue_categories' app/models/project.rb:720:inblock (2 levels) in copy'
app/models/project.rb:719:in each' app/models/project.rb:719:inblock in copy'
app/models/project.rb:716:in copy' app/controllers/projects_controller.rb:122:inblock in copy'
app/models/mailer.rb:353:in with_deliveries' app/controllers/projects_controller.rb:119:incopy'

Here's the environment:
Environment:
Redmine version 2.4.2.stable.12475
Ruby version 1.9.3-p194 (2012-04-20) [x86_64-linux]
Rails version 3.2.16
Environment production
Database adapter MySQL
SCM:
Subversion 1.6.17
Git 1.7.10.4
Filesystem
Redmine plugins:
clipboard_image_paste 1.8
redmine_category_tree 0.0.3
redmine_dashboard 2.1
redmine_favorite_projects 1.0.1

Cannot be used in version 4.0.4

`rake redmine:plugins:migrate RAILS_ENV=production NAME=redmine_category_tree
rake aborted!
StandardError: An error has occurred, all later migrations canceled:

Directly inheriting from ActiveRecord::Migration is not supported. Please specify the Rails release the migration was written for:

class IssueCategoryActsAsNestedSet < ActiveRecord::Migration[4.2]
/var/lib/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/migration.rb:528:in inherited' /mnt/d/code/ruby/redmine-4.0.4/plugins/redmine_category_tree/db/migrate/001_issue_category_acts_as_nested_set.rb:1:in <top (required)>'
/var/lib/gems/2.6.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in require' /var/lib/gems/2.6.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in require'
/var/lib/gems/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in block in require' /var/lib/gems/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in load_dependency'
/var/lib/gems/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in require' /var/lib/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/migration.rb:986:in load_migration'
/var/lib/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/migration.rb:982:in migration' /var/lib/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/migration.rb:977:in disable_ddl_transaction'
/var/lib/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/migration.rb:1350:in use_transaction?' /var/lib/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/migration.rb:1342:in ddl_transaction'
/var/lib/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/migration.rb:1291:in execute_migration_in_transaction' /var/lib/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/migration.rb:1263:in block in migrate_without_lock'
/var/lib/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/migration.rb:1262:in each' /var/lib/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/migration.rb:1262:in migrate_without_lock'
/var/lib/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/migration.rb:1210:in block in migrate' /var/lib/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/migration.rb:1363:in with_advisory_lock'
/var/lib/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/migration.rb:1210:in migrate' /mnt/d/code/ruby/redmine-4.0.4/lib/redmine/plugin.rb:504:in up'
/var/lib/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/migration.rb:1011:in migrate' /mnt/d/code/ruby/redmine-4.0.4/lib/redmine/plugin.rb:536:in migrate_plugin'
/mnt/d/code/ruby/redmine-4.0.4/lib/redmine/plugin.rb:477:in migrate' /mnt/d/code/ruby/redmine-4.0.4/lib/redmine/plugin.rb:488:in migrate'
/mnt/d/code/ruby/redmine-4.0.4/lib/tasks/redmine.rake:135:in block (3 levels) in <top (required)>' /var/lib/gems/2.6.0/gems/rake-12.3.2/exe/rake:27:in <top (required)>'

Caused by:
StandardError: Directly inheriting from ActiveRecord::Migration is not supported. Please specify the Rails release the migration was written for:

class IssueCategoryActsAsNestedSet < ActiveRecord::Migration[4.2]
/var/lib/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/migration.rb:528:in inherited' /mnt/d/code/ruby/redmine-4.0.4/plugins/redmine_category_tree/db/migrate/001_issue_category_acts_as_nested_set.rb:1:in <top (required)>'
/var/lib/gems/2.6.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in require' /var/lib/gems/2.6.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in require'
/var/lib/gems/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in block in require' /var/lib/gems/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in load_dependency'
/var/lib/gems/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in require' /var/lib/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/migration.rb:986:in load_migration'
/var/lib/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/migration.rb:982:in migration' /var/lib/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/migration.rb:977:in disable_ddl_transaction'
/var/lib/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/migration.rb:1350:in use_transaction?' /var/lib/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/migration.rb:1342:in ddl_transaction'
/var/lib/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/migration.rb:1291:in execute_migration_in_transaction' /var/lib/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/migration.rb:1263:in block in migrate_without_lock'
/var/lib/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/migration.rb:1262:in each' /var/lib/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/migration.rb:1262:in migrate_without_lock'
/var/lib/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/migration.rb:1210:in block in migrate' /var/lib/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/migration.rb:1363:in with_advisory_lock'
/var/lib/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/migration.rb:1210:in migrate' /mnt/d/code/ruby/redmine-4.0.4/lib/redmine/plugin.rb:504:in up'
/var/lib/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/migration.rb:1011:in migrate' /mnt/d/code/ruby/redmine-4.0.4/lib/redmine/plugin.rb:536:in migrate_plugin'
/mnt/d/code/ruby/redmine-4.0.4/lib/redmine/plugin.rb:477:in migrate' /mnt/d/code/ruby/redmine-4.0.4/lib/redmine/plugin.rb:488:in migrate'
/mnt/d/code/ruby/redmine-4.0.4/lib/tasks/redmine.rake:135:in block (3 levels) in <top (required)>' /var/lib/gems/2.6.0/gems/rake-12.3.2/exe/rake:27:in <top (required)>'
Tasks: TOP => redmine:plugins:migrate
(See full trace by running task with --trace)
`

Error on installation

Hi

Error occur during plugin installation : rake redmine:plugins:migrate NAME=redmine_category_tree RAILS_ENV=production

Migrating redmine_category_tree (Redmine Category Tree)...
== 1 IssueCategoryActsAsNestedSet: migrating ==================================
-- add_column(:issue_categories, :parent_id, :integer, {:null=>true})
   -> 0.0024s
-- add_column(:issue_categories, :lft, :integer, {:null=>true})
   -> 0.0015s
-- add_column(:issue_categories, :rgt, :integer, {:null=>true})
   -> 0.0015s
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:

undefined method `join_sql' for #<Arel::SelectManager:0xa46b3b0>
Did you mean?  join_sources/usr/share/redmine/plugins/redmine_category_tree/db/migrate/001_issue_category_acts_as_nested_set.rb:10:in `up'
/usr/share/redmine/lib/redmine/plugin.rb:481:in `migrate_plugin'
/usr/share/redmine/lib/redmine/plugin.rb:453:in `migrate'
/usr/share/redmine/lib/redmine/plugin.rb:464:in `migrate'
/usr/share/redmine/lib/tasks/redmine.rake:127:in `block (3 levels) in <top (required)>'
NoMethodError: undefined method `join_sql' for #<Arel::SelectManager:0xa46b3b0>
Did you mean?  join_sources
/usr/share/redmine/plugins/redmine_category_tree/db/migrate/001_issue_category_acts_as_nested_set.rb:10:in `up'
/usr/share/redmine/lib/redmine/plugin.rb:481:in `migrate_plugin'
/usr/share/redmine/lib/redmine/plugin.rb:453:in `migrate'
/usr/share/redmine/lib/redmine/plugin.rb:464:in `migrate'
/usr/share/redmine/lib/tasks/redmine.rake:127:in `block (3 levels) in <top (required)>'
Tasks: TOP => redmine:plugins:migrate
(See full trace by running task with --trace)

Environment:

  • Redmine version 3.2.1.stable
  • Ruby version 2.3.1-p112 (2016-04-26) [i386-linux-gnu]
  • Rails version 4.2.7.1
  • Environment production
  • Database adapter SQLite

SCM:

  • Subversion 1.9.4
  • Git 2.1.4
  • Filesystem

Redmine plugins:

  • redmine_default_custom_query 1.1.2
  • redmine_spent_time 3.1.2
  • redmine_wktime 2.7

500 Internal Server Error

Hi there,
When I want to change category of an issue I get internal error. The log is the following:

ActionView::Template::Error (undefined method render_issue_category_with_tree_inline' for #<#<Class:0x007f61ec1c6bf0>:0x007f61eec3cf38>): 1: <%= "(#{l(:field_private_notes)}) " if @journal.private_notes? -%><%= l(:text_issue_updated, :id => "##{@issue.id}", :author => @journal.user) %> 2: 3: <% details_to_strings(@journal_details, true).each do |string| -%> 4: <%= string %> 5: <% end -%> 6: app/helpers/issues_helper.rb:307:inshow_detail'
app/helpers/issues_helper.rb:277:in block in details_to_strings' app/helpers/issues_helper.rb:263:ineach'
app/helpers/issues_helper.rb:263:in details_to_strings' app/views/mailer/issue_edit.text.erb:3:in_app_views_mailer_issue_edit_text_erb___3153075802587236381_70029275035580'
app/models/mailer.rb:411:in block in mail' app/models/mailer.rb:410:inmail'
app/models/mailer.rb:74:in issue_edit' app/models/mailer.rb:423:ininitialize'
app/models/mailer.rb:446:in method_missing' app/models/mailer.rb:86:inblock (2 levels) in deliver_issue_edit'
app/models/issue.rb:831:in each_notification' app/models/mailer.rb:85:inblock in deliver_issue_edit'
app/models/journal.rb:77:in block in each_notification' app/models/journal.rb:75:ineach'
app/models/journal.rb:75:in each_notification' app/models/mailer.rb:84:indeliver_issue_edit'
app/models/journal.rb:190:in send_notification' app/models/journal.rb:54:insave'
app/models/issue.rb:1520:in create_journal' app/models/issue.rb:165:increate_or_update'
app/controllers/issues_controller.rb:478:in block in save_issue_with_child_records' app/controllers/issues_controller.rb:466:insave_issue_with_child_records'
app/controllers/issues_controller.rb:188:in `update'

Thank you

Context menu

Congratulations for your plugin, please could you add the category tree structure in the issues context menu

Thanks

Redmine 500 error (undefined method `issue_category_tree')

Hello,
I'm having difficult time trying to use your plugin. As long as project have no categories, it's settings page is working fine. However, when I'm trying to add new category or open project with already exiting categories, Redmine 500 error occurs.

Message from system log:

Started GET "/projects/test_backend/settings/categories" for 10.132.182.41 at 2016-04-27 16:49:09 +0200
Processing by ProjectsController#settings as HTML
  Parameters: {"id"=>"test_backend", "tab"=>"categories"}
  Current user: kkuziel-admin (id=77)
  Rendered plugins/redmine_meeting_room_calendar/app/views/projects/_project_meeting_rooms.html.erb (0.7ms)
  Rendered projects/_form.html.erb (38.8ms)
  Rendered projects/_edit.html.erb (40.8ms)
  Rendered projects/settings/_modules.html.erb (12.9ms)
  Rendered projects/settings/_members.html.erb (21.5ms)
  Rendered plugins/advanced_roadmap_v2/app/views/projects/settings/_milestones.html.erb (2.5ms)
  Rendered projects/settings/_versions.html.erb (13.9ms)
  Rendered plugins/redmine_category_tree/app/views/projects/settings/_issue_categories.html.erb (564.8ms)
  Rendered common/_tabs.html.erb (665.0ms)
  Rendered projects/settings.html.erb within layouts/base (666.5ms)
Completed 500 Internal Server Error in 687ms (ActiveRecord: 14.7ms)

ActionView::Template::Error (undefined method 'issue_category_tree' for #<#<Class:0x000000052568e0>:0x007f5b39ed1458>):
    10:     <th></th>
    11:   </tr></thead>
    12:   <tbody>
    13: <% issue_category_tree(@project.issue_categories) do |category, level| %>
    14:   <% unless category.new_record? %>
    15:   <tr class="issue_category <%= cycle 'odd', 'even' %> <%= level > 0 ? "idnt idnt-#{level}" : nil %>">
    16:     <td class="name"><span><%=h(category.name) %></span></td>
  app/views/common/_tabs.html.erb:22:in 'block in _437c7bed7810a622c4d4f1b69fd38128'
  app/views/common/_tabs.html.erb:21:in 'each'
  app/views/common/_tabs.html.erb:21:in '_437c7bed7810a622c4d4f1b69fd38128'
  app/helpers/application_helper.rb:321:in 'render_tabs'
  app/views/projects/settings.html.erb:3:in '_1c3d66c0fad385775d8e22882599a759'

Details of my installation:

  Redmine version                3.0.7.stable
  Ruby version                   2.2.4-p230 (2015-12-16) [x86_64-linux]
  Rails version                  4.2.3
  Environment                    production
  Database adapter               PostgreSQL
SCM:
  Git                            1.8.3.1
  Filesystem                     
Redmine plugins:
  a_common_libs                  2.0.0
  advanced_roadmap_v2            2.4.1
  copy_parent_issue_id           1.0.1
  event_notifications            3.0.0
  favorite_locations             0.0.1
  inline_edit_issues             0.0.1
  issue_votes                    0.2.0
  mega_calendar                  1.3.1
  redmine_agile                  1.3.12
  redmine_banner_notifications   0.0.1
  redmine_base_deface            0.0.1
  redmine_base_select2           4.0.0
  redmine_better_crossprojects   0.4
  redmine_category_tree          0.0.6
  redmine_checklists             3.1.3
  redmine_contacts               4.0.4
  redmine_custom_reports         3.1.0
  redmine_custom_values_projects 0.0.1
  redmine_custom_workflows       0.1.6
  redmine_dashboard              2.7.0
  redmine_default_custom_query   1.1.2
  redmine_default_subtask_tracker 0.2
  redmine_image_clipboard_paste  1.0.0
  redmine_improved_searchbox     0.0.3
  redmine_issue_tabs             1.1.1
  redmine_issue_templates        0.1.1
  redmine_logs                   0.1.0
  redmine_mail_reminder          3.0.0.0001
  redmine_meeting_room_calendar  3.0.0
  redmine_merge_redmine          0.0.1
  redmine_monitoring_controlling 0.1.1
  redmine_my_page                0.1.8
  redmine_pivot_table            0.0.2
  redmine_pretend                2.0.1
  redmine_questions              0.0.7
  redmine_related_issues         0.0.1
  redmine_scheduling_poll        1.3.0
  redmine_sidebar_toc_pt         1.7.0
  redmine_subtasks_inherited_fields 1.1.0
  redmine_tab                    0.4.0
  redmine_tags                   3.1.0
  redmine_timelog_updates_issue  0.1
  redmine_timesheet_plugin       0.7.0
  redmine_workflow_enhancements  0.5.0
  redmine_xls_export             0.2.1.t9
  redrisk                        1.0.1
  release_logs                   1.0.0
  tracker_hider                  0.0.1
  wiking                         1.1.0

Any ideas what may be causing this issue?
Thanks in advance!

Didn't show up full list If i filtered parent category

Hi. I am using Redmine 3.2.3.stable.
I installed redmine_category_tree plugin and I maked 'parent', 'child' categories, and maked test issues in these categories.
then, went Issues menu and filtered parent category. but only show containing parent category.
is this bug? or not feature in this version?

sorry for my poor english. then I attach some screenshot. Thanks!

full issues list
full

parent category issues list
parent

child category issues list
child

Server 500 with redmine_pivot_table

I filed a bug with redmine_pivot_table. PivotTable works fine on its own, but in conjunction with CategoryTree it generates a 500 error.

deecay/redmine_pivot_table#13

The author seemed disinclined to investigate and suggested:

The conflict might be caused by category-tree using a custom defined function in
queries_helper_patch, which other plugins with similar patch don't do. But I can't
be sure.

If I really wanted both plugins to coexist, I would try to transplant the contents of 
the function render_issue_category_with_tree into queries_helper_patch.rb, to 
eliminate custom function call.

Thought I might bring it up here to see if there was a way to fix without hacking something non-portable?

2.x backwards compat

How does one retrieve a previous version -- which does not have the 3.x prereq -- that will still works on 2.3? There is only a single branch and a single 0.0.6 tag in this repo.

(This is less a bug and more about clarifying github checkouts...)

Bug if _I delete a category

If I delete a category when I go to a issue with this category in the historic the plugin fails (redmine error)

Not support Redmine 5.x

Hello

with this

Rails version             6.1.7
Ruby version              ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-linux-gnu]
RubyGems version          3.3.5
Rack version              2.2.4
Middleware                ActionDispatch::HostAuthorization, Rack::ContentLength, Rack::Sendfile, ActionDispatch::Static, ActionDispatch::Executor, ActiveSupport::Cache::Strategy::LocalCache::Middleware, Rack::Runtime, Rack::MethodOverride, ActionDispatch::RequestId, RequestStore::Middleware, ActionDispatch::RemoteIp, Rails::Rack::Logger, ActionDispatch::ShowExceptions, ActionDispatch::DebugExceptions, ActionDispatch::ActionableExceptions, ActionDispatch::Callbacks, ActionDispatch::Cookies, ActionDispatch::Session::CookieStore, ActionDispatch::Flash, ActionDispatch::ContentSecurityPolicy::Middleware, ActionDispatch::PermissionsPolicy::Middleware, Rack::Head, Rack::ConditionalGet, Rack::ETag, Rack::TempfileReaper
Application root          /opt/redmine-5.0.3
Environment               production
Database adapter          mysql2
Database schema version   20220224194639

I got

** Invoke redmine:plugins:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
LoadError: cannot load such file -- redmine_category_tree/hooks/redmine_category_tree_hooks
/var/lib/gems/3.0.0/gems/zeitwerk-2.6.6/lib/zeitwerk/kernel.rb:38:in `require'
/var/lib/gems/3.0.0/gems/zeitwerk-2.6.6/lib/zeitwerk/kernel.rb:38:in `require'
/opt/redmine-5.0.3/plugins/redmine_category_tree/init.rb:12:in `<top (required)>'
/opt/redmine-5.0.3/lib/redmine/plugin_loader.rb:31:in `load'
/opt/redmine-5.0.3/lib/redmine/plugin_loader.rb:31:in `run_initializer'
/opt/redmine-5.0.3/lib/redmine/plugin_loader.rb:108:in `each'
/opt/redmine-5.0.3/lib/redmine/plugin_loader.rb:108:in `block in load'
/var/lib/gems/3.0.0/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:427:in `instance_exec'
/var/lib/gems/3.0.0/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:427:in `block in make_lambda'
/var/lib/gems/3.0.0/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:198:in `block (2 levels) in halting'
/var/lib/gems/3.0.0/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:604:in `block (2 levels) in default_terminator'
/var/lib/gems/3.0.0/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:603:in `catch'
/var/lib/gems/3.0.0/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:603:in `block in default_terminator'
/var/lib/gems/3.0.0/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:199:in `block in halting'
/var/lib/gems/3.0.0/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:512:in `block in invoke_before'
/var/lib/gems/3.0.0/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:512:in `each'
/var/lib/gems/3.0.0/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:512:in `invoke_before'
/var/lib/gems/3.0.0/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:105:in `run_callbacks'
/var/lib/gems/3.0.0/gems/activesupport-6.1.7/lib/active_support/reloader.rb:88:in `prepare!'
/var/lib/gems/3.0.0/gems/railties-6.1.7/lib/rails/application/finisher.rb:124:in `block in <module:Finisher>'
/var/lib/gems/3.0.0/gems/railties-6.1.7/lib/rails/initializable.rb:32:in `instance_exec'
/var/lib/gems/3.0.0/gems/railties-6.1.7/lib/rails/initializable.rb:32:in `run'
/var/lib/gems/3.0.0/gems/railties-6.1.7/lib/rails/initializable.rb:61:in `block in run_initializers'
/usr/lib/ruby/3.0.0/tsort.rb:228:in `block in tsort_each'
/usr/lib/ruby/3.0.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
/usr/lib/ruby/3.0.0/tsort.rb:431:in `each_strongly_connected_component_from'
/usr/lib/ruby/3.0.0/tsort.rb:349:in `block in each_strongly_connected_component'
/usr/lib/ruby/3.0.0/tsort.rb:347:in `each'
/usr/lib/ruby/3.0.0/tsort.rb:347:in `call'
/usr/lib/ruby/3.0.0/tsort.rb:347:in `each_strongly_connected_component'
/usr/lib/ruby/3.0.0/tsort.rb:226:in `tsort_each'
/usr/lib/ruby/3.0.0/tsort.rb:205:in `tsort_each'
/var/lib/gems/3.0.0/gems/railties-6.1.7/lib/rails/initializable.rb:60:in `run_initializers'
/var/lib/gems/3.0.0/gems/railties-6.1.7/lib/rails/application.rb:391:in `initialize!'
/opt/redmine-5.0.3/config/environment.rb:16:in `<top (required)>'
/var/lib/gems/3.0.0/gems/zeitwerk-2.6.6/lib/zeitwerk/kernel.rb:38:in `require'
/var/lib/gems/3.0.0/gems/zeitwerk-2.6.6/lib/zeitwerk/kernel.rb:38:in `require'
/var/lib/gems/3.0.0/gems/activesupport-6.1.7/lib/active_support/dependencies.rb:332:in `block in require'
/var/lib/gems/3.0.0/gems/activesupport-6.1.7/lib/active_support/dependencies.rb:299:in `load_dependency'
/var/lib/gems/3.0.0/gems/activesupport-6.1.7/lib/active_support/dependencies.rb:332:in `require'
/var/lib/gems/3.0.0/gems/railties-6.1.7/lib/rails/application.rb:367:in `require_environment!'
/var/lib/gems/3.0.0/gems/railties-6.1.7/lib/rails/application.rb:533:in `block in run_tasks_blocks'
/usr/share/rubygems-integration/all/gems/rake-13.0.6/lib/rake/task.rb:281:in `block in execute'
/usr/share/rubygems-integration/all/gems/rake-13.0.6/lib/rake/task.rb:281:in `each'
/usr/share/rubygems-integration/all/gems/rake-13.0.6/lib/rake/task.rb:281:in `execute'
/usr/share/rubygems-integration/all/gems/rake-13.0.6/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/usr/share/rubygems-integration/all/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
/usr/share/rubygems-integration/all/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
/usr/share/rubygems-integration/all/gems/rake-13.0.6/lib/rake/task.rb:243:in `block in invoke_prerequisites'
/usr/share/rubygems-integration/all/gems/rake-13.0.6/lib/rake/task.rb:241:in `each'
/usr/share/rubygems-integration/all/gems/rake-13.0.6/lib/rake/task.rb:241:in `invoke_prerequisites'
/usr/share/rubygems-integration/all/gems/rake-13.0.6/lib/rake/task.rb:218:in `block in invoke_with_call_chain'
/usr/share/rubygems-integration/all/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
/usr/share/rubygems-integration/all/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
/usr/share/rubygems-integration/all/gems/rake-13.0.6/lib/rake/task.rb:188:in `invoke'
/usr/share/rubygems-integration/all/gems/rake-13.0.6/lib/rake/application.rb:160:in `invoke_task'
/usr/share/rubygems-integration/all/gems/rake-13.0.6/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/usr/share/rubygems-integration/all/gems/rake-13.0.6/lib/rake/application.rb:116:in `each'
/usr/share/rubygems-integration/all/gems/rake-13.0.6/lib/rake/application.rb:116:in `block in top_level'
/usr/share/rubygems-integration/all/gems/rake-13.0.6/lib/rake/application.rb:125:in `run_with_threads'
/usr/share/rubygems-integration/all/gems/rake-13.0.6/lib/rake/application.rb:110:in `top_level'
/usr/share/rubygems-integration/all/gems/rake-13.0.6/lib/rake/application.rb:83:in `block in run'
/usr/share/rubygems-integration/all/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
/usr/share/rubygems-integration/all/gems/rake-13.0.6/lib/rake/application.rb:80:in `run'
/usr/share/rubygems-integration/all/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/usr/bin/rake:25:in `load'
/usr/bin/rake:25:in `<main>'
Tasks: TOP => redmine:plugins:migrate => environment

Thanks

IssuesHelper Patch bug

When a category is deleted and it had issues assigned, if you choose to reassign them to another category then the issues#show page for those issues will break.

This is because the IssuesHelperPatch has a bug - the alias_method_chain overrides a method in order to fix up the UI for the history entries but fails to account for the case of deleted categories (which the overridden Redmine method does).
You see, Redmine puts in a history entry when an issue is reassigned a new category, as when the category deletion described above occurs, so unless caught, ActiveRecord will look for a missing category_id when trying to load the _history partial for the issues with reassigned categories.

The fix I chose was just to delete the alias_method_chain call since the UI fix was not desirable to me, but you probably want to fix it properly.

500 error when changing category

I'm getting the error below, when chaging an issue's category. Had version 0.0.3 installed and upgraded to 0.0.4 but still getting the error. I'm using rednine version 2.4.2 stable

Started PUT "/issues/107" for ----
Processing by IssuesController#update as HTML
Parameters: {"time_entry"=>{"comments"=>"", "activity_id"=>"", "hours"=>""}, "commit"=>"Submeter", "last_journal_id"=>"", "authenticity_token"=>"X7ecUy0wqDh7IYHyTVZwg+OBQIU0uInp/YNMxrwG5bE=", "utf8"=>"✓", "id"=>"107", "issue"=>{"start_date"=>"", "estimated_hours"=>"", "custom_field_values"=>{"6"=>"Desconhecido", "7"=>"0,0", "13"=>["Aberta", ""], "1"=>["16", ""], "17"=>"Não", "2"=>["Pessoal", ""], "3"=>"Desconhecido", "4"=>"Desconhecido", "5"=>"Desconhecido"}, "priority_id"=>"3", "parent_issue_id"=>"", "is_private"=>"1", "project_id"=>"1", "notes"=>"", "fixed_version_id"=>"", "lock_version"=>"0", "subject"=>"Teste", "assigned_to_id"=>"1", "done_ratio"=>"0", "tracker_id"=>"1", "category_id"=>"33", "due_date"=>"", "tag_list"=>"", "private_notes"=>"0", "description"=>"teste", "status_id"=>"1"}, "new_checklist"=>""}
Current user: xxx (id=1)
Rendered mailer/issue_edit.text.erb within layouts/mailer (207.9ms)
Completed 500 Internal Server Error in 832.3ms

ActionView::Template::Error (undefined method render_issue_category_with_tree_inline' for #<#<Class:0x7fa75786ac08>:0x7fa7575441a0>): 1: <%= "(#{l(:field_private_notes)}) " if @journal.private_notes? -%><%= l(:text_issue_updated, :id => "##{@issue.id}", :author => @journal.user) %> 2: 3: <% details_to_strings(@journal_details, true).each do |string| -%> 4: <%= string %> 5: <% end -%> 6: app/helpers/issues_helper.rb:306:inshow_detail'
app/helpers/issues_helper.rb:276:in details_to_strings' app/helpers/issues_helper.rb:262:ineach'
app/helpers/issues_helper.rb:262:in details_to_strings' app/views/mailer/issue_edit.text.erb:3:in_app_views_mailer_issue_edit_text_erb___1610571336_70178354365620'
app/models/mailer.rb:410:in mail' app/models/mailer.rb:409:inmail'
app/models/mailer.rb:422:in initialize' app/models/mailer.rb:445:inmethod_missing'
app/models/mailer.rb:86:in deliver_issue_edit' app/models/issue.rb:826:ineach_notification'
app/models/mailer.rb:85:in deliver_issue_edit' app/models/journal.rb:77:ineach_notification'
app/models/journal.rb:75:in each_notification' app/models/mailer.rb:84:indeliver_issue_edit'
app/models/journal.rb:54:in save' app/models/issue.rb:1511:increate_journal'
app/models/issue.rb:165:in create_or_update' app/controllers/issues_controller.rb:470:insave_issue_with_child_records'
app/controllers/issues_controller.rb:458:in save_issue_with_child_records' app/controllers/issues_controller.rb:184:inupdate'

500 error when creating a new category

I created a new category with no problems. Creating a second category throws this:

Started GET "/projects/asdfasdfasdfasdf/issue_categories/new" for 10.150.46.103 at Fri May 24 10:27:40 -0700 2013
Processing by IssueCategoriesController#new as HTML
Parameters: {"project_id"=>"testproj"}
Current user: admin (id=1)
Rendered plugins/redmine_category_tree/app/views/issue_categories/_form.html.erb (6.5ms)
Rendered issue_categories/new.html.erb within layouts/base (7.4ms)
Completed 500 Internal Server Error in 17ms

ActionView::Template::Error (comparison of Fixnum with nil failed):
3:


4:

<%= f.text_field :name, :size => 30, :required => true %>


5:

<%= f.select :assigned_to_id, principals_options_for_select(@project.assignable_users, @category.assigned_to), :include_blank => true %>


6:

<%= f.select :parent_id, issue_category_tree_options_for_select(@project.issue_categories, { :current => @category, :selected => @category.parent_id }), :label => :label_issue_category_parent_id, :include_blank => true %>


7:

app/views/issue_categories/new.html.erb:5:in _app_views_issue_categories_new_html_erb___1838691348_70358496587840' app/helpers/application_helper.rb:948:inlabelled_form_for'
app/views/issue_categories/new.html.erb:3:in _app_views_issue_categories_new_html_erb___1838691348_70358496587840' app/controllers/issue_categories_controller.rb:45:innew'

Information:
CentOS 6.4 x64
Redmine 2.3.1
redmine_category_tree current rev (today)
ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]

Anything else you need to know?

Does not work in Redmine 3.3

When category added with this plugin projects no longer render. here is the error:
Completed 500 Internal Server Error in 893ms (ActiveRecord: 70.0ms)

ActionView::Template::Error (undefined method `issue_category_tree' for #<#:0x0000000960e9c0>):
10:
11:

12:   <tbody>
13: <% issue_category_tree(@project.issue_categories) do |category, level| 

%>
14: <% unless category.new_record? %>
15: <tr class="issue_category <%= cycle 'odd', 'even' %> <%= level > 0 ? "idnt idnt-#{level}" : nil %>">
16: <%= category.name %>
plugins/redmine_category_tree/app/views/projects/settings/_issue_categories.html.erb:13:in _plugins_redmine_category_tree_app_views_projects_settings__issue_categories_html_erb__3788586393012298150_86049960' plugins/redmine_workflow_enhancements/lib/workflow_enhancements/patches/action_view_rendering.rb:53:inrender_with_workflow_enhancements'
app/views/common/_tabs.html.erb:17:in block in _app_views_common__tabs_html_erb___1729537769882111606_82665960' app/views/common/_tabs.html.erb:16:ineach'
app/views/common/_tabs.html.erb:16:in _app_views_common__tabs_html_erb___1729537769882111606_82665960' plugins/redmine_workflow_enhancements/lib/workflow_enhancements/patches/action_view_rendering.rb:53:inrender_with_workflow_enhancements'
app/helpers/application_helper.rb:325:in render_tabs' app/views/projects/settings.html.erb:3:in_app_views_projects_settings_html_erb___3781972152099544705_74015320'
lib/redmine/sudo_mode.rb:63:in `sudo_mode'

Error 500 when consulting an issue

Hi,
I have an error 500 when consulting an issue, and I don't get it when I disable redmine_category_tree

This is the information displayed in the admin panel:

Environment:
  Redmine version                          2.3.1.stable.11838
  Ruby version                             1.9.3 (x86_64-linux)
  Rails version                            3.2.13
  Environment                              production
  Database adapter                         Mysql2
Redmine plugins:
  redmine_category_tree                    0.0.1
  redmine_ckeditor                         1.0.4
  redmine_ldap_sync                        2.0.0.devel
  redmine_logs                             0.0.5
  redmine_tags                             2.0.1-dev

This is my log.

Started GET "/issues/1" for 172.17.4.10 at 2013-05-14 16:49:38 +0200
Processing by IssuesController#show as HTML
  Parameters: {"id"=>"1"}
  Current user: admin (id=1)
  Rendered issues/_action_menu.html.erb (4.3ms)
  Rendered plugins/redmine_category_tree/app/views/issues/show.html.erb within layouts/base (13.3ms)
Completed 500 Internal Server Error in 74ms

ActionView::Template::Error (undefined method `root?' for nil:NilClass):
    40:     rows.left l(:field_assigned_to), avatar(@issue.assigned_to, :size => "14").to_s.html_safe + (@issue.assigned_to ? link_to_user(@issue.assigned_to) : "-"), :class => 'assigned-to'
    41:   end
    42:   unless @issue.disabled_core_fields.include?('category_id')
    43:     rows.left l(:field_category), render_issue_category_with_tree(@issue.category), :class => 'category'
    44:   end
    45:   unless @issue.disabled_core_fields.include?('fixed_version_id')
    46:     rows.left l(:field_fixed_version), (@issue.fixed_version ? link_to_version(@issue.fixed_version) : "-"), :class => 'fixed-version'
  app/helpers/issues_helper.rb:144:in `issue_fields_rows'
  app/controllers/issues_controller.rb:119:in `block (2 levels) in show'
  app/controllers/issues_controller.rb:116:in `show'

Spanish lang

es:
label_issue_category_parent_id: "Categoria hija de"
issue_category_move_top: "Mover al inicio"
issue_category_move_up: "Arriba"
issue_category_move_down: "Abajo"
issue_category_move_bottom: "Mover al final"
issue_category_successful_move: "Categoria movida satisfactoriamente"
issue_category_not_found: "No se pudo cargar la categoria de la atividad"

PG::Error: ERROR: column "issue_categories.id" must appear in the GROUP BY clause or be used in an aggregate function

hi,

I setup the redmine instance with PostgreSQL, when i migrated to install this plugin, i got the error below:

PG::Error: ERROR:  column "issue_categories.id" must appear in the GROUP BY clause or be used in an aggregate function
LINE 1: SELECT "issue_categories".* FROM "issue_categories"  WHERE "...
               ^
: SELECT "issue_categories".* FROM "issue_categories"  WHERE "issue_categories"."parent_id" IS NULL GROUP BY project_id ORDER BY "lft"
/var/lib/gems/1.9.1/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:1161:in `async_exec'
/var/lib/gems/1.9.1/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:1161:in `exec_no_cache'
/var/lib/gems/1.9.1/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:660:in `block in exec_query'
/var/lib/gems/1.9.1/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract_adapter.rb:280:in `block in log'
/var/lib/gems/1.9.1/gems/activesupport-3.2.13/lib/active_support/notifications/instrumenter.rb:20:in `instrument'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.