Skip to content

Commit 176da86

Browse files
committed
Add an example of creation object
1 parent 4ed0d44 commit 176da86

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

atlassian/VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.41.1
1+
3.41.2

atlassian/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from .confluence import Confluence
66
from .crowd import Crowd
77
from .insight import Insight
8+
from .insight import Insight as Assets
89
from .jira import Jira
910
from .marketplace import MarketPlace
1011
from .portfolio import Portfolio
@@ -27,4 +28,5 @@
2728
"MarketPlace",
2829
"Xray",
2930
"Insight",
31+
"Assets",
3032
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
from atlassian import Assets
2+
3+
# Press the green button in the gutter to run the script.
4+
if __name__ == "__main__":
5+
assets = Assets(url="http://localhost:8080/", username="jira-administrator", password="admin")
6+
7+
object_type_id = 3520 # Contract
8+
9+
assets.create_object(
10+
object_type_id=object_type_id,
11+
attributes=[
12+
{"objectTypeAttributeId": 38, "objectAttributeValues": [{"value": "Expenses"}]}, # Contract Name
13+
{"objectTypeAttributeId": 46, "objectAttributeValues": [{"value": "OPEX"}]}, # Contract Type
14+
{"objectTypeAttributeId": 48, "objectAttributeValues": [{"value": "Expired"}]}, # Contract Status
15+
],
16+
)

0 commit comments

Comments
 (0)