Defect #35669

Prints of Issues Report details are messed-up due to the size of the graphs

Added by Mischa The Evil about 1 month ago. Updated 18 days ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:Issues planning
Target version:4.1.5
Resolution: Affected version:4.1.0

Description

When printing the Issues Report details I get lots of unwanted pages due to the large graphs (graph sizes should additionally be decreased independent of this issue, though [see #35670]) that are beneath the table. And the graphs that are actually printed are messed-up due to their size too.

I think the best solution currently is to hide the charts when printing, like so:

diff --git a/app/views/reports/_details.html.erb b/app/views/reports/_details.html.erb
index 9b8f3b5e5..701591c74 100644
--- a/app/views/reports/_details.html.erb
+++ b/app/views/reports/_details.html.erb
@@ -25,10 +25,10 @@
 <% end %>
 </tbody>
 </table>
-<div class="issue-report-graph">
+<div class="issue-report-graph hide-when-print">
   <canvas id="issues_by_<%= params[:detail] %>"></canvas>
 </div>
-<div class="issue-report-graph">
+<div class="issue-report-graph hide-when-print">
   <canvas id="issues_by_status"></canvas>
 </div>
 <%= javascript_tag do %>

0001-Issue-Report-details-Hide-charts-when-printing.patch Magnifier - Patch against trunk@r21131. (931 Bytes) Mischa The Evil, 2021-08-03 00:58


Related issues

Related to Redmine - Defect #35670: Graphs in the Issues Report details are too large. New
Related to Redmine - Feature #31418: Stacked bar charts in the issue details report Closed

Associated revisions

Revision 21202
Added by Go MAEDA 25 days ago

Hide graphs when printing the Issues Report details (#35669).

Patch by Mischa The Evil.

Revision 21205
Added by Go MAEDA 18 days ago

Merged r21202 from trunk to 4.2-stable (#35669).

Revision 21206
Added by Go MAEDA 18 days ago

Merged r21202 from trunk to 4.1-stable (#35669).

History

#2 Updated by Mischa The Evil about 1 month ago

  • Related to Defect #35670: Graphs in the Issues Report details are too large. added

#3 Updated by Mischa The Evil about 1 month ago

  • Description updated (diff)

#4 Updated by Mischa The Evil about 1 month ago

  • Related to Feature #31418: Stacked bar charts in the issue details report added

#5 Updated by Go MAEDA 29 days ago

  • Target version set to 4.1.5

Setting the target version to 4.1.5.

#6 Updated by Go MAEDA 25 days ago

  • Status changed from New to Resolved
  • Assignee set to Go MAEDA

#7 Updated by Go MAEDA 18 days ago

  • Status changed from Resolved to Closed

Committed the patch. Thank you.

Also available in: Atom PDF