Skip to content

Instantly share code, notes, and snippets.

@pkarman
Created February 26, 2020 21:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pkarman/b3d88583840c69a075c0f1cf5d97bbbd to your computer and use it in GitHub Desktop.
Save pkarman/b3d88583840c69a075c0f1cf5d97bbbd to your computer and use it in GitHub Desktop.
create csv of open tasks
vh = BusinessLine.find_by(url: 'vha')
rows = vha.tasks.open.includes(:appeal).order(id: :asc).map do
|t| [
t.appeal.intake&.user&.css_id,
t.id,
"https://appeals.cf.ds.va.gov/decision_reviews/vha/tasks/#{t.id}",
t.appeal_id,
t.appeal_type,
t.appeal.veteran_file_number,
t.created_at
]
end
rows.each { |r| puts r.join(",") }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment