Ticket #2682 (closed defect: fixed)

Opened 22 months ago

Last modified 22 months ago

CKAN's internal tracking counts each view twice, needs unit tests

Reported by: seanh Owned by: seanh
Priority: awaiting merge Milestone: ckan-v1.8
Component: ckan Keywords:
Cc: Repository: ckan
Theme: none

Description

CKAN's internal tracking seems to count each page view twice, the problem appears to be with the SQL in the update_tracking() method in ckan/lib/cli.py.

The internal tracking feature needs some tests, and some of the code could maybe do with some more explanatory comments, e.g. what is the intended difference between count and running_total?

Change History

comment:1 Changed 22 months ago by seanh

  • Type changed from enhancement to defect

comment:2 Changed 22 months ago by seanh

Note that this commit fixes the double-counting for page views:

https://github.com/okfn/ckan/commit/5739818a528bb16748f67b6d57a16f575ae78144

but not for resource downloads (which look like they could have the exact same fix) but I'm not particularly happy about the fix because I don't fully understand the SQL.

It still needs unit tests and to be fixed properly, for both pages and resources

comment:3 Changed 22 months ago by seanh

  • Owner set to seanh
  • Status changed from new to assigned

Talked with kindly, seems the above fix is correct and should be applied to resources as well

comment:4 Changed 22 months ago by seanh

  • Priority changed from awaiting triage to awaiting merge

comment:5 Changed 22 months ago by seanh

  • Status changed from assigned to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.