I found an issue with viewCount field in Liferay DXP 7.3. We use that field in one of our projects for displaying purposes. What I noticed is that when I migrated the Liferay from 7.0.6 GA7 CE to 7.3 GA1 DXP all assets had this number set to "0".
After investigating the issue it seems that before the information was hold in AssetEntry.viewCount:
After migration this field still exists but Liferay uses another table called "ViewCountEntry" instead. I turned on logging of the SQL queries and while fetching an AssetEntry and calling for that field I can notice following sql:
I also verified that in code - there is following method:
But when I checked the migrated database that table was empty. So the issue is that the migration tool doesn't copy values from old AssetEntry table to the new ViewCountEntry table.
Issue2: there is also second issue connected to this. As a workaround I basically copied the values with SQL script as it was easier than waiting for the migration tool update.
The SQL I used was following:
And it worked - I could see the numbers as I did in Liferay 7.0.6. Unfortunately another issue appeared - this table is not updated while visting a page where the AssetEntry is present. No matter how many times I enter the page the number stays the same. Again I found a workaround to use ViewCountManagerUtil.incrementViewCount when visiting the page but this is not the best as in my case it was quite easy because I just had to update single FTL template but if someone needed to count assets from many different places then it would be a nightmare.
Note: please note for the second issue I only tested the JournalArticle (Web Content) assets. I haven't done additional tests for another kind of assets.
The first issue occurs to all kinds though as I had many different and no values were copied at all.