Skip to content

Commit 4ed0d44

Browse files
authored
Jira: updated worklog urls (#1239)
* Jira: updated worklog urls to 'resource_url' to work with 'api_version' configuration * Jira: Added function to get deleted worklogs. --------- Co-authored-by: Bertsjuhn <>
1 parent 1036d5c commit 4ed0d44

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

atlassian/jira.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1680,7 +1680,7 @@ def get_updated_worklogs(self, since, expand=None):
16801680
:param expand: Use expand to include additional information about worklogs in the response.
16811681
This parameter accepts properties that returns the properties of each worklog.
16821682
"""
1683-
url = "rest/api/3/worklog/updated"
1683+
url = self.resource_url("worklog/updated")
16841684
params = {}
16851685
if since:
16861686
params["since"] = str(int(since * 1000))
@@ -1689,6 +1689,18 @@ def get_updated_worklogs(self, since, expand=None):
16891689

16901690
return self.get(url, params=params)
16911691

1692+
def get_deleted_worklogs(self, since):
1693+
"""
1694+
Returns a list of IDs and timestamps for worklogs deleted after a date and time.
1695+
:param since: The date and time, as a UNIX timestamp in milliseconds, after which deleted worklogs are returned.
1696+
"""
1697+
url = self.resource_url("worklog/deleted")
1698+
params = {}
1699+
if since:
1700+
params["since"] = str(int(since * 1000))
1701+
1702+
return self.get(url, params=params)
1703+
16921704
def get_worklogs(self, ids, expand=None):
16931705
"""
16941706
Returns worklog details for a list of worklog IDs.
@@ -1697,7 +1709,7 @@ def get_worklogs(self, ids, expand=None):
16971709
:param ids: REQUIRED A list of worklog IDs.
16981710
"""
16991711

1700-
url = "rest/api/3/worklog/list"
1712+
url = self.resource_url("worklog/list")
17011713
params = {}
17021714
if expand:
17031715
params["expand"] = expand

0 commit comments

Comments
 (0)