Project

General

Profile

Actions

Patch #3614

closed

Export to PDF/CSV ignoring custom queries and HTML query display problems

Added by Alex Mendes Matt Keniston over 15 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
2009-07-14
Due date:
% Done:

0%

Estimated time:

Description

Redmine Development build

This is a solution to Defect #1190
It patches the bugs in 'Export to PDF' and 'Export to CSV' on the Issue page.

Previously, Redmine did not honor custom queries when exporting to PDF/CSV. Instead, it would either print minimal default columns(PDF) or print all the columns(CSV).

This patch, correctly, displays the columns specified by the custom queries.

Additionally, we fixed an HTML display issue on the Issues page in redmine. Of what's fixed
1.) Custom fields will now wrap
2.) Custom text based fields are now left aligned


Files

export_issues_to_pdf_csv.diff (32.3 KB) export_issues_to_pdf_csv.diff Alex Mendes Matt Keniston, 2009-07-14 17:07
export_issues_to_pdf_csv_r2823.diff (28.2 KB) export_issues_to_pdf_csv_r2823.diff Chris Grieger, 2009-07-29 13:18
export_issues_to_pdf_csv_r2823_win32.diff (29 KB) export_issues_to_pdf_csv_r2823_win32.diff Chris Grieger, 2009-07-29 13:30
wrap-lines-on-pdf-export-rm1_0_4.patch (25.1 KB) wrap-lines-on-pdf-export-rm1_0_4.patch Patch for Redmine 1.0.4 Chrisitian Noack, 2011-02-01 17:15

Related issues

Related to Redmine - Defect #1190: Custom querry 'Export to PDF' ignores field selectionClosed2008-05-06

Actions
Actions #1

Updated by Abdul Nafay about 15 years ago

Hi, i am new to Redmine. I need this feature bad but i dont know how to place this .diff file in Redmine root directory. From what i know i have to patch this .diff file with original. I am using TortoiseSVN but i can't file the original file to patch with. If i am not in the right direction please point out and let me know how to exactly get this fix working. I am using windows btw.

Much Appreciated!

AN

Actions #2

Updated by Dirk Schmidt about 15 years ago

In which release will be the feature included?

Actions #3

Updated by Alex Mendes Matt Keniston about 15 years ago

To apply the .diff file see
http://www.redmine.org/wiki/redmine/Patch

Note that you will need to download the Patch application if you are using Windows.
You also need to use Subversion(svn) to retrieve the Redmine Development build.

Actions #4

Updated by Abdul Nafay about 15 years ago

Thanks Alex,

Can you or somebody explain in a bit more step-by-step detail. I understand what you're saying here but it is just not working out for me. I am new to this and i would really appreciate if you could explain this in a bit more detail. I also dont understand the SVN part. Are you stating i have to download the SVN software? Y would i need to retrieve the Redmine Development Kit.

Thank you for your help!

AN

Actions #5

Updated by Abdul Nafay about 15 years ago

1) Downloaded patch program for windows. And from cmd, i went to directoy where redmine is installed (apps, config, test etc folders). Did command "c:\bin\patch.exe -p0 < export_issues_to_pdf_csv.diff" This gave me a kind of strange statement that there is garbage in the file, something like this. Btw my .diff file was in the folder where patch.exe application exists. After i failed here, i explored TortoiseSVN.

2) Alex Mendes told me that i have to use SVN to retrieve Redmine development build. Not sure why, I used Tortoise SVN and checkout svn://rubyforge.org/var/svn/redmine/trunk . Files were downloaded to a new folder i created. I don't know what to do afterwards with all these files.

How can i get this patch working. I would really really appreciate if somebody could go out of way and explain it in detail how to patch in windows. I searched everywhere but could not locate a single article explaining this. Everywhere i looked it was related to a specific tool. Its disturbing that the patch instructions on this portal are just not useful for newbies.

Looking forward to your help. I'll appreciate it. Thanks!

Regards,

AN

Actions #6

Updated by Dirk Schmidt about 15 years ago

Hi Alex,

sorry for asking again but it would be very helpful for us to know in which target version the patch will be merged.
Could you give us this information?

Thanks in advance.

Regards,

Dirk

Actions #7

Updated by Chris Grieger about 15 years ago

I updated the patch to make it working for the current revision, as there were some errors, when trying to apply the patch.

Actions #8

Updated by Chris Grieger about 15 years ago

This file is for Windows users. It has LF characters converted into CRLF, so the w32 version of patch doesn't fail.

Actions #9

Updated by Alex Mendes Matt Keniston about 15 years ago

The initial fix that we wrote was for the Redmine Development Version from
svn co http://redmine.rubyforge.org/svn/trunk redmine

But it can just as easily be used for the latest stable version by removing the group related code as Chris Grieger appears to have done.

Actions #10

Updated by Jean-Philippe Lang about 15 years ago

  • Status changed from Resolved to Closed

Fixed in r2841.

Actions #11

Updated by Romuald Vandepoel almost 15 years ago

  • Status changed from Closed to Reopened

guys, I am running 8.6 and this is not fixed at all.
also, I can not patch from this release with the supplied diff. what are the possibilities?

Actions #12

Updated by Jean-Philippe Lang almost 15 years ago

  • Status changed from Reopened to Closed

See #1190.

Actions #13

Updated by Chrisitian Noack over 13 years ago

I've managed to modify the last patch called export_issues_to_pdf_csv.diff by Alex Mendes Matt Kenisto to work with RubyMine 1.0.4 stable. You find my patch file (wrap-lines-on-pdf-export-rm1_0_4.patch) attached. It also contains some useless reformatting which my IDE (RubyMine) did. I'm sorry for that.

Best regards,

Christian

Actions #14

Updated by Luis Serrano Aranda over 13 years ago

Chrisitian very good patch, it would be possible to put the project name in all footers?

thanks in advance

Actions #15

Updated by Luis Serrano Aranda over 13 years ago

Luis Serrano Aranda wrote:

Chrisitian very good patch, it would be possible to put the project name in all footers?

thanks in advance

I removed the part of the function def gantt_to_pdf now is in the gantt helper (redmine/lib/redmine/helpers/gantt.rb)

And add in pdf.rb
Line 33: + attr_accessor :footer_title

Line 120: - Cell(0, 5, @footer_title, 0, 0, 'L')
+ Cell(0, 5, @footer_title + ' (' + @footer_date + ')', 0, 0, 'L')

Line 135: + pdf.footer_title = title
Line 261: + pdf.footer_title = ("#{issue.project} - ##{issue.tracker} #{issue.id}")

And in gantt.rb

Line 591: + pdf.footer_title = ("#{l(:label_gantt)} #{project}")

Actions

Also available in: Atom PDF