Skip to content
Merged
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
1 change: 1 addition & 0 deletions changes/196.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add missing due_date to Issue allowed_params
1 change: 1 addition & 0 deletions taiga/models/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -959,6 +959,7 @@ class Issue(CustomAttributeResource, CommentableResource):
"subject",
"tags",
"watchers",
"due_date",
]

def list_attachments(self):
Expand Down
16 changes: 15 additions & 1 deletion tests/test_issues.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from unittest.mock import patch

from taiga.exceptions import TaigaException
from taiga.models import Issue, Issues
from taiga.models import Issue, Issues, Project
from taiga.requestmaker import RequestMaker

from .tools import MockResponse, create_mock_json
Expand Down Expand Up @@ -96,3 +96,17 @@ def test_add_comment(self, mock_update):
issue = Issue(rm, id=1)
issue.add_comment("hola")
mock_update.assert_called_with(comment="hola")

@patch("taiga.requestmaker.RequestMaker.put")
def test_due_date_is_in_issue_update_payload(self, mock_update):
rm = RequestMaker("/api/v1", "fakehost", "faketoken")
project = Project(rm, id=1)
issue = Issue(rm, id=1, project=project.id)
issue.due_date = "2025-01-22"
issue.update()
mock_update.assert_called_with(
"/{endpoint}/{id}",
endpoint=Issue.endpoint,
id=issue.id,
payload={"project": project.id, "due_date": issue.due_date},
)
1 change: 0 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ envlist =
pypi-description
towncrier
py{311,310,39}
py{311,310,39}

[testenv]
commands = {env:COMMAND:python} -m pytest {posargs}
Expand Down
Loading