Skip to content

Commit

Permalink
JIRA: Use explicit due date, if set.
Browse files Browse the repository at this point in the history
  • Loading branch information
ralphbean committed May 6, 2019
1 parent 8725ae5 commit 92d6080
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bugwarrior/services/jira.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@ def get_tags(self):
return self._get_tags_from_labels() + self._get_tags_from_sprints()

def get_due(self):
# If the duedate is explicitly set on the issue, then use that.
if self.record['fields'].get('duedate'):
return self.parse_date(self.record['fields']['duedate'])
# Otherwise, if the issue is in a sprint, use the end date of that sprint.
sprints = self.__get_sprints()
for sprint in filter(lambda e: e.get('state') != 'CLOSED', sprints):
endDate = sprint['endDate']
Expand Down

0 comments on commit 92d6080

Please sign in to comment.