Skip to content

Jira: Rename tempo_4_timesheets_find_worklogs params (#1273) #1275

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions atlassian/jira.py
Original file line number Diff line number Diff line change
Expand Up @@ -4111,12 +4111,12 @@ def tempo_timesheets_get_worklogs(
return self.get(url, params=params)

# noinspection PyIncorrectDocstring
def tempo_4_timesheets_find_worklogs(self, **params):
def tempo_4_timesheets_find_worklogs(self, date_from=None, date_to=None, **params):
"""
Find existing worklogs with searching parameters.
NOTE: check if you are using correct types for the parameters!
:param from: string From Date
:param to: string To Date
:param date_from: string From Date
:param date_to: string To Date
:param worker: Array of strings
:param taskId: Array of integers
:param taskKey: Array of strings
Expand All @@ -4138,6 +4138,11 @@ def tempo_4_timesheets_find_worklogs(self, **params):
:param offset: integer
"""

if date_from:
params["from"] = date_from
if date_to:
params["to"] = date_to

url = "rest/tempo-timesheets/4/worklogs/search"
return self.post(url, data=params)

Expand Down
6 changes: 3 additions & 3 deletions docs/jira.rst
Original file line number Diff line number Diff line change
Expand Up @@ -539,8 +539,8 @@ TEMPO
# Look at the tempo docs for additional information:
# https://www.tempo.io/server-api-documentation/timesheets#operation/searchWorklogs
# NOTE: check if you are using correct types for the parameters!
# :param from: string From Date
# :param to: string To Date
# :param date_from: string From Date
# :param date_to: string To Date
# :param worker: Array of strings
# :param taskId: Array of integers
# :param taskKey: Array of strings
Expand All @@ -560,7 +560,7 @@ TEMPO
# :param pageNo: integer
# :param maxResults: integer
# :param offset: integer
jira.tempo_4_timesheets_find_worklogs(**params)
jira.tempo_4_timesheets_find_worklogs(date_from=None, date_to=None, **params)

# :PRIVATE:
# Get Tempo timesheet worklog by issue key or id.
Expand Down