diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-03-02 17:42:54 +0000 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-03-05 09:32:12 +0000 |
commit | 1bda0aabdeb0120ae86d48870bc908bfd12d68bc (patch) | |
tree | b2c714da37650475d336da9c25385e5c7a7da9e9 | |
parent | 4e0cbb371bdb058ea84be50b2b5a12d8c0f4abdb (diff) |
[Zurich] Include user email/phone/name in CSV export.
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Zurich.pm | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Zurich.pm b/perllib/FixMyStreet/Cobrand/Zurich.pm index 97a7244b8..4fd2def30 100644 --- a/perllib/FixMyStreet/Cobrand/Zurich.pm +++ b/perllib/FixMyStreet/Cobrand/Zurich.pm @@ -1225,14 +1225,16 @@ sub export_as_csv { headers => [ 'Report ID', 'Created', 'Sent to Agency', 'Last Updated', 'E', 'N', 'Category', 'Status', 'Closure Status', - 'UserID', 'External Body', 'Time Spent', 'Title', 'Detail', + 'UserID', 'User email', 'User phone', 'User name', + 'External Body', 'Time Spent', 'Title', 'Detail', 'Media URL', 'Interface Used', 'Council Response', 'Strasse', 'Mast-Nr.', 'Haus-Nr.', 'Hydranten-Nr.', ], columns => [ 'id', 'created', 'whensent',' lastupdate', 'local_coords_x', 'local_coords_y', 'category', 'state', 'closure_status', - 'user_id', 'body_name', 'sum_time_spent', 'title', 'detail', + 'user_id', 'user_email', 'user_phone', 'user_name', + 'body_name', 'sum_time_spent', 'title', 'detail', 'media_url', 'service', 'public_response', 'strasse', 'mast_nr',' haus_nr', 'hydranten_nr', ], @@ -1266,6 +1268,9 @@ sub export_as_csv { whensent => $report->whensent, lastupdate => $report->lastupdate, user_id => $report->user_id, + user_email => $report->user->email || '', + user_phone => $report->user->phone || '', + user_name => $report->name, closure_status => $report->get_extra_metadata('closure_status') || '', body_name => $body_name, sum_time_spent => $report->get_column('sum_time_spent') || 0, |