After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 630091 - HTML template need grand totals
HTML template need grand totals
Status: RESOLVED FIXED
Product: hamster-applet
Classification: Deprecated
Component: general
2.31.x
Other Linux
: Normal normal
: ---
Assigned To: hamster-applet-maint
hamster-applet-maint
Depends on:
Blocks:
 
 
Reported: 2010-09-19 17:51 UTC by Tobias Wolf
Modified: 2010-11-07 12:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed fix (5.38 KB, patch)
2010-10-04 09:25 UTC, jerome.lacoste
rejected Details | Review
screenshot first version (12.28 KB, image/png)
2010-10-04 10:10 UTC, jerome.lacoste
  Details
screenshot of repeating totals (121.34 KB, image/png)
2010-10-04 10:33 UTC, Toms Bauģis
  Details
Proposed fix v2 (5.55 KB, patch)
2010-10-04 10:41 UTC, jerome.lacoste
none Details | Review
Proposed fix v3 (5.69 KB, patch)
2010-10-04 10:51 UTC, jerome.lacoste
reviewed Details | Review
Add grand totals and totals by tag to html report (7.49 KB, patch)
2010-10-06 20:42 UTC, klingger
committed Details | Review

Description Tobias Wolf 2010-09-19 17:51:19 UTC
The original simple template had grand totals over the period by categories.

This subtable was essential. Please re-introduce it.
Comment 1 jerome.lacoste 2010-10-04 06:46:45 UTC
I opened an issue in Ubuntu for the same reason: https://bugs.launchpad.net/ubuntu/+source/hamster-applet/+bug/654397

Something else. I used to export my report to PDF, with both the details and total on one page. When adding the totals again, please make it easy to generate a single page containing details and totals.
Comment 2 jerome.lacoste 2010-10-04 09:25:28 UTC
Created attachment 171677 [details] [review]
Proposed fix
Comment 3 Toms Bauģis 2010-10-04 10:00:09 UTC
Review of attachment 171677 [details] [review]:

thanks for the patch! please look into these issues:

* you should sum up the activities for all days and group by activity and category. right now the output except for the 
  grand total is the same as in the "totals" tab. 

* the grand and grand grand totals should belong to the "totals" tab. for your specific needs you could generate a 
  report that works for your pdf-generating needs. i'm open for improvements though - not sure if tabs is the best 
  approach here anyway, although it makes sense to some extent as on the one tab you have totals and on the other - raw 
  data.

* the en_GB locale is not essential to the commit so please exclude that file
Comment 4 Toms Bauģis 2010-10-04 10:00:09 UTC
Review of attachment 171677 [details] [review]:

thanks for the patch! please look into these issues:

* you should sum up the activities for all days and group by activity and category. right now the output except for the 
  grand total is the same as in the "totals" tab. 

* the grand and grand grand totals should belong to the "totals" tab. for your specific needs you could generate a 
  report that works for your pdf-generating needs. i'm open for improvements though - not sure if tabs is the best 
  approach here anyway, although it makes sense to some extent as on the one tab you have totals and on the other - raw 
  data.

* the en_GB locale is not essential to the commit so please exclude that file
Comment 5 jerome.lacoste 2010-10-04 10:10:49 UTC
Created attachment 171680 [details]
screenshot first version

I don't get your comment #1 in your review.

I don't have a "totals" tab. I only have a "total by days" tab.
And in the activity log, in the totals section, I group by activity and category. Attached is how it looks like on my report for september. Care to explain a bit more (I can be online if needed, lacostej on freenode or gtalk)
Comment 6 Toms Bauģis 2010-10-04 10:33:27 UTC
Created attachment 171683 [details]
screenshot of repeating totals

ah apologies, wrong conclusion - attached is output of my run. from the quick glimpse in the code i think you are missing sorting before groupby, as groupby does not do that for you.

as for totals tab - i meant "totals by day".  feel free to rename the tab and add a "totals by date" in the tab contents.
Comment 7 jerome.lacoste 2010-10-04 10:41:27 UTC
Created attachment 171684 [details] [review]
Proposed fix v2

I tried to move all totals into the Totals tab. Its name changed from Totals by day to Totals and now contains both the Total by day section and Totals section.
Comment 8 jerome.lacoste 2010-10-04 10:42:29 UTC
Ah. I have to redo my commit based on your comment #6.
Comment 9 jerome.lacoste 2010-10-04 10:51:30 UTC
Created attachment 171685 [details] [review]
Proposed fix v3

This one should be better. I've added sorting though I haven't tested it fully.
Comment 10 jerome.lacoste 2010-10-04 11:54:50 UTC
BTW, if you accept the patch, can you try to backport it into the version that goes into 2.32 ? That way I will have it fixed in ubuntu 10.10...

Thanks
Comment 11 Toms Bauģis 2010-10-04 12:40:56 UTC
backporting to 2.30 will introduce string freeze and hard code freeze breaks, which means i'll have to get approval from the teams. i'll consider doing that.

will try reviewing the patch until this evening, sorry for delay.
Comment 12 jerome.lacoste 2010-10-04 12:47:53 UTC
Just need to be backported to 2.32, not 2.30.

As for the freeze, maybe considering that it was a regression (removed feature...).
Comment 13 klingger 2010-10-06 20:42:09 UTC
Created attachment 171849 [details] [review]
Add grand totals and totals by tag to html report

Improved version of patch from jerome.lacoste - add totals by tag
Comment 14 jerome.lacoste 2010-10-19 08:15:44 UTC
Toms, 

what can we do to get this regression fixed ? 

My main focus is to get the totals back. Don't need the totals by tag now nor anything that would cause adding new strings.

We may want to split this patch into enhancement & regression fixes.

I would really like this to be backported in 2.32 branch and end up in Ubuntu 10.10.
Comment 15 Toms Bauģis 2010-10-19 09:56:35 UTC
nyah, sorry for delay. i will be giving shout to the release team about breaking freeze. the next release (2.32.1) is in Nov 15, so will get it in by then.

until then just bit of patience - haven't forgotten the bug, just super swamped at the moment (ends this week)
Comment 16 jerome.lacoste 2010-10-19 09:58:18 UTC
ok. Just give feedback on the patches when you have time.
Comment 17 Toms Bauģis 2010-11-06 01:36:20 UTC
Review of attachment 171685 [details] [review]:

cheers
Comment 18 Toms Bauģis 2010-11-06 01:36:22 UTC
Review of attachment 171685 [details] [review]:

cheers
Comment 19 Toms Bauģis 2010-11-06 01:36:50 UTC
Review of attachment 171849 [details] [review]:

fix pushed to git master for now
Comment 20 Toms Bauģis 2010-11-07 12:00:38 UTC
got two approvals from i18n[1] and no response from release team (guess that's because this is a regression). pushed fix to gnome-2-32.
thank you everyone!


[1] http://mail.gnome.org/archives/gnome-i18n/2010-November/msg00061.html