tbabej / vit

Placeholder to demostrate issue porting for VIT.
0 stars 0 forks source link

[VT-123] Pressing the D key on an annotation asks for (and performs) task deletion. #122

Closed tbabej closed 6 years ago

tbabej commented 6 years ago

Terran Air on 2015-08-08T07:27:04Z says:

Tested this on Arch Linux. Tested on taskwarrior 2.4.4, vit 1.2, 1.3, vit-master. When over an annotation and pressing the delete key (Shift-d/D) the annotation is treated as its parent task. The task and the annotation are both deleted. This bug DOES NOT occur on taskwarrior 2.2.0 (an older arch package I have).

tbabej commented 6 years ago

Migrated metadata:

Created: 2015-08-08T07:27:04Z
Modified: 2016-08-09T06:41:58Z
tbabej commented 6 years ago

Scott Kostyshak on 2015-08-08T16:35:30Z says:

Thanks a lot for the feedback, Terran Air!

I can indeed reproduce. It is probably just a regex that no longer matches so it does not detect the annotation. It is bugs like these that make me ashamed of not having implemented tests yet. I hope to get to them eventually.

I'm marking priority as "major" (regressions for me are almost by definition major, whether they occur because of a new Taskwarrior version or a change in Vit itself) and marking the version in which a fix should be released as 1.3.

Thanks for testing!

tbabej commented 6 years ago

Scott Kostyshak on 2015-08-08T16:35:53Z says:

Note to self: make sure that the fix still works for older Taskwarrior versions.

tbabej commented 6 years ago

Terran Air on 2015-08-10T10:10:03Z says:

Awesome. Can't wait for the fix. Does 1.3 have a release date? Based on the commit history, 1.3 seems to be just a branch. Can't find a roadmap. (Derp! Nevermind! Found it!) I've only started using vit recently, but am in love with it already. This tool is awesome. Keep up the great work.

tbabej commented 6 years ago

Terran Air on 2015-08-10T13:05:55Z says:

Think I found the fix! The date format has been changed at some point. Old (your hard code) is m/D/Y annotation New (tw 2.4.4) is Y-M-D annotation The code is in cmds.pl on line 63.

Add dateformat=m/D/Y to the bottom of ~/.taskrc and update taskwarrior and see it work.

The code has to read the dateformat variable in ~/.taskrc regardless of what it is (make it dynamic), because certain strings (user-definable) break the parsing as it is now (static/hardcoded). Anotations are slightly indented, maybe that could work. I have no idea how to help with that sorry. For now just switch to the new format: Y-M-D (new ~/.taskrc). Good luck and thanks!

tbabej commented 6 years ago

Scott Kostyshak on 2015-08-10T15:50:17Z says:

Great thank you for digging in and figuring that out! I appreciate that.

No release date for 1.3 yet. I have lagged on it, but hope to get back to it soon.

Thanks for the help and keep the feedback coming.

tbabej commented 6 years ago

Scott Kostyshak on 2015-10-08T04:41:06Z says:

Fixed at e6babf5c.

tbabej commented 6 years ago

mehturt on 2016-08-08T14:54:08Z says:

Hi all, I just started to use taskwarrior with vit today. I came across this same issue. Is there a workaround for tw 2.3.0 and vit 1.2 (Debian stable)? Thanks.

tbabej commented 6 years ago

Scott Kostyshak on 2016-08-08T16:24:01Z says:

Hi mehturt, I would recommend using the 1.3 branch of VIT. Several bugs have been fixed and it is quite stable. Hopefully a beta will be released soon. There is no compiling necessary and I don't think you'd have to install any extra dependencies. Just do a git clone, git checkout 1.3, ./configure, make, make install.

If you don't want to do that for some reason, here is the diff of the fix, which you can apply manually to your VIT executable (you cannot apply the diff to the executable with patch, just search for the relevant line and replace it with the new line):

{code} diff --git a/cmds.pl b/cmds.pl index e84f1ab..fc38566 100644

tbabej commented 6 years ago

mehturt on 2016-08-09T06:41:58Z says:

Thanks, I replaced that regexp manually and it works.