Giter VIP home page Giter VIP logo

issue_charts's Introduction

ISSUE CHARTS IS DEPRECATED

issue_charts not compatible with chartkick v3 or greater. Issue_charts is deprecated until it is revised to work with chartkick v3.

Issue Charts plug-in

This plugin provides the capability to create beautiful charts and graphs for your issues using Chartkick (chartkick.com). Create issue visualizations based on standard fields as well as custom fields!

Installation

  • Clone into your plugins folder: git clone https://github.com/masweetman/issue_charts.git

  • Run bundle install

  • Run rake redmine:plugins:migrate RAILS_ENV=production

  • Restart Redmine

  • Set Chart permissions in Redmine Administration

To use groupdate

  • In config/application.rb, set the time zone to utc: config.active_record.default_timezone = :utc

  • Install time zone support: https://github.com/ankane/groupdate#for-mysql

issue_charts's People

Contributors

archonwang avatar masweetman avatar tofi86 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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

issue_charts's Issues

Error on Group Results by Create Date

I am getting error in case of subject:

Error loading chart 'test3'. undefined method `sanitize_sql_array' for # Did you mean? sanitize_for_mass_assignment.

I did the fix:

To use groupdate

In config/application.rb, set the time zone to utc: config.active_record.default_timezone = :utc

Install time zone support: https://github.com/ankane/groupdate#for-mysql

Is the gem groupdate is needed to place in plugin gemfile or RedMine gemfile?

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

"Created vs closed issues" does not work on PostgreSQL

I've created a chart in our Redmine 3.4.2 instance with the following configuration:

Name: test2
Chart type: Created vs closed issues
Public: yes
Tracker: All trackers
in the past: 30 days

When I try to view this chard, I only get a red box with a database exception in it. The full error message from the PostgreSQL log:

2017-07-21 11:28:59 CEST [17412-7] redmine@redmine_staging ERROR:  operator does not exist: timestamp without time zone > integer at character 316
2017-07-21 11:28:59 CEST [17412-8] redmine@redmine_staging HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.
2017-07-21 11:28:59 CEST [17412-9] redmine@redmine_staging STATEMENT:  SELECT "issues".* FROM "issues" WHERE (issues.project_id IN (72,81,87,14,83,6,19,5,74,3,60,43,44,27,42,29,61,40,66,80,30,25,34,41,45,67,46,54,22,39,38,53,59,64,58,51,31,21,26,49,37,52,48,47,24,56,55,50,32,63,33,28,57,36,70,35,68,7,8,9,69,75,20,82,88,4,84,86,85) AND issues.created_on > '2017-06-21') AND (closed_on > 0)  ORDER BY "issues"."closed_on" ASC

Maybe you want to use closed_on IS NOT NULL instead of closed_on > 0?

3.2.3 can not install new2.0

Hi
I use redmine 3.2.3
and redmine's ruby version is 2.1.0
When I input cmd : bundle install , it errors
groupdate needs ruby >= 2.2 , but my ruby is 2.1.0
How to solve it ?
Thanks

Spent time

I'd like to make charts that shows e.g. spent time per issue type.
We use the time logging feature of Redmine extensively, but miss the possibility to use it for something good.
Thanks
Roger

Chart avaiable only in administrator users

Hi,
I'm using the plugging in redmine 3.4.1 and in this version the chart tab is available only when the user has administrator privileges. I would like to know if there is a set up to turn off this restriction.

Improve Readme

Hello,
The readme is perfect for the installation, but I think it needs examples to see chat we can do and how we can do it.
Is it possible to add some line codes and images?
Thanks :)

localization

please add proper i18n support.
I can provide german translations.

cheers,
tobias

Error loading chart 'test'.undefined method 'pie_chart' for #<#:0x007f672b7df778>

Hi @masweetman,

I just install the plugin and try to do it,but got error message "Error loading chart 'test'.undefined method 'pie_chart' for #<#:0x007f672b7df778>",could you give me a favor,thanks in advanced.

Here is the production.log,
Started GET "/redmine/charts/1" for 127.0.0.1 at 2018-03-06 17:35:46 +0800
Processing by ChartsController#show as HTML
Parameters: {"id"=>"1"}
Current user: admin (id=1)
Rendered plugins/issue_charts/app/views/charts/_chart_menu.html.erb (0.4ms)
Rendered plugins/issue_charts/app/views/charts/show.html.erb within layouts/base (62.8ms)
Completed 200 OK in 124ms (Views: 70.3ms | ActiveRecord: 50.5ms)
Started GET "/redmine/javascripts/chartkick.js" for 127.0.0.1 at 2018-03-06 17:35:46 +0800

ActionController::RoutingError (No route matches [GET] "/javascripts/chartkick.js"):
vendor/bundle/ruby/2.1.0/gems/actionpack-4.2.5.2/lib/action_dispatch/middleware/debug_exceptions.rb:21:in call' vendor/bundle/ruby/2.1.0/gems/actionpack-4.2.5.2/lib/action_dispatch/middleware/show_exceptions.rb:30:in call'
vendor/bundle/ruby/2.1.0/gems/railties-4.2.5.2/lib/rails/rack/logger.rb:38:in call_app' vendor/bundle/ruby/2.1.0/gems/railties-4.2.5.2/lib/rails/rack/logger.rb:20:in block in call'
vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.5.2/lib/active_support/tagged_logging.rb:68:in block in tagged' vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.5.2/lib/active_support/tagged_logging.rb:26:in tagged'
vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.5.2/lib/active_support/tagged_logging.rb:68:in tagged' vendor/bundle/ruby/2.1.0/gems/railties-4.2.5.2/lib/rails/rack/logger.rb:20:in call'
vendor/bundle/ruby/2.1.0/gems/actionpack-4.2.5.2/lib/action_dispatch/middleware/request_id.rb:21:in call' vendor/bundle/ruby/2.1.0/gems/rack-1.6.4/lib/rack/methodoverride.rb:22:in call'
vendor/bundle/ruby/2.1.0/gems/rack-1.6.4/lib/rack/runtime.rb:18:in call' vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.5.2/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in call'
vendor/bundle/ruby/2.1.0/gems/actionpack-4.2.5.2/lib/action_dispatch/middleware/static.rb:116:in call' vendor/bundle/ruby/2.1.0/gems/rack-1.6.4/lib/rack/sendfile.rb:113:in call'
vendor/bundle/ruby/2.1.0/gems/railties-4.2.5.2/lib/rails/engine.rb:518:in call' vendor/bundle/ruby/2.1.0/gems/railties-4.2.5.2/lib/rails/application.rb:165:in call'
vendor/bundle/ruby/2.1.0/gems/railties-4.2.5.2/lib/rails/railtie.rb:194:in public_send' vendor/bundle/ruby/2.1.0/gems/railties-4.2.5.2/lib/rails/railtie.rb:194:in method_missing'
vendor/bundle/ruby/2.1.0/gems/rack-1.6.4/lib/rack/urlmap.rb:66:in block in call' vendor/bundle/ruby/2.1.0/gems/rack-1.6.4/lib/rack/urlmap.rb:50:in each'
vendor/bundle/ruby/2.1.0/gems/rack-1.6.4/lib/rack/urlmap.rb:50:in call' passenger (5.0.6) lib/phusion_passenger/rack/thread_handler_extension.rb:85:in process_request'
passenger (5.0.6) lib/phusion_passenger/request_handler/thread_handler.rb:149:in accept_and_process_next_request' passenger (5.0.6) lib/phusion_passenger/request_handler/thread_handler.rb:110:in main_loop'
passenger (5.0.6) lib/phusion_passenger/request_handler.rb:414:in block (3 levels) in start_threads' passenger (5.0.6) lib/phusion_passenger/utils.rb:111:in block in create_thread_and_abort_on_exception'

Started GET "/redmine/javascripts/chartkick.js" for 127.0.0.1 at 2018-03-06 17:35:46 +0800

ActionController::RoutingError (No route matches [GET] "/javascripts/chartkick.js"):
vendor/bundle/ruby/2.1.0/gems/actionpack-4.2.5.2/lib/action_dispatch/middleware/debug_exceptions.rb:21:in call' vendor/bundle/ruby/2.1.0/gems/actionpack-4.2.5.2/lib/action_dispatch/middleware/show_exceptions.rb:30:in call'
vendor/bundle/ruby/2.1.0/gems/railties-4.2.5.2/lib/rails/rack/logger.rb:38:in call_app' vendor/bundle/ruby/2.1.0/gems/railties-4.2.5.2/lib/rails/rack/logger.rb:20:in block in call'
vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.5.2/lib/active_support/tagged_logging.rb:68:in block in tagged' vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.5.2/lib/active_support/tagged_logging.rb:26:in tagged'
vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.5.2/lib/active_support/tagged_logging.rb:68:in tagged' vendor/bundle/ruby/2.1.0/gems/railties-4.2.5.2/lib/rails/rack/logger.rb:20:in call'
vendor/bundle/ruby/2.1.0/gems/actionpack-4.2.5.2/lib/action_dispatch/middleware/request_id.rb:21:in call' vendor/bundle/ruby/2.1.0/gems/rack-1.6.4/lib/rack/methodoverride.rb:22:in call'
vendor/bundle/ruby/2.1.0/gems/rack-1.6.4/lib/rack/runtime.rb:18:in call' vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.5.2/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in call'
vendor/bundle/ruby/2.1.0/gems/actionpack-4.2.5.2/lib/action_dispatch/middleware/static.rb:116:in call' vendor/bundle/ruby/2.1.0/gems/rack-1.6.4/lib/rack/sendfile.rb:113:in call'
vendor/bundle/ruby/2.1.0/gems/railties-4.2.5.2/lib/rails/engine.rb:518:in call' vendor/bundle/ruby/2.1.0/gems/railties-4.2.5.2/lib/rails/application.rb:165:in call'
vendor/bundle/ruby/2.1.0/gems/railties-4.2.5.2/lib/rails/railtie.rb:194:in public_send' vendor/bundle/ruby/2.1.0/gems/railties-4.2.5.2/lib/rails/railtie.rb:194:in method_missing'
vendor/bundle/ruby/2.1.0/gems/rack-1.6.4/lib/rack/urlmap.rb:66:in block in call' vendor/bundle/ruby/2.1.0/gems/rack-1.6.4/lib/rack/urlmap.rb:50:in each'
vendor/bundle/ruby/2.1.0/gems/rack-1.6.4/lib/rack/urlmap.rb:50:in call' passenger (5.0.6) lib/phusion_passenger/rack/thread_handler_extension.rb:85:in process_request'
passenger (5.0.6) lib/phusion_passenger/request_handler/thread_handler.rb:149:in accept_and_process_next_request' passenger (5.0.6) lib/phusion_passenger/request_handler/thread_handler.rb:110:in main_loop'
passenger (5.0.6) lib/phusion_passenger/request_handler.rb:414:in block (3 levels) in start_threads' passenger (5.0.6) lib/phusion_passenger/utils.rb:111:in block in create_thread_and_abort_on_exception'

Grouping Results by Custom Field with multiple values ends with Error 500

Hello, I have noticed that while creating any chart type while grouping results by my custom created field with multiple values always ends with error 500. The chart is still shown in the general chart page but the specific chart can not be opened. The /edit link works so you can still edit the chart and possibly remove it.

Found on version 3.3.0

How to reproduce:

  1. Create Custom Field - List - Multiple Values - Checkboxes
  2. Create some issues with the Custom Field and select multiple values
  3. Create a chart with the Custom Field

Compatibility Redmine 3.4.x

Hi,

Today, the plugin is only compatible with Redmine 3.3.x and 3.2.x.
Is it planned to be compatible for Redmine 3.4.x?

I tried to install the latest version on 3.4.6 but I'm getting 500 errors.

Thanks,

Maxime

Support for 3.3.0

Hi,

I just tried adding this plugin to my 3.3.0 project, and it seems to be working fine. However, I did notice that after installing the plugin, in the Activity tab, on the right side menu there's an error that reads:

translation missing: en.label_show_user_activity

Thoughts?

Issue chart cannot work

An error occurred on the page when I click the "Issue chart" .

Error log:
App 606513 stderr: Started GET "/projects/equipment-delivory/charts" for 183.194.130.54 at 2023-10-07 03:47:11 +0800
App 606513 stderr: Processing by ChartsController#index as HTML
App 606513 stderr: Parameters: {"project_id"=>"equipment-delivory"}
App 606513 stderr: Current user: admin (id=1)
App 606513 stderr: Completed 500 Internal Server Error in 13ms (ActiveRecord: 9.3ms)
App 606513 stderr:
App 606513 stderr: ActiveRecord::StatementInvalid (Mysql2::Error: Table 'redmine.charts' doesn't exist: SHOW FULL FIELDS FROM charts):
App 606513 stderr:
App 606513 stderr: plugins/issue_charts/app/controllers/charts_controller.rb:11:in index' App 606513 stderr: lib/redmine/sudo_mode.rb:61:in sudo_mode'

How to use Chart.js / Highchart.js as charting library

Hi,

Just hit the same issue #32, not sure whether caused by the default charting library uses
<%= javascript_include_tag "//www.google.com/jsapi", "chartkick" %> ,
and unfortunately we can't connect to google.com/jsapi, so no charts would display.

Is there a guide about how we can download the offline chart libs ( Chart.js or highchart.js ) and set one of them for the plugin to use ?

Thank you ~

French translation

Hi,
First, the pludin is great, second can you add the french translation file in your next release.
thank you
french.zip

Note : this is zip of a tar+gzip archive :)

Error Throwing while loading Chart

Hi,

I had installed Charts Plugin in Redmine 3.2 Version and Plugin was installing without any error. But when in Create a new chart and try to open the chart it is throwing an error as given below.

Error loading chart 'Sample Chart'. undefined method `column_chart' for #<#:0x007f02a68b8b70>

