GothenburgBitFactory / taskwarrior

Taskwarrior - Command line Task Management
https://taskwarrior.org
MIT License
4.27k stars 284 forks source link

[TW-1271] Add a new special tag to always hide annotations from a task #1305

Closed taskwarrior closed 6 years ago

taskwarrior commented 6 years ago

Renato Alves on 2014-02-21T15:53:01Z says:

Request addition of a +noanno tag that would hide annotations in a task even if description.combined or description.oneline are used.

The only way to retrieve annotations from +noanno tasks is via task info.

taskwarrior commented 6 years ago

Migrated metadata:

Created: 2014-02-21T15:53:01Z
Modified: 2017-01-16T18:48:43Z
taskwarrior commented 6 years ago

Paul Beckingham on 2014-04-28T00:09:10Z says:

Note: This is a special tag, not a virtual tag. The difference is subtle - special tags affect the handling of tasks. Virtual tags are convenience representations of existing state.

taskwarrior commented 6 years ago

Paul Beckingham on 2015-03-14T17:36:50Z says:

The more I think about this, the more I believe it's another way to implement a column format, and we have a column format to hide annotations. Renato, if I'm wrong, tell me.

taskwarrior commented 6 years ago

Renato Alves on 2015-03-14T18:36:41Z says:

The way I see column formats is as something customizable at the report level. In this case I was trying to allow further control by adding metadata at the task level.

The initial motivation was to hide all the "Start/Stop" annotations from tasks that were "restarted" many times without sacrificing other informative data in other tasks. I now see the start/stop behavior as something not that relevant since timetracking is moving out of the core. Nonetheless given that information present in reports is not customizable beyond existing column formats, there might be room for a more generic version of what I was aiming for with this feature.

I'm still trying to formalize how this would work... The idea would be to have custom column formats that react based on task data/metadata, in particular tags. The hard part is defining what "react" means here and how would this logic be encoded in taskwarrior in a user configurable way.

The best possibility I can think of is expanding the current hook system with a on-report hook. This one could be used to customize the content of reports or of specific columns. Perhaps by having a 'hook' column format that would derive its content from a on-report-reportname-columnname script. The script would receive as input the task (much like current hooks) and output some form of string to be taken literally by taskwarrior (truncating or line-breaking according to terminal dimensions).

If you think this on-report extension would be of interest I'll close this issue and create a new one after what I just wrote.

pbeckingham commented 6 years ago

I think the best way to hid start/stop annotations is to prevent them being created using rc.journal.time.