Skip to content

Commit b73a5a1

Browse files
authored
Added create_custom_field
Added a function to create a custom field
1 parent 4db53fc commit b73a5a1

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

atlassian/jira.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,15 @@ def get_custom_fields(self, search=None, start=1, limit=50):
577577
if limit:
578578
params['maxResults'] = limit
579579
return self.get(url, params=params)
580+
581+
def create_custom_field(self, name, type, search_key=None, description=None):
582+
url = 'rest/api/2/field'
583+
data = {'name': name, 'type': type}
584+
if search_key:
585+
data['search_key'] = search_key
586+
if description:
587+
data['description'] = description
588+
return self.post(url, data=data)
580589

581590
def get_all_available_screen_fields(self, screen_id):
582591
"""

0 commit comments

Comments
 (0)