taskwarrior icon indicating copy to clipboard operation
taskwarrior copied to clipboard

String attribute's value 'yes' interpreted as date

Open l0f4r0 opened this issue 4 years ago • 2 comments

I have the following UDA:

$ task show needfollowup
Config Variable                          Value         
uda.needfollowup.default                 no            
uda.needfollowup.label                   Need-Follow-Up
uda.needfollowup.type                    string        
uda.needfollowup.values                  yes,no        
urgency.uda.needfollowup.yes.coefficient 5

It's impossible to filter on its "yes" value:

$ task needfollowup:yes next
'no' is not a valid date in the 'Y-M-D' format.

NB: Those filters work nonetheless...:

$ task needfollowup:no next
$ task needfollowup.not:no next
$ task diag

task 2.5.3
   Platform: Linux

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

Build Features
      Built: Jan 25 2021 22:54:14
      CMake: 3.13.4
    libuuid: libuuid + uuid_unparse_lower
  libgnutls: n/a
 Build type: release

Configuration
       File: /home/l0f4r0/.taskrc (found), 2416 bytes, mode 100660
       Data: /home/l0f4r0/.task (found), dir, mode 40750
    Locking: Enabled
         GC: Enabled
    $EDITOR: /usr/bin/vim
     Server: 
         CA: -
Certificate: -
        Key: -
      Trust: strict
    Ciphers: NORMAL
      Creds: 

Hooks
     System: Enabled
   Location: /home/l0f4r0/.task/hooks
             (-none-)

Tests
   Terminal: 323x70
       Dups: Scanned 72 tasks for duplicate UUIDs:
             No duplicates found
 Broken ref: Scanned 72 tasks for broken references:
             No broken references found

l0f4r0 avatar Feb 14 '21 19:02 l0f4r0

Reproduced on 2.6.0. The underlying problem is that yes value gets interpreted as yesterday.

tbabej avatar Feb 15 '21 14:02 tbabej

@tbabej Apparently you fixed this in commit a1471b67fb65d9c6d90e3127a8ccf8c9b9b0694f (PR #2405) :)

drehak avatar May 08 '22 20:05 drehak