diff --git a/bugwarrior/db.py b/bugwarrior/db.py index 1d7ab2649..71c787bcf 100644 --- a/bugwarrior/db.py +++ b/bugwarrior/db.py @@ -321,6 +321,8 @@ def _bool_option(section, option, default): ) legacy_matching = _bool_option(main_section, 'legacy_matching', 'True') + merge_annotations = _bool_option(main_section, 'merge_annotations', 'True') + merge_tags = _bool_option(main_section, 'merge_tags', 'True') issue_updates = { 'new': [], @@ -345,8 +347,11 @@ def _bool_option(section, option, default): del issue_dict[field] # Merge annotations & tags from online into our task object - merge_left('annotations', task, issue_dict, hamming=True) - merge_left('tags', task, issue_dict) + if merge_annotations: + merge_left('annotations', task, issue_dict, hamming=True) + + if merge_tags: + merge_left('tags', task, issue_dict) issue_dict.pop('annotations', None) issue_dict.pop('tags', None) diff --git a/bugwarrior/docs/common_configuration.rst b/bugwarrior/docs/common_configuration.rst index 40f2c437f..99a3f9a80 100644 --- a/bugwarrior/docs/common_configuration.rst +++ b/bugwarrior/docs/common_configuration.rst @@ -25,6 +25,10 @@ Optional options include: written. By default, logging messages will be written to stderr. * ``annotation_length``: Import maximally this number of characters of incoming annotations. Default: 45. +* ``merge_annotations``: If ``False``, bugwarrior won't bother with adding + annotations to your tasks at all. Default: ``True``. +* ``merge_tags``: If ``False``, bugwarrior won't bother with adding + tags to your tasks at all. Default: ``True``. In addition to the ``[general]`` section, sections may be named ``[flavor.myflavor]`` and may be selected using the ``--flavor`` option to