From ca68f6de561cbe5f1e528260eff30ff5943cd39e Mon Sep 17 00:00:00 2001 From: Gauvain Pocentek Date: Sun, 19 Jun 2016 20:12:52 +0200 Subject: project issue: proper update attributes --- gitlab/objects.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'gitlab/objects.py') diff --git a/gitlab/objects.py b/gitlab/objects.py index fe69fff..bdadd38 100644 --- a/gitlab/objects.py +++ b/gitlab/objects.py @@ -1038,9 +1038,11 @@ class ProjectIssue(GitlabObject): 'sort'] requiredUrlAttrs = ['project_id'] requiredCreateAttrs = ['title'] - # FIXME: state_event is only valid with update optionalCreateAttrs = ['description', 'assignee_id', 'milestone_id', - 'labels', 'state_event'] + 'labels', 'created_at'] + optionalUpdateAttrs = ['title', 'description', 'assignee_id', + 'milestone_id', 'labels', 'created_at', + 'state_event'] shortPrintAttr = 'title' managers = [('notes', ProjectIssueNoteManager, [('project_id', 'project_id'), ('issue_id', 'id')])] @@ -1054,7 +1056,8 @@ class ProjectIssue(GitlabObject): labels = ", ".join(self.labels) extra_parameters['labels'] = labels - return super(ProjectIssue, self)._data_for_gitlab(extra_parameters) + return super(ProjectIssue, self)._data_for_gitlab(extra_parameters, + update) def Note(self, id=None, **kwargs): warnings.warn("`Note` is deprecated, use `notes` instead", -- cgit v1.2.1