Closed saracarl closed 5 months ago
The discrepancy is due to the difference in the two queries used to show minutes to the end user and the project owner.
The end user sees the AhoyActivitySummary for all of their time across any collection. The owner sees the AhoyActivitySummary for all of their collections and users.
Some AhoyActivitySummary records do not have a collection_id
, and as a result are not shown to the project owner.
In this user's case, these collection_id=nil
summaries come from these controller actions:
Ahoy::Event.where(user_id: 32019007, time:[Date.new(2024,2,1)..Date.new(2024,2,29)], properties:{}).pluck(:name).tally
=> {"dashboard#dashboard_role"=>68, "dashboard#landing_page"=>1, "dashboard#watchlist"=>72, "dashboard#your_hours"=>90, "search_attempt#click"=>18, "sessions#create"=>1, "static#landing_page"=>3, "user#profile"=>3}
2.7.3 :032 >