Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass Description as Positional Argument #135

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

ryneeverett
Copy link
Contributor

Based on #131 so the tests will pass and #134 so I can run the test suite without corrupting my local database.

Similarly to #134, passing description via description:{description}
doesn't appear to be documented and can lead to problems.

See GothenburgBitFactory/bugwarrior#733 and consider the following scenario:

$ task --version
2.5.1
$ task add description:"depends filter does not work with ID"
The expression could not be evaluated.
$ task add "depends filter does not work with ID"
Created task 1.

I've tried variations of the previous with various quoting and shells
and have gotten the same result.

@ryneeverett ryneeverett changed the title Positional description Pass Description as Positional Argument Jun 6, 2020
ryneeverett added a commit to ryneeverett/bugwarrior that referenced this pull request Jun 6, 2020
See GothenburgBitFactory#733. I don't foresee
this being fixable from bugwarrior but could be worked around in
taskwarrior.

I confirmed that this does pass with ralphbean/taskw#135.
ryneeverett added a commit to ryneeverett/bugwarrior that referenced this pull request Jun 6, 2020
See GothenburgBitFactory#733. I don't foresee
this being fixable from bugwarrior but could be worked around in
taskw.

I confirmed that this does pass with ralphbean/taskw#135.
taskw/utils.py Outdated
@@ -134,7 +134,7 @@ def encode_task_experimental(task):
task[k] = encode_task_value(k, task[k])

# Then, format it as a string
return [
return [task.pop('description')] + [
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a little confused about this one -- won't this cause us to not encode the task description in the generated task?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The diff on this line looks a bit strange but if you look closely you'll see it's removing the description from the task dictionary and prepending it as a list item, so it is passed positionaly rather than in key:value format.

@ryneeverett ryneeverett force-pushed the positional-description branch from 57fa60f to 67e4353 Compare December 7, 2020 16:08
Similarly to ralphbean#134, passing description via description:{description}
doesn't appear to be documented and can lead to problems.

See GothenburgBitFactory/bugwarrior#733 and consider the following scenario:

```sh
$ task --version
2.5.1
$ task add description:"depends filter does not work with ID"
The expression could not be evaluated.
$ task add "depends filter does not work with ID"
Created task 1.
```

I've tried variations of the previous with various quoting and shells
and have gotten the same result.
@ryneeverett ryneeverett force-pushed the positional-description branch 2 times, most recently from 1ac1360 to 008bb90 Compare December 9, 2020 21:53
ryneeverett added a commit to ryneeverett/bugwarrior that referenced this pull request Apr 27, 2022
See GothenburgBitFactory#733. I don't foresee
this being fixable from bugwarrior but could be worked around in
taskw.

I confirmed that this does pass with ralphbean/taskw#135.
ryneeverett added a commit to ryneeverett/bugwarrior that referenced this pull request Apr 28, 2022
See GothenburgBitFactory#733. I don't foresee
this being fixable from bugwarrior but could be worked around in
taskw.

I confirmed that this does pass with ralphbean/taskw#135.
ryneeverett added a commit to ryneeverett/bugwarrior that referenced this pull request Apr 28, 2022
See GothenburgBitFactory#733. I don't foresee
this being fixable from bugwarrior but could be worked around in
taskw.

I confirmed that this does pass with ralphbean/taskw#135.
ryneeverett added a commit to ryneeverett/bugwarrior that referenced this pull request Apr 28, 2022
See GothenburgBitFactory#733. I don't foresee
this being fixable from bugwarrior but could be worked around in
taskw.

I confirmed that this does pass with ralphbean/taskw#135.

I've also confirmed that it passes with now that I've upgraded to
taskwarrior-2.6.1. It seems that everyone, including myself, who
reproduced this issue in the past was using taskwarrior-2.5.1.
@ryneeverett
Copy link
Contributor Author

This workaround was necessary for taskwarrior-2.5.1 but I've verified that it is no longer necessary as of at least taskwarrior-2.6.1. (I haven't gone to the effort of bisecting between the two.) At this point I wouldn't mind if this was closed as wontfix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants