Repository: nephila/python-taiga

Issue:
Due_date is not in Issue allowed_params
## Description

`due_date` is not in `Issue` `allowed_params`.

Hints from issue comments:

Solution patch:
diff --git a/taiga/models/models.py b/taiga/models/models.py
index 75b43f7..76bfc26 100644
--- a/taiga/models/models.py
+++ b/taiga/models/models.py
@@ -959,6 +959,7 @@ class Issue(CustomAttributeResource, CommentableResource):
         "subject",
         "tags",
         "watchers",
+        "due_date",
     ]
 
     def list_attachments(self):
diff --git a/tox.ini b/tox.ini
index 4c2320c..8f107e1 100644
--- a/tox.ini
+++ b/tox.ini
@@ -9,7 +9,6 @@ envlist =
     pypi-description
     towncrier
     py{311,310,39}
-    py{311,310,39}
 
 [testenv]
 commands = {env:COMMAND:python} -m pytest {posargs}


Test patch:
diff --git a/tests/test_issues.py b/tests/test_issues.py
index 15d6edd..c709026 100644
--- a/tests/test_issues.py
+++ b/tests/test_issues.py
@@ -2,7 +2,7 @@ import unittest
 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
@@ -96,3 +96,17 @@ class TestIssues(unittest.TestCase):
         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},
+        )