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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.0
2
2
  Name: brynq_sdk_jira
3
- Version: 3.0.3
3
+ Version: 3.0.4
4
4
  Summary: JIRA wrapper from BrynQ
5
5
  Home-page: UNKNOWN
6
6
  Author: BrynQ
@@ -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)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.0
2
2
  Name: brynq-sdk-jira
3
- Version: 3.0.3
3
+ Version: 3.0.4
4
4
  Summary: JIRA wrapper from BrynQ
5
5
  Home-page: UNKNOWN
6
6
  Author: BrynQ
@@ -2,7 +2,7 @@ from setuptools import setup, find_namespace_packages
2
2
 
3
3
  setup(
4
4
  name='brynq_sdk_jira',
5
- version='3.0.3',
5
+ version='3.0.4',
6
6
  description='JIRA wrapper from BrynQ',
7
7
  long_description='JIRA wrapper from BrynQ',
8
8
  author='BrynQ',
File without changes