Skip to content

Commit

Permalink
Bugfix for legacy_matching.
Browse files Browse the repository at this point in the history
  • Loading branch information
ralphbean committed Feb 25, 2015
1 parent 2f7c880 commit b973e92
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bugwarrior/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@ def find_local_uuid(tw, keys, issue, legacy_matching=True):

if legacy_matching:
legacy_description = issue.get_default_description().rsplit('..', 1)[0]
# Furthermore, we have to kill off any single quotes which break in
# task-2.4.x, as much as it saddens me.

This comment has been minimized.

Copy link
@coddingtonbear

coddingtonbear Feb 26, 2015

Collaborator

😢 we really can't just escape them? If it's possible we could perhaps just use differing encoding functions given the version of Taskwarrior in use.

This comment has been minimized.

Copy link
@ralphbean

ralphbean Feb 26, 2015

Author Collaborator

I tried as many ways that I could think of on the command line and didn't find a way to escape them.

OH! But we could check the version of taskwarrior and only do this if we're in the presence of 2.4.x.

This comment has been minimized.

Copy link
@coddingtonbear

coddingtonbear Feb 26, 2015

Collaborator

Heh -- I'm not sure it's worth it at this point :-/.

I think, though, from a "future maintainability" perspective, that we should probably collect the ways that encoding differs between TW versions and modularize the encoding functionality into its own class so adding (and, much later, removing) fixes for specific TW versions is easier/clearer.

legacy_description = legacy_description.split("'")[0]
results = tw.filter_tasks({
'description.startswith': legacy_description,
'or': [
Expand Down

0 comments on commit b973e92

Please sign in to comment.