GothenburgBitFactory / bugwarrior

Pull github, bitbucket, and trac issues into taskwarrior
http://pypi.python.org/pypi/bugwarrior
GNU General Public License v3.0
732 stars 209 forks source link

Per-service static_fields. Resolve #659. #908

Open ryneeverett opened 2 years ago

ryneeverett commented 2 years ago

Add a static_fields option to Common Service Configuration Options. This enables users to differ behavior of core UDA names (e.g., "description") amongst services.

The tests fail because we're currently able to test db.synchronize using regular dicts as issues whereas in a real bugwarrior pull these are Issue instances. This PR is awaiting a much-needed refactor of db.synchronize which will break this monstrous function into more testable components.

ryneeverett commented 1 year ago

While restructuring db.synchronize would still be a nice step, I think a simpler architectural improvement which would also unblock this for testing purposes would be to make the Issue class private to the services subpackage which can return simple dicts instead. This not only makes testing easier but eliminates unnecessary coupling between services and db.