Kindly advise.

Thanks in Advance,
Dileep

add 3.2 support on redmine plugin page

I'm using the plugin with redmine 3.2 and it work's without any flaws. You can safely add "3.2" compatibility on the redmine plugin page.

Great plugin, thanks! 👍

latest chartkick breaks issue_charts

it seem like there is a breaking change in v3 of chartkick https://github.com/ankane/chartkick#google-charts which means that if latest gem is included in redmine, then an error such as

Processing by ChartsController#index as HTML
  Parameters: {"project_id"=>"emerlin"}
  Current user: mbnsspah (id=3)
  Rendered plugins/issue_charts/app/views/charts/index.html.erb within layouts/base (4.4ms)
Completed 500 Internal Server Error in 17ms (ActiveRecord: 3.4ms)
ActionView::Template::Error (Asset was not declared to be precompiled in production.
Add `Rails.application.config.assets.precompile += %w( chartkick.js )` to `config/initializers/assets.rb` and restart your server):
    1: <%= javascript_include_tag 'https://www.google.com/jsapi', 'chartkick' %>
    2: 
    3: <%= render :partial => 'action_menu' %>
    4: 
  config/initializers/10-patches.rb:221:in `rails_asset_id'
  config/initializers/10-patches.rb:200:in `asset_path_with_asset_id'
  app/helpers/application_helper.rb:1398:in `javascript_include_tag'
  plugins/issue_charts/app/views/charts/index.html.erb:1:in `_plugins_issue_charts_app_views_charts_index_html_erb___2291611321605776608_33140460'
  lib/redmine/sudo_mode.rb:63:in `sudo_mode'

is produced.

Doing as suggested does not work as the asset is within the gem and does not seem to be automatically included.

Poor perfomance

Hi,

Since I have installed the new version of the plugin, the performance is poor compared with the previous one...

When you execute the query for drawing the chart, it hangs for a while...

Tks!!

Error "area_chart"

Hello,
I've installed the plugin correctly, but when I add a new Chart a get this error:

Error loading chart 'a'. undefined method `area_chart' for #<#:0x007f0495685b78>

