OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
summary table shows the abbreviated weekday and the date of day
as-op2d822926593a
diff --git a/modules/reporting/app/workers/cost_query/pdf/timesheet_generator.rb b/modules/reporting/app/workers/cost_query/pdf/timesheet_generator.rbindex 14a32c20bac..35773689164 100644--- a/modules/reporting/app/workers/cost_query/pdf/timesheet_generator.rb+++ b/modules/reporting/app/workers/cost_query/pdf/timesheet_generator.rb@@ -40,13 +40,15 @@ class CostQuery::PDF::TimesheetGeneratorH1_FONT_SIZE = 26H1_MARGIN_BOTTOM = 2HR_MARGIN_BOTTOM = 16+ TABLE_MARGIN_BOTTOM = 28TABLE_CELL_FONT_SIZE = 10TABLE_CELL_BORDER_COLOR = "BBBBBB"TABLE_CELL_PADDING = 4COMMENT_FONT_COLOR = "636C76"H2_FONT_SIZE = 20H2_MARGIN_BOTTOM = 10- SUM_TABLE_FIRST_COLUMN_WIDTH = 68+ SUM_TABLE_FIRST_COLUMN_WIDTH = 90+ SUM_TABLE_MAX_USER_COLUMNS = 6COLUMN_DATE_WIDTH = 66COLUMN_ACTIVITY_WIDTH = 100@@ -362,7 +364,7 @@ class CostQuery::PDF::TimesheetGeneratorcurrent_table_height += grouped_row_heightendwrite_grouped_row_table(current_table, true)- pdf.move_down(28)+ pdf.move_down(TABLE_MARGIN_BOTTOM)enddef write_grouped_row_table(grouped_rows, has_sum_row)@@ -413,9 +415,9 @@ class CostQuery::PDF::TimesheetGeneratorstart_date, end_date = all_entries.map(&:spent_on).minmaxusers- .each_slice(6) do |users_chunk|+ .each_slice(SUM_TABLE_MAX_USER_COLUMNS) do |users_chunk|write_sum_table!(users_chunk, start_date, end_date)- pdf.move_down(28)+ pdf.move_down(TABLE_MARGIN_BOTTOM)endstart_new_page_if_needed@@ -445,7 +447,11 @@ class CostQuery::PDF::TimesheetGeneratorendreturn nil unless row.any? { |column| !column.empty? }- [content: format_date(date)] + row+ [format_date_with_weekday(date)] + row+ end++ def format_date_with_weekday(date)+ "#{I18n.l(date.to_date, format: '%a')}, #{format_date(date)}"enddef calc_sum_for_user_on_day(user, date)diff --git a/modules/reporting/spec/workers/cost_query/pdf/timesheet_generator_spec.rb b/modules/reporting/spec/workers/cost_query/pdf/timesheet_generator_spec.rbindex 7ffa7ef2e1e..220c923c37d 100644--- a/modules/reporting/spec/workers/cost_query/pdf/timesheet_generator_spec.rb+++ b/modules/reporting/spec/workers/cost_query/pdf/timesheet_generator_spec.rb@@ -149,13 +149,13 @@ RSpec.describe CostQuery::PDF::TimesheetGenerator douser.name,time_entry_user.name,- format_date(user_time_entry.spent_on),+ generator.format_date_with_weekday(user_time_entry.spent_on),generator.format_hours(user_time_entry.hours), generator.format_hours(time_entry.hours + other_time_entry.hours),- format_date(time_entry_with_comment.spent_on),+ generator.format_date_with_weekday(time_entry_with_comment.spent_on),generator.format_hours(time_entry_with_comment.hours),- format_date(time_entry_without_time.spent_on),+ generator.format_date_with_weekday(time_entry_without_time.spent_on),generator.format_hours(time_entry_without_time.hours),I18n.t("export.timesheet.sums_hours"),