Skip to content

Commit

Permalink
cumulate researcher doi counts
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Aug 25, 2019
1 parent f1aa012 commit b296062
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/controllers/concerns/countable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ def doi_count(client_id: nil, provider_id: nil, consortium_id: nil, researcher_i
response = Doi.query(nil, page: { number: 1, size: 0 })
end

response.results.total > 0 ? facet_by_year(response.response.aggregations.created.buckets) : []
if researcher_id
response.results.total > 0 ? facet_by_cumulative_year(response.response.aggregations.created.buckets) : []
else
response.results.total > 0 ? facet_by_year(response.response.aggregations.created.buckets) : []
end
end

# cumulative count clients by year
Expand Down

0 comments on commit b296062

Please sign in to comment.