Problem translate menu item and Error 404

Hi

After deploy the plugin on redmine (v3.3.2), I've got this error on item menu :

image

when I click on the link, i've got "404 error" :
image

Thanks in advance for your help.

Regards,

SQLite3::SQLException: no such column

Hi,
i just tried out the plugin but run into an error which i'm not able to resolve on my own.
I'm running redmine 3.3.2.stable. I followed the install instructions on the github page and checked if chartkick is installed (using chartkick 2.2.2). However, when i enable the module on my project and click the charts menu entry I get an internal error. From the production.log I get the following output:

Processing by ChartsController#index as HTML
  Parameters: {"project_id"=>"xxx"}
  Current user: xxx (id=4)
  Rendered plugins/issue_charts/app/views/charts/_action_menu.html.erb (0.4ms)
  Rendered plugins/issue_charts/app/views/charts/index.html.erb within layouts/base (3.4ms)
Completed 500 Internal Server Error in 11ms (ActiveRecord: 2.9ms)

ActionView::Template::Error (SQLite3::SQLException: no such column: false: SELECT "charts".* FROM "charts" WHERE (project_id = 2 AND user_id = 4 AND is_public = false)  ORDER BY "charts"."name" ASC):
     5: <h2><%= l(:label_my_charts) %></h2>
     6: 
     7:   <div class="splitcontent" style="overflow:hidden;">
     8:     <% @my_charts.each do |chart| %>
     9:       <div class="<%= cycle("splitcontentleft", "splitcontentright") %>">
    10:         <h3><%= link_to chart.name, chart_path(chart) %></h3>
    11:         <%= Tracker.find(chart.tracker_id).name + ' ' + l(:label_issue_plural).downcase if chart.tracker_id > 0 %>
  plugins/issue_charts/app/views/charts/index.html.erb:8:in `_plugins_issue_charts_app_views_charts_index_html_erb__3499231962573528611_70041700'
  lib/redmine/sudo_mode.rb:63:in `sudo_mode'

