The rest of WlDateTools patches.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -215,6 +215,17 @@
|
|||||||
@workload_data = user_workload.hours_per_user_issue_and_day
|
@workload_data = user_workload.hours_per_user_issue_and_day
|
||||||
|
|
||||||
@group_workload = GroupWorkload.new(users: @users,
|
@group_workload = GroupWorkload.new(users: @users,
|
||||||
|
--- a/plugins/redmine_workload/app/models/group_workload.rb
|
||||||
|
+++ b/plugins/redmine_workload/app/models/group_workload.rb
|
||||||
|
@@ -72,7 +72,7 @@ class GroupWorkload
|
||||||
|
end
|
||||||
|
|
||||||
|
def total_availabilities_of(user)
|
||||||
|
- working_days = WlDateTools.working_days_in_time_span(time_span, user)
|
||||||
|
+ working_days = RedmineWorkload::WlDateTools.working_days_in_time_span(time_span, user)
|
||||||
|
time_span.each_with_object({}) do |day, hash|
|
||||||
|
holiday = working_days.exclude?(day)
|
||||||
|
capacity = WlDayCapacity.new(assignee: user)
|
||||||
--- a/plugins/redmine_workload/app/models/user_workload.rb
|
--- a/plugins/redmine_workload/app/models/user_workload.rb
|
||||||
+++ b/plugins/redmine_workload/app/models/user_workload.rb
|
+++ b/plugins/redmine_workload/app/models/user_workload.rb
|
||||||
@@ -6,8 +6,8 @@
|
@@ -6,8 +6,8 @@
|
||||||
@@ -228,6 +239,24 @@
|
|||||||
|
|
||||||
attr_reader :assignees, :issues, :time_span, :today
|
attr_reader :assignees, :issues, :time_span, :today
|
||||||
|
|
||||||
|
@@ -225,7 +225,7 @@ class UserWorkload
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
- first_working_day_after_today = WlDateTools.working_days_in_time_span(today..time_span.end, assignee).min
|
||||||
|
+ first_working_day_after_today = RedmineWorkload::WlDateTools.working_days_in_time_span(today..time_span.end, assignee).min
|
||||||
|
result[first_working_day_after_today] = {} if result[first_working_day_after_today].nil?
|
||||||
|
result[first_working_day_after_today][:hours] = hours_remaining
|
||||||
|
|
||||||
|
@@ -271,7 +271,7 @@ class UserWorkload
|
||||||
|
else
|
||||||
|
# Number of remaining working days for the issue:
|
||||||
|
remaining_time_span = [today, issue.start_date].max..issue.due_date
|
||||||
|
- number_of_workdays_for_issue = WlDateTools.real_distance_in_days(remaining_time_span, assignee)
|
||||||
|
+ number_of_workdays_for_issue = RedmineWorkload::WlDateTools.real_distance_in_days(remaining_time_span, assignee)
|
||||||
|
hours_per_workday = hours_remaining / number_of_workdays_for_issue.to_f
|
||||||
|
|
||||||
|
time_span.each do |day|
|
||||||
@@ -356,7 +356,7 @@ class UserWorkload
|
@@ -356,7 +356,7 @@ class UserWorkload
|
||||||
# Collects all working days within a given time span.
|
# Collects all working days within a given time span.
|
||||||
#
|
#
|
||||||
|
|||||||
Reference in New Issue
Block a user