diff --git a/atlassian/VERSION b/atlassian/VERSION index d26daf738..0805a14b4 100644 --- a/atlassian/VERSION +++ b/atlassian/VERSION @@ -1 +1 @@ -3.41.1 +3.41.2 diff --git a/atlassian/__init__.py b/atlassian/__init__.py index 76281fa01..5ff67fac0 100644 --- a/atlassian/__init__.py +++ b/atlassian/__init__.py @@ -5,6 +5,7 @@ from .confluence import Confluence from .crowd import Crowd from .insight import Insight +from .insight import Insight as Assets from .jira import Jira from .marketplace import MarketPlace from .portfolio import Portfolio @@ -27,4 +28,5 @@ "MarketPlace", "Xray", "Insight", + "Assets", ] diff --git a/examples/insight/create_object_in_assets.py b/examples/insight/create_object_in_assets.py new file mode 100644 index 000000000..8ca397b7d --- /dev/null +++ b/examples/insight/create_object_in_assets.py @@ -0,0 +1,16 @@ +from atlassian import Assets + +# Press the green button in the gutter to run the script. +if __name__ == "__main__": + assets = Assets(url="http://localhost:8080/", username="jira-administrator", password="admin") + + object_type_id = 3520 # Contract + + assets.create_object( + object_type_id=object_type_id, + attributes=[ + {"objectTypeAttributeId": 38, "objectAttributeValues": [{"value": "Expenses"}]}, # Contract Name + {"objectTypeAttributeId": 46, "objectAttributeValues": [{"value": "OPEX"}]}, # Contract Type + {"objectTypeAttributeId": 48, "objectAttributeValues": [{"value": "Expired"}]}, # Contract Status + ], + )