mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-04 16:11:11 -04:00
List who sent a message in CSV download
This is useful if you have lots of people sending messages and want to report on who’s doing what. Needs the API updating to return `created_by_name` in its response.
This commit is contained in:
@@ -130,7 +130,7 @@ def generate_notifications_csv(**kwargs):
|
||||
original_column_headers = original_upload.column_headers
|
||||
fieldnames = ['Row number'] + original_column_headers + ['Template', 'Type', 'Job', 'Status', 'Time']
|
||||
else:
|
||||
fieldnames = ['Recipient', 'Template', 'Type', 'Job', 'Status', 'Time']
|
||||
fieldnames = ['Recipient', 'Template', 'Type', 'Sent by', 'Job', 'Status', 'Time']
|
||||
|
||||
yield ','.join(fieldnames) + '\n'
|
||||
|
||||
@@ -155,7 +155,8 @@ def generate_notifications_csv(**kwargs):
|
||||
notification['recipient'],
|
||||
notification['template_name'],
|
||||
notification['template_type'],
|
||||
notification['job_name'],
|
||||
notification['created_by_name'] or '',
|
||||
notification['job_name'] or '',
|
||||
notification['status'],
|
||||
notification['created_at']
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user