brynq-sdk-jira 3.0.3__tar.gz → 3.0.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {brynq_sdk_jira-3.0.3 → brynq_sdk_jira-3.0.4}/PKG-INFO +1 -1
- {brynq_sdk_jira-3.0.3 → brynq_sdk_jira-3.0.4}/brynq_sdk_jira/jira.py +19 -0
- {brynq_sdk_jira-3.0.3 → brynq_sdk_jira-3.0.4}/brynq_sdk_jira/tempo.py +22 -0
- {brynq_sdk_jira-3.0.3 → brynq_sdk_jira-3.0.4}/brynq_sdk_jira.egg-info/PKG-INFO +1 -1
- {brynq_sdk_jira-3.0.3 → brynq_sdk_jira-3.0.4}/setup.py +1 -1
- {brynq_sdk_jira-3.0.3 → brynq_sdk_jira-3.0.4}/brynq_sdk_jira/__init__.py +0 -0
- {brynq_sdk_jira-3.0.3 → brynq_sdk_jira-3.0.4}/brynq_sdk_jira.egg-info/SOURCES.txt +0 -0
- {brynq_sdk_jira-3.0.3 → brynq_sdk_jira-3.0.4}/brynq_sdk_jira.egg-info/dependency_links.txt +0 -0
- {brynq_sdk_jira-3.0.3 → brynq_sdk_jira-3.0.4}/brynq_sdk_jira.egg-info/not-zip-safe +0 -0
- {brynq_sdk_jira-3.0.3 → brynq_sdk_jira-3.0.4}/brynq_sdk_jira.egg-info/requires.txt +0 -0
- {brynq_sdk_jira-3.0.3 → brynq_sdk_jira-3.0.4}/brynq_sdk_jira.egg-info/top_level.txt +0 -0
- {brynq_sdk_jira-3.0.3 → brynq_sdk_jira-3.0.4}/setup.cfg +0 -0
|
@@ -162,3 +162,22 @@ class Jira(BrynQ):
|
|
|
162
162
|
|
|
163
163
|
df = pd.json_normalize(all_users)
|
|
164
164
|
return df
|
|
165
|
+
|
|
166
|
+
def update_issue(self, issue, fields : dict):
|
|
167
|
+
try:
|
|
168
|
+
url = f"{self.base_url}rest/api/3/issue/{issue}"
|
|
169
|
+
payload = {
|
|
170
|
+
"fields" : fields
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
resp = requests.put(
|
|
174
|
+
url,
|
|
175
|
+
json= payload,
|
|
176
|
+
headers= self.headers,
|
|
177
|
+
timeout=60
|
|
178
|
+
)
|
|
179
|
+
|
|
180
|
+
return resp
|
|
181
|
+
except Exception as e:
|
|
182
|
+
message = "Error updating issue"
|
|
183
|
+
return message
|
|
@@ -260,6 +260,28 @@ class Tempo(BrynQ):
|
|
|
260
260
|
|
|
261
261
|
return total_response
|
|
262
262
|
|
|
263
|
+
def update_worklog(self, worklog_id: Union[str, int], data: Union[str, dict]) -> requests.Response:
|
|
264
|
+
"""
|
|
265
|
+
Updates a Tempo worklog by ID.
|
|
266
|
+
|
|
267
|
+
Args:
|
|
268
|
+
worklog_id (str | int): ID of the worklog to update.
|
|
269
|
+
data (str | dict): The payload to send in the update request (JSON string or dict).
|
|
270
|
+
|
|
271
|
+
Returns:
|
|
272
|
+
requests.Response: The HTTP response object from Tempo API.
|
|
273
|
+
"""
|
|
274
|
+
url = f"https://api.tempo.io/4/worklogs/{worklog_id}"
|
|
275
|
+
|
|
276
|
+
# Ensure we send valid JSON
|
|
277
|
+
if isinstance(data, dict):
|
|
278
|
+
payload = json.dumps(data)
|
|
279
|
+
else:
|
|
280
|
+
payload = data
|
|
281
|
+
|
|
282
|
+
response = requests.put(url, headers=self.headers, data=payload, timeout=self.timeout)
|
|
283
|
+
return response
|
|
284
|
+
|
|
263
285
|
def _chunk_list(self, data_list, chunk_size):
|
|
264
286
|
"""Splits a list into chunks of `chunk_size`."""
|
|
265
287
|
it = iter(data_list)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|