Skip to content

Commit

Permalink
Fix #321: data was incorrect for incidents csv
Browse files Browse the repository at this point in the history
The data was not actually located in the dat_incident, but rather around
the data model for the columns specified in the bug.

Issue #321: Data missing from CSV incidents download
  • Loading branch information
Frank Duncan committed Jul 28, 2021
1 parent 8c8731b commit 4f5796c
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions app/views/incidents/incidents_list/index.csv.erb
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,15 @@
resource.dat_incident.try(:num_people_injured),
resource.dat_incident.try(:num_people_hospitalized),
resource.dat_incident.try(:num_people_deceased),
resource.dat_incident.try(:num_adults),
resource.dat_incident.try(:num_children),
resource.dat_incident.try(:num_families),
resource.dat_incident.try(:assistance_given),
resource.dat_incident.try(:incident_verified),
resource.dat_incident.try(:dispatch_relayed),
resource.dat_incident.try(:responders_identified),
resource.dat_incident.try(:dat_on_scene),
resource.dat_incident.try(:dat_departed_scene),
resource.num_adults,
resource.num_children,
resource.num_families,
resource.cases.map(&:total_amount).compact.sum,
resource.event_logs.event("incident_verified").first.try(:event_time),
resource.event_logs.event("dispatch_relayed").first.try(:event_time),
resource.event_logs.event("responders_identified").first.try(:event_time),
resource.event_logs.event("dat_on_scene").first.try(:event_time),
resource.event_logs.event("dat_departed_scene").first.try(:event_time),
resource.all_responder_assignments[0].try(:person).try(:full_name),
resource.all_responder_assignments[0].try(:role),
resource.all_responder_assignments[0].try(:was_flex),
Expand Down

0 comments on commit 4f5796c

Please sign in to comment.