taskwarrior icon indicating copy to clipboard operation
taskwarrior copied to clipboard

When context is defined with negative tag filter it prepends "-<tag name> " to any task description when created within this context.

Open saavedra29 opened this issue 3 years ago • 2 comments

DIAGNOSTICS

task 2.6.1
   Platform: Linux

Compiler
    Version: 9.3.0
       Caps: +stdc +stdc_hosted +LP64 +c8 +i32 +l64 +vp64 +time_t64
 Compliance: C++17

Build Features
      CMake: 3.16.3
    libuuid: libuuid + uuid_unparse_lower
  libgnutls: 3.6.13
 Build type: release

Configuration
       File: /home/aris/.taskrc (found), 1710 bytes, mode 100664
       Data: /home/aris/.task_test2 (found), dir, mode 40755
    Locking: Enabled
         GC: Enabled
  rc.editor: vim
     Server: 
         CA: -
Certificate: -
        Key: -
      Trust: strict
    Ciphers: NORMAL
      Creds: 

Hooks
     System: Enabled
   Location: /home/aris/.task_test2/hooks
             (-none-)

Tests
   Terminal: 170x52
       Dups: Scanned 15 tasks for duplicate UUIDs:
             No duplicates found
 Broken ref: Scanned 15 tasks for broken references:
             No broken references found
  1. Define a context like task context define work -others
  2. Enter the context: task context work
  3. Create new task: task add New sample thing
  4. Run task

The output in the Description column should be New sample thing but instead is -others New sample thing

saavedra29 avatar Jan 04 '22 18:01 saavedra29

same issue here, has appeared with upgrade to 2.6.1 for me

Craskermasker avatar Aug 17 '22 11:08 Craskermasker

Found a solution for this - remove negative tag filters from the "write" config setting with:

task config context.{contextname}.write {only positive tag filters}

before: image

task config context.work.write +work or task config context.work.write

after: image

fixes the odd behaviour.

I presume this new behaviour will be eventually clarified in the documentation as well as with the little update message, but it could be more clear now.

Craskermasker avatar Aug 18 '22 20:08 Craskermasker