From 827de3d3a376e52f02747a58fd5373f872c15252 Mon Sep 17 00:00:00 2001 From: Gonchik Tsymzhitov Date: Thu, 23 Feb 2023 14:23:10 +0200 Subject: [PATCH] Jira: adjust add_attachment method --- atlassian/VERSION | 2 +- atlassian/jira.py | 4 ++-- docs/jira.rst | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/atlassian/VERSION b/atlassian/VERSION index 42d9670e6..e82a983df 100644 --- a/atlassian/VERSION +++ b/atlassian/VERSION @@ -1 +1 @@ -3.33.0 \ No newline at end of file +3.34.0 \ No newline at end of file diff --git a/atlassian/jira.py b/atlassian/jira.py index 89468b373..b82a0a4d7 100644 --- a/atlassian/jira.py +++ b/atlassian/jira.py @@ -1198,13 +1198,13 @@ def add_attachment(self, issue_key, filename): :param filename: str, name, if file in current directory or full path to file """ with open(filename, "rb") as attachment: - return self.add_attachment_object (issue_key, attachment) + return self.add_attachment_object(issue_key, attachment) def add_attachment_object(self, issue_key, attachment): """ Add attachment to Issue :param issue_key: str - :param attachment: IO object + :param attachment: IO Object """ log.warning("Adding attachment...") base_url = self.resource_url("issue") diff --git a/docs/jira.rst b/docs/jira.rst index 3db627d17..4f35362e3 100644 --- a/docs/jira.rst +++ b/docs/jira.rst @@ -331,6 +331,9 @@ Attachments actions # Add attachment to issue jira.add_attachment(issue_key, filename) + # Add attachment (IO Object) to issue + jira.add_attachment_object(issue_key, attachment) + Manage components -----------------