Skip to content

Commit

Permalink
Change export date format
Browse files Browse the repository at this point in the history
  • Loading branch information
richardhallett committed Jan 9, 2020
1 parent 9908021 commit ce19c6f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions app/controllers/export_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def organizations
accountWebsite
region
focusArea
organisationType
sector
accountType
generalContactEmail
groupEmail
Expand Down Expand Up @@ -162,7 +162,7 @@ def organizations
accountWebsite: provider.website,
region: provider.region_human_name,
focusArea: provider.focus_area,
organizationType: provider.organization_type,
sector: provider.organization_type,
accountType: provider.member_type_label,
generalContactEmail: provider.system_email,
groupEmail: provider.group_email,
Expand All @@ -175,8 +175,8 @@ def organizations
billingCountry: provider.billing_country,
twitter: provider.twitter_handle,
rorId: provider.ror_id,
created: provider.created,
deleted: provider.deleted_at
created: provider.created.present? ? provider.created.strftime("%Y-%m-%d") : nil,
deleted: provider.deleted_at.present? ? provider.deleted_at.strftime("%Y-%m-%d") : nil,
}.values

csv += CSV.generate_line row
Expand Down Expand Up @@ -264,8 +264,8 @@ def repositories
accountDescription: client.description,
accountWebsite: client.url,
generalContactEmail: client.system_email,
created: client.created,
deleted: client.deleted_at,
created: client.created.present? ? client.created.strftime("%Y-%m-%d") : nil,
deleted: client.deleted_at.present? ? client.deleted_at.strftime("%Y-%m-%d") : nil,
doisCountCurrentYear: client_totals[client_id] ? client_totals[client_id]["this_year"] : nil,
doisCountPreviousYear: client_totals[client_id] ? client_totals[client_id]["last_year"] : nil,
doisCountTotal: client_totals[client_id] ? client_totals[client_id]["count"] : nil
Expand Down

0 comments on commit ce19c6f

Please sign in to comment.