Skip to content

Commit fccfc4b

Browse files
committed
Insight: Adjust methods
1 parent ab59163 commit fccfc4b

File tree

4 files changed

+18
-14
lines changed

4 files changed

+18
-14
lines changed

atlassian/VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.29.0
1+
3.29.1

atlassian/__init__.py

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
from .portfolio import Portfolio
1111
from .service_desk import ServiceDesk
1212
from .xray import Xray
13-
from .insight import Insight
1413

1514

1615
__all__ = [

atlassian/confluence.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1510,6 +1510,8 @@ def update_page(
15101510
:param full_width: OPTIONAL: Default False
15111511
:return:
15121512
"""
1513+
# update current page
1514+
params = {'status': 'current'}
15131515
log.info('Updating {type} "{title}" with {parent_id}'.format(title=title, type=type, parent_id=parent_id))
15141516

15151517
if not always_update and body is not None and self.is_page_content_is_already_updated(page_id, body, title):
@@ -1543,7 +1545,7 @@ def update_page(
15431545
data["metadata"]["properties"]["content-appearance-draft"] = {"value": "full-width"}
15441546
data["metadata"]["properties"]["content-appearance-published"] = {"value": "full-width"}
15451547
try:
1546-
response = self.put("rest/api/content/{0}?status=current".format(page_id), data=data)
1548+
response = self.put("rest/api/content/{0}".format(page_id), data=data, params=params)
15471549
except HTTPError as e:
15481550
if e.response.status_code == 400:
15491551
raise ApiValueError(

atlassian/insight.py

+14-11
Original file line numberDiff line numberDiff line change
@@ -427,11 +427,14 @@ def get_object_connected_tickets(self, object_id):
427427
url = self.url_joiner(self.api_root, "objectconnectedtickets/{id}/tickets".format(id=object_id))
428428
return self.get(url)
429429

430-
# Objectschema
430+
# Object schema
431+
@deprecated(version="3.29.1", reason="Use list_object_schema()")
431432
def list_objectschema(self):
433+
return self.list_object_schema()
434+
435+
def list_object_schema(self):
432436
"""
433437
Resource to find object schemas in Insight
434-
435438
:return:
436439
{
437440
"objectschemas": [
@@ -451,43 +454,43 @@ def list_objectschema(self):
451454
url = self.url_joiner(self.api_root, "objectschema/list")
452455
return self.get(url)
453456

454-
def create_objectschema(self, object_schema_key, description):
457+
def create_object_schema(self, object_schema_key, description):
455458
raise NotImplementedError
456459

460+
@deprecated(version="3.29.1", reason="Use get_objectschema()")
457461
def get_objectschema(self, schema_id):
462+
return self.get_objectschema(schema_id=schema_id)
463+
464+
def get_object_schema(self, schema_id):
458465
"""
459466
Find a schema by id
460-
461467
:param schema_id:
462468
"""
463469
url = self.url_joiner(self.api_root, "objectschema/{id}".format(id=schema_id))
464470
return self.get(url)
465471

466-
def update_objectschema(self, schema_id):
472+
def update_object_schema(self, schema_id):
467473
"""
468474
Update an object schema
469-
470475
"""
471476
raise NotImplementedError
472477

473-
def delete_objectschema(self, schema_id):
478+
def delete_object_schema(self, schema_id):
474479
"""
475480
Delete a schema
476481
477482
"""
478483
raise NotImplementedError
479484

480-
def get_objectschema_attributes(self, schema_id):
485+
def get_object_schema_attributes(self, schema_id):
481486
"""
482487
Find all object type attributes for this object schema
483-
484488
"""
485489
raise NotImplementedError
486490

487-
def get_objectschema_objecttypes_flat(self, schema_id):
491+
def get_object_schema_object_types_flat(self, schema_id):
488492
"""
489493
Find all object types for this object schema
490-
491494
"""
492495
raise NotImplementedError
493496

0 commit comments

Comments
 (0)