Problem with redmine-charts plugin (with trunk)

Added by Stefan Verstege over 8 years ago

When i want to look at the charts/burndown graph i see the following error in the log:

ActiveRecord::StatementInvalid (Mysql::Error: Every derived table must have its own alias: select sum(journal_details.value*issues.estimated_hours)/sum(issues.estimated_hours) as ratio_done from (select max(journal_details.id) as journal_details_id, journals.journalized_id as issue_id from issues left join journals on journals.journalized_id = issues.id and journals.journalized_type ='Issue' left join journal_details on journals.id = journal_details.journal_id and journal_details.prop_key = 'done_ratio' where issues.project_id in (7) and (journals.id is null or journals.created_on <= '2009-03-07 23:59:59') group by issues.id) left join issues on issues.id = issue_id left join journal_details on journal_details.id = journal_details_id):

All other charts are working fine!

Using the trunk from the plugin and the trunk from redmine.

Can anyone help me out here?

Thnx

Replies (30)

RE: Problem with redmine-charts plugin (with trunk) - Added by Konrad Madej about 8 years ago

It seems that there is yet another bug in the code. I've already reported issue on github with proposed solution: http://github.com/mszczytowski/redmine_charts/issues#issue/19

Regards,
Konrad

RE: Problem with redmine-charts plugin (with trunk) - Added by YongSeop Lim over 7 years ago

David Kruger wrote:

Dave Land wrote:

I installed the plugins and configurated in the project, and I could view the chart from the project menu, this is the default burndown chart. But I have no project_id in the url when I click any link in the chart pages, and got a 404 error. I do some hack in the "app/helpers/charts_helper.rb"

res << separator << link_to(link_name, :controller => controller_name)

changed to :

res << separator << link_to(link_name, :controller => controller_name, :project_id => @project)

So it is right in the chart menu, but I still got 404 error in other links. Anyone got this error, and how to fix it?

Dave Land

This seemed to work for me with redmine 0.8.5 and version e9a3ba33dfc40878d07ede4ece5eeb211b7c8149 of redmine_charts. I am not a ruby programmer so I am not sure how correct this is.

[...]

I guess 'redmine_charts/routes.rb' file has problem. Source codes in the file are not invoked when redmine is being started after upgrading redmine 0.9.0.
I fixed this problem by adding below codes in 'init.rb'

require 'application_controller'

ActionController::Routing::Routes.draw do |map|
  RedmineCharts::Utils.controllers_for_routing do |name, controller|
    map.connect "projects/:project_id/charts/#{name}/:action", :controller => controller
  end
end

RE: Problem with redmine-charts plugin (with trunk) - Added by Terence Mill almost 7 years ago

Using:
  • Redmine. 1.0.2
  • MySQL5
  • ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux]

I have installed Openflash using :

1. script/plugin install http://svn.pullmonkey.com/plugins/trunk/open_flash_chart/
2. Move the open_flash_chart.swf file into your RAILS_ROOT/public directory
3. Move the swfobject.js file into your RAILS_ROOT/public/javascripts directory
4. downloaded redmine_charts plugin from here to to {redmine_root}/vendor/plugins/redmine_charts folder
5.Then execute "rake db:migrate_plugins RAILS_ENV=production --trace".

And get this error message:

sid-repo:/redmine# rake db:migrate_plugins RAILS_ENV=production --trace
(in /usr/local/lib/redmine-trunk)
** Invoke db:migrate_plugins (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
uninitialized constant OpenFlashChart::Base
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/depende                                                             ncies.rb:440:in `load_missing_constant'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/depende                                                             ncies.rb:80:in `const_missing'
/usr/local/lib/redmine-trunk/vendor/plugins/redmine_charts/lib/redmine_charts/st                                                             ack_data_converter.rb:56
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original                                                             _require'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/depende                                                             ncies.rb:158:in `require'
/usr/local/lib/redmine-trunk/vendor/plugins/redmine_charts/lib/redmine_charts.rb                                                             :3
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original                                                             _require'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/depende                                                             ncies.rb:158:in `require'
/usr/local/lib/redmine-trunk/vendor/plugins/redmine_charts/init.rb:6:in `evaluat                                                             e_init_rb'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin.rb:158:in `evalua                                                             te_init_rb'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/core_ex                                                             t/kernel/reporting.rb:11:in `silence_warnings'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin.rb:154:in `evalua                                                             te_init_rb'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin.rb:48:in `load'
/usr/local/lib/redmine-trunk/config/../vendor/plugins/engines/lib/engines/plugin                                                             .rb:44:in `load'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin/loader.rb:38:in `                                                             load_plugins'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin/loader.rb:37:in `                                                             each'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin/loader.rb:37:in `                                                             load_plugins'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:369:in `load_pl                                                             ugins'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:165:in `process                                                             '
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in `send'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in `run'
/usr/local/lib/redmine-trunk/config/environment.rb:20
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original                                                             _require'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/depende                                                             ncies.rb:156:in `require'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/depende                                                             ncies.rb:521:in `new_constants_in'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/depende                                                             ncies.rb:156:in `require'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/tasks/misc.rake:4
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_cal                                                             l_chain'
/usr/local/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_cal                                                             l_chain'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:in `invoke_prerequi                                                             sites'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequi                                                             sites'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in `invoke_with_cal                                                             l_chain'
/usr/local/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_cal                                                             l_chain'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_excep                                                             tion_handling'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_excep                                                             tion_handling'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
/usr/local/bin/rake:19:in `load'
/usr/local/bin/rake:19

Please help!

1 2 (26-30/30)