Multiple Categories per entry

Bug #520300 reported by Ulrik Mikaelsson
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GTimeLog
Triaged
Wishlist
Unassigned

Bug Description

When using GTimelog, I often find it difficult to divide my work into a strict tree. I often want to divide my work in orthogonal aspects, such as project, type of work, and codebase. My problem is that orthogonal concepts can be a bit tricky to divide into a tree.

For instance, I often do support for different projects, but not always for a project. Thus, I'm having difficulty deciding on whether to put projects at the top of the tree, or activites. Sometimes the work is further complicated in that some job-entries span multiple projects, and codebases can be shared between projects.

I would therefore like to propose a tag-based categorization, roughly sketched out as;

tasks.txt:
project:X
project:Y
project:Z
type:support
type:implementation
type:bugfix
type:documentation
codebase:A
codebase:B

07:00: started
07:15: project:X | type:support
07:35: project:Y | codebase:A | type:bugfix
08:10: project:X | codebase:A | type:implementation
08:35: project:Z | project:Y | codebase:B | type:implementation
09:15; project:Y | type:support | supportee:operations

In the reports I then want activites presented in two types of break-downs:
 * As a whole, where the "category" of work is basically the complete set of tags, (although ordering should not matter), and also two types of breakdowns:
 * Category summary: how much total time has been spent in activities related to "project:X", "type:support", etc.

Is this comprehensible?

Related branches

Revision history for this message
Marius Gedminas (mgedmin) wrote :

Tags sound like a sane idea. My preference for the syntax would be something like

   12:00: start work **
   12:15: meeting [projectX]
   14:37: fixing #321 [projectX, projectY, bugfix]

with the old prefix syntax

   15:30: projectX: fixing #322 [bugfix]

supported for backwards-compatibility reasons (and, besides, I still like it).

I'll have to think about reporting a bit more.

Incidentally, have you looked at Project Hamster? It's a time-tracker for GNOME that already supports tags and overall seems to be much more actively maintained.

Changed in gtimelog:
importance: Undecided → Wishlist
Revision history for this message
Jeroen Langeveld (jlangeveld) wrote :

Altternative syntaxes could be:
   12:00: start work **
   12:15: meeting @projectX
   14:37: fixing #321 @projectX @projectY @bugfix

or (when requireing a tagname to NOT include spaces) you could leave out the comma:
   12:00: start work **
   12:15: meeting [projectX]
   14:37: fixing #321 [projectX projectY bugfix]

About project Hamster:
It stores it's activities in an sqlite database which makes it hard to 'fix' logged activities.
The extremely basic datastructure behind gtimelog is one of it's main attractions IMHO.

Revision history for this message
Marius Gedminas (mgedmin) wrote :

This is not something I'm likely to get around to do, but I'm willing to consider a patch.

Changed in gtimelog:
status: New → Triaged
Revision history for this message
Jonatan Cloutier (jonatan-cloutier) wrote :

I've done some work on this issue, but as I did it before seeing this discussion I came up with a different syntax:

   12:00: start work **
   12:15: meeting 'projectX
   14:37: fixing #321 'projectX 'projectY 'bugfix

The categories are still functional, I've added a tag view and a tag section in reports (except for categorized as it doesn't make sens). The tags are striped in grouped view. Space are supported in tags :

   14:37: fixing #321 'project X 'project Y 'bug fix
would give a "project X", a "project Y" and a "bug fix" tags, the tags must be after the task entry.

I choose the apostrophe syntax because it's easy to do it on most qwerty keyboard. I personally wouldn't like the square bracket one because I prefer to use a single char. I'd be fine if you prefer that I change it to an @, but I find it less intuitive, might be just me.

Any feedback will be appreciated.

Revision history for this message
Marius Gedminas (mgedmin) wrote :

Thanks for the merge request!

It looks good at first sight, but I'm really not a fan of the apostrophe as a tag indicator. I've a bunch of preexisting log entries like

    project X: swap 'foo' and 'bar'

So, NAK on the syntax.

@ is commonly used to refer to a person (in Twitter, in Github), so I don't want to go with @tagname either.

Twitter-like hashtags (#tagname) might be a option, with some care to avoid false tagging of things like

    project X: fix bug #42 (frobnicator doesn't work)
    sysadmining: fix http://example.com/url#anchor

A careful regexp, e.g., ' #([a-zA-Z][-a-zA-Z0-9_]*)' might do it.

But then I also have preexisting log entries like

    irc meeting in #channel

and having them suddenly become tags would make me sad :(

While I'm grepping, I see I've used

    project X: do stuff [issue42]
    project Y: do stuff [issue 42]

as well, although rarely. I might do a search-replace to (issue 42) to avoid issues if [tag] becomes the syntax.

Revision history for this message
Jonatan Cloutier (jonatan-cloutier) wrote :

as said in my preceding comment, I'm fine with changing the syntax, but I'd really prefer a single char tag instead of an enclosing tag (like the []). This is just for typing simplicity.

in any case we wont find a perfect syntax that wont break anyone log entry. Maybe if restricting tag to be with no space it's easier to select only the prefixed strings at the end of an entry and eliminate most false positive

ex:
project X: swap 'foo and 'bar'

foo wouldn't be selected because it's not a the end. And bar wouldn't be because it's ending with the tag prefix.

In the worst case it's possible to add a customizable setting for the prefix.

Revision history for this message
Standa (standa31415) wrote :

Hi
I downloaded branch bzr branch lp:~jonatan-cloutier/gtimelog/addTags and have few comments - don't know where to write them, so placing it here.

With setting: 'report_style = plain'
- for reports - weekly, monthly - summary by tag is included, but tags are not included in 'task line'
For example:
my task line was: """TEST: my test 'tag1 'tag2"""
But in report is:
"""
TEST: my test 1 hour 34 min
"""
and in summary section:
"""
By tag:

tag1 1 hour 34 min
tag2 1 hour 34 min
"""
So I am unable to find out to which task the tag belongs.

With setting: 'report_style = categorized'
- for reports weekly and monthly - there is summary by category, but not by tag. Don't know whether it's purpose or bug. If grouping byt tag should be included - it is bug
- also tags are missing in detailed task line, so I am unable to find out in report if I set tags for the task or not

Revision history for this message
Jonatan Cloutier (jonatan-cloutier) wrote :

Hi,

Thanks for the comment. About the tag missing in both "detailed" task line it's because of the grouping done.

You could have two task """TEST: my test 'tag1""" """TEST: my test 'tag2""" and the result should be:
"""
TEST: my test 1 hour 34 min
"""
"""
By tag:

tag1 1 hour
tag2 34 min
"""

I agree that most of the time the task line always have the same tags, but I had case that weren't (eg: 'nonFacturable for some period of a task)

All of this is possible to change if we can have consistent result.

About the categorized report, I didn't show the tags summary because it's a categorized report, not a tags or summary report, but I did hesitate to show them as well. If we change the report label I could add them too.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.