Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions bugwarrior/services/linear.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ def to_taskwarrior(self):
created = self.parse_date(self.record.get("createdAt"))
modified = self.parse_date(self.record.get("updatedAt"))
closed = self.parse_date(self.record.get("completedAt"))
due = self.parse_date(self.record.get("dueDate"))

# Get a value, defaulting empty results to the given default. Some
# GraphQL response values, such as for `project`, are either an object
Expand All @@ -94,6 +95,7 @@ def get(v, k, default=None):
or None
),
"priority": self.get_priority(),
"due": due,
"entry": created,
"annotations": get(self.extra, "annotations", []),
"tags": self.get_tags(),
Expand Down Expand Up @@ -169,6 +171,7 @@ def __init__(self, *args, **kwargs):
completedAt
updatedAt
createdAt
dueDate
project {
name
}
Expand Down
5 changes: 5 additions & 0 deletions tests/test_linear.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"completedAt": null,
"updatedAt": "2025-07-24T17:08:33.286Z",
"createdAt": "2025-07-24T15:34:07.968Z",
"dueDate": "2025-08-22",
"project": null,
"labels": {
"nodes": [
Expand Down Expand Up @@ -146,6 +147,7 @@ def test_to_taskwarrior(self):
expected_output = {
"project": "prj",
"priority": "L",
"due": None,
"entry": created_timestamp,
"annotations": [],
"tags": [],
Expand All @@ -170,9 +172,11 @@ def test_to_taskwarrior(self):

created_timestamp = datetime(2025, 7, 24, 15, 34, 7, 0, tzinfo=timezone.utc)
updated_timestamp = datetime(2025, 7, 24, 17, 8, 33, 0, tzinfo=timezone.utc)
due_timestamp = datetime(2025, 8, 22, 0, 0, 0, 0, tzinfo=timezone.utc)
expected_output = {
"project": None,
"priority": "H",
"due": due_timestamp,
"entry": created_timestamp,
"annotations": [],
"tags": ["Improvement", "Feature"],
Expand Down Expand Up @@ -202,6 +206,7 @@ def test_issues(self):
"annotations": [],
"description": "(bw)#DUS-5 - DO STUFF .. "
"https://linear.app/dustins-doings/issue/DUS-5/do-stuff",
"due": None,
"entry": created_timestamp,
"linearassignee": "djmitche@gmail.com",
"linearclosed": closed_timestamp,
Expand Down
Loading