Modify

Opened 12 years ago

Last modified 5 years ago

#10916 new defect

No Wiki activity shown

Reported by: anonymous Owned by:
Priority: high Component: StractisticsPlugin
Severity: normal Keywords:
Cc: dagomez, Steffen Hoffmann Trac Release: 1.0

Description (last modified by Ryan J Ollos)

The Stractistic page does not show the data for wiki activity. I can see the graph and table but there is no data in it even if I edit/create a wiki page. If the mouse is over the graph a "tooltip" whith the value undefined is shown.

Other plugins I've installed:

  • TracAccountManager
  • TracKanbanBoard
  • TracSubTickets
  • WorkflowEditor

Attachments (2)

global_reports.py.patch (4.9 KB) - added by izzy 11 years ago.
quick-and-dirty fix for time issues in global_reports.py
user_reports.py.patch (2.6 KB) - added by izzy 11 years ago.
quick-and-dirty fix for time issues in user_reports.py

Download all attachments as: .zip

Change History (21)

comment:1 Changed 12 years ago by Ryan J Ollos

Description: modified (diff)

comment:2 Changed 12 years ago by Ryan J Ollos

Priority: normalhigh
Status: newassigned

comment:3 Changed 11 years ago by Ryan J Ollos

Status: assignednew

comment:4 Changed 11 years ago by izzy

I experience the same here for Wiki activity as well as SVN commits (Trac 1.0.1 with Stractistics from SVN). Though I had a lot of both (Wiki edits and SVN commits), neither graphs nor tables show anything. Ticket activity seems to work however (though it seems to think all tickets ever opened have been worked on within the last 30 days). SVN stats look like the screenshot for Bazaar in ticket:8780.

Logs show nothing related (even tried setting them to DEBUG). Any ideas what that could be? Any fixes in sight?

Changed 11 years ago by izzy

Attachment: global_reports.py.patch added

quick-and-dirty fix for time issues in global_reports.py

comment:5 Changed 11 years ago by izzy

OK, found the culprit. Somewhere after 0.11, the time format in the databases changed: instead of "simple unix-time" (aka "seconds since 1.1.1970"), it now uses microtime. I've just attached a quick-and-dirty fix for global_reports.py which worked for me (Trac 1.0.1). I simply multiplied all time values by 1.000.000 (and divided correspondingly, where required). Stats show up fine now for me (at least everything looks reasonable). Will check user_reports.py now as well, most likely it's the same culprit.

Remark: I don't consider this a "clean solution" – as stated, it's nothing but a quick-and-dirty thing. The final solution should be using the corresponding Trac functions for time thingies (yeah, they are there somewhere, I've seen them – but I currently lack the time to check that thoroughly).

Changed 11 years ago by izzy

Attachment: user_reports.py.patch added

quick-and-dirty fix for time issues in user_reports.py

comment:6 Changed 11 years ago by izzy

As promised, the second diff (same stuff, just quick and dirty). I still have no idea what's behind the sorting in the user list here, or what makes a user the "default user" – but that's a completely different pair of shoes. Generally, the stats are working again; which is (at the moment) all that counts for me :) Hope my patches can save your day at least a little...

comment:7 Changed 11 years ago by Ryan J Ollos

Status: newassigned

comment:8 Changed 11 years ago by Ryan J Ollos

Status: assignedaccepted

comment:9 Changed 11 years ago by Ryan J Ollos

In 13597:

0.6dev: Fix query for user wiki activity. Refs #10916.

comment:10 Changed 11 years ago by Ryan J Ollos

Cc: dagomez added; anonymous removed

Thanks for the patches, izzy. There is a huge amount of work that needs to be done with this plugin. In addition to handling microsecond timestamps, trac.util.datefmt needs to be utilized so that we have localized datetimes. The Trac database API needs to be utilized properly and string interpolation avoided in preparing SQL statements. Finally, we should move away from a flash-based solution and utilize a pure JavaScript library. I hope to incrementally fix these issues in the coming months.

On a side note though, the plugin has a GPL license, so I'm considering how much time I want to invest in it. I've emailed the plugin authors to ask if they would consider changing the license to BSD 3-Clause.

comment:11 Changed 11 years ago by izzy

Glad I was able to help out! And yes, agreed, there's a lot to do. As I wrote in my comment above: what I did was just to "keep it working", "quick and dirty", nothing fancy. You did it in a much cleaner way (using e.g. from_utimestamp, which I had no time to figure out). Will look forward to the next updates :)

As for the licenses: I'm not familiar with the BSD-type licenses (all my stuff uses either GPL or CC), or the implications. But as long as it remains "free and shareable", it's fine with me :)

comment:12 in reply to:  11 Changed 11 years ago by Ryan J Ollos

Cc: Steffen Hoffmann added

Replying to izzy:

As for the licenses: I'm not familiar with the BSD-type licenses (all my stuff uses either GPL or CC), or the implications. But as long as it remains "free and shareable", it's fine with me :)

My understanding is that both BSD and GPL licenses make the code "free and shareable", the difference is that some of the terms of the GPL license are more restrictive than the BSD license, so generally we don't like to pollute BSD-licensed plugins with GPL-licensed code. I've worked on TracMetrixPlugin and StractisticsPlugin; there is also TracStatsPlugin and possibly more. My aim with the license change is to allow the codes to be mixed if needed, and perhaps we can merge some efforts to create one very functional plugin that is maintained long-term, rather than having several poorly maintained plugins.

The good news is that I received a reply to a private email to dagomez, and it sounds like the license will be changed to BSD 3-Clause.

Last edited 11 years ago by Ryan J Ollos (previous) (diff)

comment:13 Changed 11 years ago by izzy

That sounds like a very good idea indeed! Thanks fo all efforts taken, really appreciated! Sure, mixing code with different licenses is a pain in the... head. Troublesome enough even when they are close relatives (think of a CC-BY-NC-SA and CC-BY-SA merging, the result would always be the stricter mode, and that might make people, hm, less happy ;)

So I'm keeping my fingers crossed, and look forward to the outcome. Hope I don't miss the merge, as I might want to switch to the resulting code then :)

comment:14 Changed 11 years ago by dagomez

As discussed with rjollos, I approve changing the licence.

comment:15 Changed 11 years ago by Ryan J Ollos

Thanks Daniel! This is great news, since I often have trouble reaching the original author for similar requests (e.g. #11515).

comment:16 Changed 11 years ago by Ryan J Ollos

In 13606:

0.6dev: Changed license from GPL v2 to BSD 3-Clause, with permission from original author dagomez. Refs #10916.

Converted tabs to space and fixed indentation in source code.

Last edited 11 years ago by Ryan J Ollos (previous) (diff)

comment:17 Changed 11 years ago by Ryan J Ollos

The OpenFlashChart library has a GPL license, but as noted in comment:12, we'll probably want to eventually replace that dependency with a pure JavaScript library.

comment:18 Changed 10 years ago by Ryan J Ollos

Status: acceptednew

Refocusing.

comment:19 Changed 5 years ago by Ryan J Ollos

Owner: Ryan J Ollos deleted

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.