Git Product home page Git Product logo

redmine_workload's People

Contributors

abirba avatar braini75 avatar codeinsider avatar corvus-ch avatar davividal avatar digarcia avatar ianbogda avatar jostbaron avatar liaham avatar mboremski avatar pydubreucq avatar rumega avatar sbrisko avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

redmine_workload's Issues

Nil error in WorkloadsHelper#load_class_for_hours

comparison of Float with nil failed


Hey @mboremski
log de wl
pagina  wl

My user has all the options enabled in his profile but he does not open the page, he sends screens and my version of Redmine

Environment:
Redmine version 4.2.5.stable
Ruby version 2.7.6-p219 (2022-04-12) [x86_64-linux]
Rails version 5.2.6.3
Environment production
Database adapter Mysql2
Mailer queue ActiveJob::QueueAdapters::AsyncAdapter
Mailer delivery smtp
SCM:
Subversion 1.14.1
Mercurial 5.6.1
Bazaar 3.1.0
Git 2.30.2
Filesystem
Redmine plugins:
microsoft_project_connector 1.0.7
redmine_dashboard 2.12.0
redmine_indicator 0.2.16
redmine_issue_evm 4.6.0
redmine_monitoring_controlling 0.1.1
redmine_reports 0.0.1
redmine_risks 1.4.1
redmine_team_resource 0.4.3
redmine_workload 2.0.1
remove_top_menu_help 0.0.1
scrum 0.20.0
time_logger 0.5.4

Originally posted by @kevinguiro in #11 (comment)

Estimated time of task is not used if subtask(s) present

This behaviour has just been found:
If we have a task with one subtask.
Both, task an d subtask, having Estimated time.
Only estimated time of the subtask is used for workload-calculations.

This unfortunately in our case leads to some heavy blind-spots since users sometimes only planning one subtask.

grafik

grafik

Using Postgres: table wl_national_holidays cannot be used: column END is a reserved keyword

Hi team,
I'm using postgres as database.
I cannot usse the workload plugin, because the table wl_national_holidays is using the column name END. This is a resreved keyword in Postgres and produces an error:

ActiveRecord::StatementInvalid (PG::SyntaxError: ERROR: syntax error at or near "end"
LINE 1: ...tional_holidays" WHERE (start <= '2022-12-26' AND end >= '20...
^
: SELECT 1 AS one FROM "wl_national_holidays" WHERE (start <= '2022-12-26' AND end >= '2022-12-26') LIMIT $1):

Could you please fix this?
Cheers.
Steffen

Como Administrador

Como administrador de la herramienta no me carga todos los usuarios para ver sus actividades o tengo que hacer algo mas en la configuracion

Reorder user list

Users are ordered by their lastname by default.

If possible without much effort they should be ordered by the name they are displayed in the system.

Date in past for "until" leads to "undefined method"

Value in the past:
grafik

leads to:

Started GET "/workloads?utf8=%E2%9C%93&workload%5Bfirst_day%5D=2022-08-22&workload%5Blast_day%5D=2022-03-31&workload%5Bstart_date%5D=2022-09-01&workload%5Bgroups%5D%5B%5D=75" for 10.10.92.21 at 2022-09-01 16:14:41 +0200
Processing by WorkloadsController#index as HTML
  Parameters: {"utf8"=>"✓", "workload"=>{"first_day"=>"2022-08-22", "last_day"=>"2022-03-31", "start_date"=>"2022-09-01", "groups"=>["75"]}}
  Current user: boremski (id=10)
Completed 500 Internal Server Error in 204ms (ActiveRecord: 11.1ms)
  
