Entries column shows zero for some content types
We are showing some content types entries in cero, this because we remplace the View word by the number of contents, but we are inconsistent with this data
Expected Behavior
We should show the real number of entries
Current Behavior
We replaced the View with the number of elements for that Content Type, but some content types shows 0.
SC: https://screencast.com/t/96WmSz8fXVv
Steps to Reproduce (for bugs)
- Login as admin
- Go to content types
Your Environment
Tested in the last master // Chrome
we need to use an es agg query to get this data.
Agg query was already being used. The problem is it returns the top tep by default (Figure that out after reading the doc). Agg query needs to be altered like this:
{ "aggs" : { "entries" : { "terms" : { "field" : "contentType", "size" : 0 } } }, size:0}
for it to return them all instead of the top ten.
"By default, the terms aggregation will return the buckets for the top ten terms ordered by the doc_count. One can change this default behaviour by setting the size parameter."
"If set to 0, the size will be set to Integer.MAX_VALUE"
Quoted from: https://www.elastic.co/guide/en/elasticsearch/reference/2.0/search-aggregations-bucket-terms-aggregation.html
Passed QA.
Checked that existing Entries match to existing content types
Verified that adding contents to a specific content type are reflected to in the Entries column
Verified that deleting contents from a specific content type are reflected to in the Entries column

Tested locally using the following environments: Upgrade from dotcms_3.6 with client dataset (db and assets) to master branch / commit 4fd490584297bafd0ad55bc7896df872c5ba1ffa Ubuntu 14.04.1 / Postgres 9.3.5 / Chrome v54.0.2840.98 / Tomcat 8 / Java 8