Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server-side CSV export for reports #475

Open
jaragunde opened this issue May 6, 2020 · 1 comment
Open

Server-side CSV export for reports #475

jaragunde opened this issue May 6, 2020 · 1 comment

Comments

@jaragunde
Copy link
Member

The current CSV export feature is buggy. Many issues boil down to the fact that the table is generated on the client side and encoded in a data URI. Browsers may block these for security reasons, and the URIs we generate can be really big and suspicious-looking.

The proper way to do this is on the server side. The corresponding web service would receive, in addition to other parameters like date limits, etc. a "format" parameter. If "format=csv", it would generate report data in CSV and set the correct HTTP headers for the document to be recognized.

The problem with this approach is we should implement CSV export for every report service out there. How much code we can reuse is still to be seen; the web service implementation could use some more code reuse and refactoring in general.

jaragunde added a commit that referenced this issue Feb 24, 2021
Server-side CSV export implementation for the following reports:
* Weekly project hours
* Accumulated hours
* User tasks

(Merge pull request #484 from Igalia/new-csv-exporter)
@jaragunde
Copy link
Member Author

A server-side implementation for several reports was merged at PR #484:

commit 5ae544d72ff7b56e78c08c6099e44ac974e64d9a (HEAD -> main, origin/main)
Merge: 8247ce3a ee4e39a9
Author: Jacobo Aragunde Pérez <jaragunde@igalia.com>
Date:   Wed Feb 24 09:45:13 2021 +0100

    [#475] Server-side CSV export for some reports.
    
    Server-side CSV export implementation for the following reports:
    * Weekly project hours
    * Accumulated hours
    * User tasks
    
    (Merge pull request #484 from Igalia/new-csv-exporter)

List of related commits:

ee4e39a9 Remove legacy CSV exporter where new implementation is available.
2ae07062 Include pending holidays in extra hours report.
60dbfc4c Simplify user tasks report backend code using filter_var.
13597ac6 Include project names in user tasks CSV report.
f09a65fd Do not escape XML special characters for CSV export.
a3a5a7d3 Link new CSV exporter from user tasks report.
48736e0e Fix indentation in userTasksReport.js.
5b5eb8ae Server-side CSV output for user tasks report.
d9cda3bb Server-side CSV output for holiday hours in the acc hours report.
b46a3a4c Fix formatting in getPendingHolidayHoursService.php.
fb1812bf Server-side CSV output for extra hours in the acc hours report.
ca1849f9 Fix formatting in getExtraHoursReportService.php.
035e998e fixup! Implement server-side CSV output in the weekly project hours report.
7e036d6a Link the new CSV export feature in the project weekly hours report.
639b79f3 Implement server-side CSV output in the weekly project hours report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant