Defect #13630

PDF export generates the issue id twice

Added by F Schroedter over 4 years ago. Updated over 4 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:PDF export
Target version:2.3.1
Resolution:Fixed Affected version:2.3.0

Description

The pdf export generates the issue id twice:

PDF screenshot

I added a patch that fixes this bug.

double_issueID.png - PDF screenshot (10.7 KB) F Schroedter, 2013-03-28 19:26

pdf.rb.patch Magnifier (2.09 KB) F Schroedter, 2013-03-28 19:27

pdf.rb.2.patch Magnifier (6.04 KB) F Schroedter, 2013-03-29 12:38

pdf.rb.3.patch Magnifier - .inject(0, :+) (6.05 KB) F Schroedter, 2013-03-29 15:06


Related issues

Related to Redmine - Defect #13689: Duplicate column Id em Issues Closed
Precedes Redmine - Defect #14178: PDF API broken in version 2.3.1 Closed

Associated revisions

Revision 11693
Added by Etienne Massip over 4 years ago

Fixed that issue list PDF export displays ID column twice (#13630).

Contributed by F Schroedter.

Revision 11694
Added by Etienne Massip over 4 years ago

Code cleanup (#13630).

Contributed by F Schroedter.

Revision 11695
Added by Etienne Massip over 4 years ago

Merged r11693 from trunk (#13630).

History

#1 Updated by Etienne Massip over 4 years ago

  • Status changed from New to Confirmed
  • Target version set to 2.3.1

Regression.

Not sure the patch is complete?

#2 Updated by F Schroedter over 4 years ago

This patch should be complete now. It also includes some code improvements: .inject(0) {|s,v| s += v} is replaced by .inject(:+)

#3 Updated by Etienne Massip over 4 years ago

F Schroedter wrote:

This patch should be complete now. It also includes some code improvements: .inject(0) {|s,v| s += v} is replaced by .inject(:+)

Looks fine. What Ruby version did you test it with, please?

#4 Updated by F Schroedter over 4 years ago

Tested on ruby 1.9.2 and 1.9.3. The code improvement should also work on 1.8.7: http://stackoverflow.com/questions/1538789/how-to-sum-array-members-in-ruby

#5 Updated by Etienne Massip over 4 years ago

Looks like .inject(0) {|s,w| s += w} should be replaced by .inject(0, :+) rather than .inject(:+)?

#6 Updated by F Schroedter over 4 years ago

You are right.

#7 Updated by Etienne Massip over 4 years ago

  • Status changed from Confirmed to Resolved
  • Resolution set to Fixed

Fixed with r11693.

#8 Updated by Etienne Massip over 4 years ago

  • Status changed from Resolved to Closed

Merged from trunk.

Also available in: Atom PDF