My Jira projects do not return subtasks, which causes the exception pasted below.
I can fix this issue by wrapping the return statement on jira.py line 267 in an if condition.
What is the right solution here? Is it a configuration issue on my side, or should I submit a PR?
Traceback (most recent call last):
File "/usr/bin/bugwarrior-pull", line 33, in <module>
sys.exit(load_entry_point('bugwarrior==1.8.0', 'console_scripts', 'bugwarrior-pull')())
File "/usr/lib/python3.9/site-packages/click/core.py", line 1137, in __call__
return self.main(*args, **kwargs)
File "/usr/lib/python3.9/site-packages/click/core.py", line 1062, in main
rv = self.invoke(ctx)
File "/usr/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib/python3.9/site-packages/click/core.py", line 763, in invoke
return __callback(*args, **kwargs)
File "/usr/lib/python3.9/site-packages/bugwarrior/command.py", line 73, in pull
synchronize(issue_generator, config, main_section, dry_run)
File "/usr/lib/python3.9/site-packages/bugwarrior/db.py", line 360, in synchronize
issue_dict = dict(issue)
File "/usr/lib/python3.9/site-packages/bugwarrior/services/__init__.py", line 414, in keys
return list(self.__iter__())
File "/usr/lib/python3.9/site-packages/bugwarrior/services/__init__.py", line 409, in __iter__
record = self.get_taskwarrior_record()
File "/usr/lib/python3.9/site-packages/bugwarrior/services/__init__.py", line 305, in get_taskwarrior_record
self._taskwarrior_record = self.to_taskwarrior()
File "/usr/lib/python3.9/site-packages/bugwarrior/services/jira.py", line 144, in to_taskwarrior
self.SUBTASKS: self.get_subtasks(),
File "/usr/lib/python3.9/site-packages/bugwarrior/services/jira.py", line 267, in get_subtasks
if not self.record['fields']['subtasks']:
KeyError: 'subtasks'
My Jira projects do not return
subtasks
, which causes the exception pasted below. I can fix this issue by wrapping the return statement on jira.py line 267 in an if condition.What is the right solution here? Is it a configuration issue on my side, or should I submit a PR?