It seems something went wrong with SQLite. Is there any way to resolve that issue?

kind regards
johnny

Order of statuses

It would be more logical if order of Statuses in chart will be according workflow.

Export data in pdf

Hello,

The plug-in is great but I'm wondering if it is possible to create a button to export data in PDF format?

Thanks for your help.

Best regards.

Error loading

Error loading chart 'Grafik'. undefined method `line_chart' for #<#:0x49c6dd0>

Issues from child projects

Hi, thanks for a great plugin!

However, our Redmine is setup mainly with project hierarchy, and it seems that issue_charts don't care about issues from child projects.
Is it possible to add an option when creating a chart wether to include issues from child projects or not?

Thanks!
Roger

User log time.

Hi,

I would like to make graphs with user log time,and multi users can be selected,just like as below,
user_logtime

Ideal charting workflow

It looks like that you could reuse a lot of code and make much more universal charting plugin if you could use a kind of similar features / workflow plan:

  • All charts are based on Redmine issue saved filters / queries and therefore inherits their permissions. It could be used latter when deciding / coding UI of chart menus & views,
  • A chart could have definitions for x and y axis depending on chart type,
  • A chart could have one or more series that could be defined on table data of saved filter, by defining grouping field and summary field. Check box if using running sum, for incremental charts.
  • There are available date/time grouping by days, months, quarters may be years.

I guess that this approach could let create almost any imaginable chart, by using issues and spent time data.

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.