...
Below you can check examples of usage for this class.
Code Block | ||
---|---|---|
| ||
# Issue Operations ## Search for Issues issues = api.search_issues("your jql here") # Get Instance Info fields = api.fields projects = api.projects issuetypes = api.issuetypes ### Edit somean fields and get a response Issue api.edit_issue("EFJ-1", {"fieldkey": newvalue}) ### Create an issueIssue api.create_issue(project_key_or_id: int or str, issuetype: int or str, summary, **kwargs) # Use the General API Usage ## Get Instance Info fields = api.fields projects = api.projects issuetypes = api.issuetypes ## General API Requests r = api.get(url) r = api.put(url: str, data: dict) r = api.post(url: str, data: dict) # Project Management ## Interact with Projects project = api.project("ABC") project.set_lead("lead account id") project.set_name("New Name") project.update(name="New Name", description="New Description") project.properties project.set_property(key, value) project.get_property(key) project.set_permission_scheme(permission_scheme_id) project.delete() # Screen and Field Management ## Interact with Screen Schemes screen_schemes = api.screenschemes screen_schemes.create(name, description) screen_schemes.update(ss_id, name="", description="") screen_schemes = screen_schemes.get_all() ## Interact with Screens screens = api.screens screens.create(name, description) screens.update(name='new name', description="new description") screens = screens.get_all() ## Interact with Fields fields = api.fields fields.create("name", "fieldtype", description="optional") # for types check below fields.update(fieldId, name="new name", description="new description") field = api.fields.by_name("Summary") field.key # summary field = api.fields.by_key("customfield_10000") field.name # Story Points api.fields.delete(field.key) # Issue Type Management ## Interact with Issue Types issuetypes = api.issuetypes issuetypes.create("name", "description") |
Field Types available for Creation
Field Type (use this) | Searcher Type |
---|---|
cascadingselect | cascadingselectsearcher |
datepicker | daterange |
datetime | datetimerange |
float | exactnumber |
grouppicker | grouppickersearcher |
importid | exactnumber or numberrange |
labels | labelsearcher |
multicheckboxes | multiselectsearcher |
multigrouppicker | multiselectsearcher |
multiselect | multiselectsearcher |
multiuserpicker | userpickergroupsearcher |
multiversion | versionsearcher |
project | projectsearcher |
radiobuttons | multiselectsearcher |
readonlyfield | textsearcher |
select | multiselectsearcher |
textarea | textsearcher |
textfield | textsearcher |
url | exacttextsearcher |
userpicker | userpickergroupsearcher |
version | versionsearcher |