From 10d12b6c0ffaebea83656c80fe5a8b64ffebf5bc Mon Sep 17 00:00:00 2001 From: Gonchik Tsymzhitov Date: Fri, 30 Aug 2024 10:04:38 +0300 Subject: [PATCH] Revert "Add: Remote link: Application (#1429)" (#1447) This reverts commit 4780accfad234b74d459a51e4bc8742b3ebe7b71. --- atlassian/jira.py | 4 ---- .../jira/rest/api/2/issue/FOO-123/remotelink/POST | 4 ---- tests/test_jira.py | 15 --------------- 3 files changed, 23 deletions(-) delete mode 100644 tests/responses/jira/rest/api/2/issue/FOO-123/remotelink/POST diff --git a/atlassian/jira.py b/atlassian/jira.py index 3d2b5ce7a..6a283f3e7 100644 --- a/atlassian/jira.py +++ b/atlassian/jira.py @@ -1776,7 +1776,6 @@ def create_or_update_issue_remote_links( icon_url=None, icon_title=None, status_resolved=False, - application: dict = {}, ): """ Add Remote Link to Issue, update url if global_id is passed @@ -1788,7 +1787,6 @@ def create_or_update_issue_remote_links( :param icon_url: str, OPTIONAL: Link to a 16x16 icon representing the type of the object in the remote system :param icon_title: str, OPTIONAL: Text for the tooltip of the main icon describing the type of the object in the remote system :param status_resolved: bool, OPTIONAL: if set to True, Jira renders the link strikethrough - :param application: dict, OPTIONAL: Application description """ base_url = self.resource_url("issue") url = "{base_url}/{issue_key}/remotelink".format(base_url=base_url, issue_key=issue_key) @@ -1804,8 +1802,6 @@ def create_or_update_issue_remote_links( if icon_title: icon_data["title"] = icon_title data["object"]["icon"] = icon_data - if application: - data["application"] = application return self.post(url, data=data) def get_issue_remote_link_by_id(self, issue_key, link_id): diff --git a/tests/responses/jira/rest/api/2/issue/FOO-123/remotelink/POST b/tests/responses/jira/rest/api/2/issue/FOO-123/remotelink/POST deleted file mode 100644 index 5ba096508..000000000 --- a/tests/responses/jira/rest/api/2/issue/FOO-123/remotelink/POST +++ /dev/null @@ -1,4 +0,0 @@ -responses['{"issue_key": "FOO-123", "link_url": "https://confluence.atlassian-python.atlassian.net/display/Test", "title": "Unused link text", "global_id": "appId=00000000-0000-0000-0000-000000000000&pageId=0", application={"type": "com.atlassian.confluence", "name": "Confluence"}}'] = { - "id": 10000, - "self": "https://atlassian-python.atlassian.net/rest/api/2/issue/FOO-123/remotelink/10000", -} diff --git a/tests/test_jira.py b/tests/test_jira.py index 4cc6df8c9..571bdfc03 100644 --- a/tests/test_jira.py +++ b/tests/test_jira.py @@ -92,18 +92,3 @@ def test_delete_issue_property_not_found(self): self.jira.get_issue_property("FOO-123", "NotFoundBar1") with self.assertRaises(HTTPError): self.jira.get_issue_property("FOONotFound-123", "NotFoundBar1") - - def test_post_issue_remotelink(self): - """Create a new Confluence remote link""" - resp = self.jira.create_or_update_issue_remote_links( - "FOO-123", - "https://confluence.atlassian-python.atlassian.net/display/Test", - "Unused link text", - global_id="appId=00000000-0000-0000-0000-000000000000&pageId=0", - application={ - "type": "com.atlassian.confluence", - "name": "Confluence", - }, - ) - self.assertEqual(resp["id"], "10000") - self.assertEqual(resp["self"], "https://atlassian-python.atlassian.net/rest/api/2/issue/FOO-123/remotelink/10000")