taskwarrior icon indicating copy to clipboard operation
taskwarrior copied to clipboard

Modifying a task's project name to a string starting with "project" does not work

Open fmauch opened this issue 2 years ago • 1 comments

Before anything else: Thank you for this amazing task manager. I've been using it quite a while now and I love it!

  • What command(s) did you run?
    • task add pro:foo bar task -> generates task 1
    • task 1 modify project:"project-new"
  • What did you expect to happen? I would expect that the task's project changes to "project-new"
  • What actually happened? The task's project changed to "foo-new"
  • Paste the output of the task diag command.
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
     Commit: e0f598f91
      CMake: 3.16.3
    libuuid: libuuid + uuid_unparse_lower
  libgnutls: 3.6.13
 Build type: Release

Configuration
       File: /home/mauch/.taskrc (found), 5907 bytes, mode 100664
       Data: /home/mauch/.task (found), dir, mode 40755
    Locking: Enabled
         GC: Enabled
    $VISUAL: vim
     Server:
         CA: -
Certificate: -
        Key: -
      Trust: strict
    Ciphers: NORMAL
      Creds:

Hooks
     System: Enabled
   Location: /home/mauch/.task/hooks
     Active: on-modify.timewarrior (executable)
   Inactive:

Tests
   Terminal: 475x121
       Dups: Scanned 4111 tasks for duplicate UUIDs:
             No duplicates found
 Broken ref: Scanned 4111 tasks for broken references:
             No broken references found

Is this desired behavior? I mean, it sounds reasonable that you can reference the task's project name, but simply replacing the word "project" with the project name seems a bit much for me.

fmauch avatar Feb 21 '22 10:02 fmauch

It is definitely unintentional consequence of how the DOM model currently works. Useful in certain cases (i.e. with due or wait attributes), less useful in others, like in this one. Happy to gather feedback on what to do - perhaps this should be limited to a certain (configurable) list of attributes, or only attributes of certain types.

tbabej avatar Mar 14 '22 05:03 tbabej