Commit 9470cc0ba88e3cee95ca2cb3b8b9efe2045d62cc
1 parent
41ef6c0b
Exists in
master
Add field in report
Showing
1 changed file
with
2 additions
and
1 deletions
Show diff stats
lib/dialoga_plugin/report_job.rb
... | ... | @@ -33,7 +33,7 @@ class DialogaPlugin::ReportJob < Struct.new(:profile_id, :report_path) |
33 | 33 | CSV.open(filepath, 'w', {:col_sep => ';'} ) do |csv| |
34 | 34 | tasks = ProposalsDiscussionPlugin::ProposalTask.all |
35 | 35 | count = 0 |
36 | - csv << ['Origem', 'Status', 'Criada em', 'Moderado por', 'Data de Moderado', 'Validado por', 'Data de Validado', 'Autor', 'Proposta', 'Categorias'] | |
36 | + csv << ['Tema', 'Origem', 'Status', 'Criada em', 'Moderado por', 'Data de Moderado', 'Validado por', 'Data de Validado', 'Autor', 'Proposta', 'Categorias'] | |
37 | 37 | status_translation = { |
38 | 38 | 1 => 'Pendente de Moderacao', |
39 | 39 | 2 => 'Rejeitada', |
... | ... | @@ -45,6 +45,7 @@ class DialogaPlugin::ReportJob < Struct.new(:profile_id, :report_path) |
45 | 45 | count += 1 |
46 | 46 | puts "%s de %s: adicionando task: %s" % [count, tasks.count, task.id ] |
47 | 47 | info = [] |
48 | + info.push(task.article_parent.nil? ? '' : task.article_parent.categories.join(' ')) | |
48 | 49 | info.push(task.proposal_source) |
49 | 50 | info.push(status_translation[task.status]) |
50 | 51 | info.push(task.created_at.strftime("%d/%m/%y %H:%M")) | ... | ... |