NoMethodError (undefined method `[]' for nil:NilClass):
  
plugins/redmine_workload/app/models/user_workload.rb:105:in `block (2 levels) in hours_per_user_issue_and_day'
plugins/redmine_workload/app/models/user_workload.rb:95:in `each'
plugins/redmine_workload/app/models/user_workload.rb:95:in `block in hours_per_user_issue_and_day'
plugins/redmine_workload/app/models/user_workload.rb:65:in `each'
plugins/redmine_workload/app/models/user_workload.rb:65:in `hours_per_user_issue_and_day'
plugins/redmine_workload/app/controllers/workloads_controller.rb:42:in `index'
lib/redmine/sudo_mode.rb:61:in `sudo_mode'

redmine 5.0

Will collect issues here that need to be adressed to make this plugin ready for usage in redmine 5.x

undefined method 'id' for 29:Integer

User with ID 29 seem to lead to an Error for unknown reason:

Started GET "/workloads?utf8=%E2%9C%93&workload%5Bfirst_day%5D=2022-06-11&workload%5Blast_day%5D=2022-08-10&workload%5Bstart_date%5D=2022-06-21&workload%5Bgroups%5D%5B%5D=7" for xxx.xxx.xxx.xxx at 2022-06-21 15:46:48 +0200
Processing by WorkloadsController#index as HTML
  Parameters: {"utf8"=>"✓", "workload"=>{"first_day"=>"2022-06-11", "last_day"=>"2022-08-10", "start_date"=>"2022-06-21", "groups"=>["7"]}}
  Current user: boremski (id=10)
Completed 500 Internal Server Error in 341ms (ActiveRecord: 14.1ms)
  
NoMethodError (undefined method `id' for 29:Integer
Did you mean?  i):
  
plugins/redmine_workload/lib/redmine_workload/wl_date_tools.rb:58:in `working_days_in_time_span'
plugins/redmine_workload/app/models/group_workload.rb:75:in `total_availabilities_of'
plugins/redmine_workload/app/models/group_workload.rb:69:in `block in user_workload_with_availabilities'
plugins/redmine_workload/app/models/group_workload.rb:68:in `each'
plugins/redmine_workload/app/models/group_workload.rb:68:in `user_workload_with_availabilities'
plugins/redmine_workload/app/models/group_workload.rb:59:in `sorted_user_workload'
plugins/redmine_workload/app/models/group_workload.rb:50:in `block in define_group_members'
plugins/redmine_workload/app/models/group_workload.rb:49:in `each'
plugins/redmine_workload/app/models/group_workload.rb:49:in `each_with_object'
plugins/redmine_workload/app/models/group_workload.rb:49:in `define_group_members'
plugins/redmine_workload/app/models/group_workload.rb:20:in `initialize'
plugins/redmine_workload/app/controllers/workloads_controller.rb:44:in `new'
plugins/redmine_workload/app/controllers/workloads_controller.rb:44:in `index'
lib/redmine/sudo_mode.rb:61:in `sudo_mode'

option to calculate the workload by days

Hi,
The tasks in our redmine project management does not calculate the workload in hours, but in days, so this “estimated time field” is not used(hidden) in all trackers, and makes this plugin unusable.

Is it possible to have an option to calculate the workload by days?

Fix some cameCase rubocop offenses

There are some rubocop defenses w.r.t. to Ruby's naming conventions:

# Offense count: 3
# Configuration parameters: EnforcedStyle, AllowedPatterns, IgnoredPatterns.
# SupportedStyles: snake_case, camelCase
Naming/MethodName:
  Exclude:
    - 'app/controllers/workloads_controller.rb'
    - 'app/models/wl_national_holiday.rb'
    - 'app/models/wl_user_vacation.rb'

# Offense count: 4
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
# AllowedNames: at, by, db, id, in, io, ip, of, on, os, pp, to
Naming/MethodParameterName:
  Exclude:
    - 'app/helpers/workload_filters_helper.rb'

# Offense count: 8
# Configuration parameters: EnforcedStyle, AllowedIdentifiers.
# SupportedStyles: snake_case, camelCase
Naming/VariableName:
  Exclude:
    - 'app/helpers/workload_filters_helper.rb'

They could be easily changed independent of the individual coding skills.

support download via api-call

We have the possibility to download a file that contains the data ob the table.
It would be handy if we could use api-calls to download this file while providing an apikey.

Change toggle

The current toggle is a unicode character. In dependence of the browser it will displayed very different (see https://www.fileformat.info/info/unicode/char/25b6/index.htm).

If possible there should be found another pair of characters to be used as toggle.

Alternative:

grafik
grafik

These symbols are already in use. You can find them along with the filter and options above projects and issues.

[Redmine 5.0.x]: LoadError: cannot load such file -- redmine_workload

Installing this plugin in redmine 5.0 leads to LoadError: cannot load such file -- redmine_workload

Enviroment

Environment:
  Redmine version                5.0.1.stable.21623
  Ruby version                   3.0.0-p0 (2020-12-25) [x86_64-linux]
  Rails version                  6.1.6
  Environment                    production
  Database adapter               Mysql2
  Mailer queue                   ActiveJob::QueueAdapters::AsyncAdapter
  Mailer delivery                smtp
Redmine settings:
  Redmine theme                  Purplemine2 (includes JavaScript)
SCM:
  Subversion                     1.10.4
  Git                            2.20.1
  Filesystem                     
Redmine plugins:
  no plugin installed

Full cmd-log

run bundle exec rake redmine:plugins:migrate RAILS_ENV=production leads to

rake aborted!
LoadError: cannot load such file -- redmine_workload
/usr/local/rvm/gems/ruby-3.0.0/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:35:in `require'
/usr/local/rvm/gems/ruby-3.0.0/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:35:in `require'
/usr/local/rvm/gems/ruby-3.0.0/gems/activesupport-6.1.6/lib/active_support/dependencies/zeitwerk_integration.rb:51:in `require_dependency'
/opt/redmine-5.0/plugins/redmine_workload/init.rb:4:in `<top (required)>'
/opt/redmine-5.0/lib/redmine/plugin_loader.rb:31:in `load'
/opt/redmine-5.0/lib/redmine/plugin_loader.rb:31:in `run_initializer'
/opt/redmine-5.0/lib/redmine/plugin_loader.rb:108:in `each'
/opt/redmine-5.0/lib/redmine/plugin_loader.rb:108:in `block in load'
/usr/local/rvm/gems/ruby-3.0.0/gems/activesupport-6.1.6/lib/active_support/callbacks.rb:427:in `instance_exec'
/usr/local/rvm/gems/ruby-3.0.0/gems/activesupport-6.1.6/lib/active_support/callbacks.rb:427:in `block in make_lambda'
/usr/local/rvm/gems/ruby-3.0.0/gems/activesupport-6.1.6/lib/active_support/callbacks.rb:198:in `block (2 levels) in halting'
/usr/local/rvm/gems/ruby-3.0.0/gems/activesupport-6.1.6/lib/active_support/callbacks.rb:604:in `block (2 levels) in default_terminator'
/usr/local/rvm/gems/ruby-3.0.0/gems/activesupport-6.1.6/lib/active_support/callbacks.rb:603:in `catch'
/usr/local/rvm/gems/ruby-3.0.0/gems/activesupport-6.1.6/lib/active_support/callbacks.rb:603:in `block in default_terminator'
/usr/local/rvm/gems/ruby-3.0.0/gems/activesupport-6.1.6/lib/active_support/callbacks.rb:199:in `block in halting'
/usr/local/rvm/gems/ruby-3.0.0/gems/activesupport-6.1.6/lib/active_support/callbacks.rb:512:in `block in invoke_before'
/usr/local/rvm/gems/ruby-3.0.0/gems/activesupport-6.1.6/lib/active_support/callbacks.rb:512:in `each'
/usr/local/rvm/gems/ruby-3.0.0/gems/activesupport-6.1.6/lib/active_support/callbacks.rb:512:in `invoke_before'
/usr/local/rvm/gems/ruby-3.0.0/gems/activesupport-6.1.6/lib/active_support/callbacks.rb:105:in `run_callbacks'
/usr/local/rvm/gems/ruby-3.0.0/gems/activesupport-6.1.6/lib/active_support/reloader.rb:88:in `prepare!'
/usr/local/rvm/gems/ruby-3.0.0/gems/railties-6.1.6/lib/rails/application/finisher.rb:124:in `block in <module:Finisher>'
/usr/local/rvm/gems/ruby-3.0.0/gems/railties-6.1.6/lib/rails/initializable.rb:32:in `instance_exec'
/usr/local/rvm/gems/ruby-3.0.0/gems/railties-6.1.6/lib/rails/initializable.rb:32:in `run'
/usr/local/rvm/gems/ruby-3.0.0/gems/railties-6.1.6/lib/rails/initializable.rb:61:in `block in run_initializers'
/usr/local/rvm/gems/ruby-3.0.0/gems/railties-6.1.6/lib/rails/initializable.rb:60:in `run_initializers'
/usr/local/rvm/gems/ruby-3.0.0/gems/railties-6.1.6/lib/rails/application.rb:391:in `initialize!'
/opt/redmine-5.0/config/environment.rb:16:in `<top (required)>'
/usr/local/rvm/gems/ruby-3.0.0/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:35:in `require'
/usr/local/rvm/gems/ruby-3.0.0/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:35:in `require'
/usr/local/rvm/gems/ruby-3.0.0/gems/activesupport-6.1.6/lib/active_support/dependencies.rb:332:in `block in require'
/usr/local/rvm/gems/ruby-3.0.0/gems/activesupport-6.1.6/lib/active_support/dependencies.rb:299:in `load_dependency'
/usr/local/rvm/gems/ruby-3.0.0/gems/activesupport-6.1.6/lib/active_support/dependencies.rb:332:in `require'
/usr/local/rvm/gems/ruby-3.0.0/gems/railties-6.1.6/lib/rails/application.rb:367:in `require_environment!'
/usr/local/rvm/gems/ruby-3.0.0/gems/railties-6.1.6/lib/rails/application.rb:533:in `block in run_tasks_blocks'
/usr/local/rvm/gems/ruby-3.0.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/usr/local/rvm/gems/ruby-3.0.0/bin/ruby_executable_hooks:22:in `eval'
/usr/local/rvm/gems/ruby-3.0.0/bin/ruby_executable_hooks:22:in `<main>'
Tasks: TOP => redmine:plugins:migrate => environment
(See full trace by running task with --trace)

500 Error when loading Workloads main page

Started GET "/workloads" for 192.168.206.13 at 2022-09-21 10:11:21 +0300
Processing by WorkloadsController#index as HTML
  Current user: andrei.ifrim (id=90)
Completed 500 Internal Server Error in 114ms (ActiveRecord: 21.1ms)

ActiveRecord::StatementInvalid (PG::SyntaxError: ERROR:  syntax error at or near "end"
LINE 1: ...tional_holidays" WHERE (start <= '2022-09-11' AND end >= '20...
                                                             ^
: SELECT  1 AS one FROM "wl_national_holidays" WHERE (start <= '2022-09-11' AND end >= '2022-09-11') LIMIT $1):

plugins/redmine_workload/lib/redmine_workload/wl_date_tools.rb:79:in `holiday?'
plugins/redmine_workload/lib/redmine_workload/wl_date_tools.rb:63:in `block (2 levels) in working_days_in_time_span'
plugins/redmine_workload/lib/redmine_workload/wl_date_tools.rb:61:in `block in working_days_in_time_span'
plugins/redmine_workload/lib/redmine_workload/wl_date_tools.rb:58:in `working_days_in_time_span'
plugins/redmine_workload/app/models/user_workload.rb:358:in `working_days_in_time_span'
plugins/redmine_workload/app/models/user_workload.rb:66:in `block in hours_per_user_issue_and_day'
plugins/redmine_workload/app/models/user_workload.rb:65:in `each'
plugins/redmine_workload/app/models/user_workload.rb:65:in `hours_per_user_issue_and_day'
plugins/redmine_workload/app/controllers/workloads_controller.rb:42:in `index'
lib/redmine/sudo_mode.rb:61:in `sudo_mode'

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.