class documentation

class Issue(Resource): (source)

View In Hierarchy

A Jira issue.

Method __init__ Initializes a generic resource.
Method add_field_value Add a value to a field that supports multiple values, without resetting the existing values.
Method delete Delete this issue from the server.
Method get_field Obtain the (parsed) value from the Issue's field.
Method permalink Get the URL of the issue, the browsable one not the REST one.
Method update Update this issue on the server.
Instance Variable fields Undocumented
Instance Variable id Undocumented
Instance Variable key Undocumented
Instance Variable raw Undocumented
Class _IssueFields Undocumented

Inherited from Resource:

Method __eq__ Default equality test.
Method __getattr__ Allow access of attributes via names.
Method __getstate__ Pickling the resource.
Method __hash__ Hash calculation.
Method __repr__ Identify the class and include any and all relevant values.
Method __setstate__ Unpickling of the resource.
Method __str__ Return the first value we find that is likely to be human-readable.
Method find Finds a resource based on the input parameters.
Constant JIRA_BASE_URL Undocumented
Method _default_headers Undocumented
Method _find_by_url Finds a resource on the specified url.
Method _get_url Gets the url for the specified path.
Method _load Load a resource.
Method _parse_raw Parse a raw dictionary to create a resource.
Constant _HASH_IDS Undocumented
Constant _READABLE_IDS Undocumented
Instance Variable _base_url Undocumented
Instance Variable _options Undocumented
Instance Variable _resource Undocumented
Instance Variable _session Undocumented
def __init__(self, options: Dict[str, str], session: ResilientSession, raw: Dict[str, Any] = None): (source)

Initializes a generic resource. Args: resource (str): The name of the resource. options (Dict[str,str]): Options for the new resource session (ResilientSession): Session used for the resource. base_url (Optional[str]): The Base Jira url.

def add_field_value(self, field: str, value: str): (source)

Add a value to a field that supports multiple values, without resetting the existing values. This should work with: labels, multiple checkbox lists, multiple select Args: field (str): The field name value (str): The field's value

def delete(self, deleteSubtasks=False): (source)

Delete this issue from the server. Args: deleteSubtasks (bool): True to also delete subtasks. If any are present the Issue won't be deleted (Default: ``True``)

def get_field(self, field_name: str) -> Any: (source)

Obtain the (parsed) value from the Issue's field. Args: field_name (str): The name of the field to get Raises: AttributeError: If the field does not exist or if the field starts with an ``_`` Returns: Any: Returns the parsed data stored in the field. For example, "project" would be of class :py:class:`Project`

def permalink(self): (source)

Get the URL of the issue, the browsable one not the REST one. Returns: str: URL of the issue

def update(self, fields: Dict[str, Any] = None, update: Dict[str, Any] = None, async_: bool = None, jira: JIRA = None, notify: bool = True, **fieldargs): (source)

Update this issue on the server. Each keyword argument (other than the predefined ones) is treated as a field name and the argument's value is treated as the intended value for that field -- if the fields argument is used, all other keyword arguments will be ignored. Jira projects may contain many issue types. Some issue screens have different requirements for fields in an issue. This information is available through the :py:meth:`.JIRA.editmeta` method. Further examples are available here: https://developer.atlassian.com/display/JIRADEV/JIRA+REST+API+Example+-+Edit+issues Args: fields (Dict[str,Any]): a dict containing field names and the values to use update (Dict[str,Any]): a dict containing update the operations to apply async_ (Optional[bool]): True to add the request to the queue, so it can be executed later using async_run() (Default: ``None``)) jira (Optional[jira.client.JIRA]): JIRA instance. notify (bool): True to notify watchers about the update, sets parameter notifyUsers. (Default: ``True``). Admin or project admin permissions are required to disable the notification. fieldargs (dict): keyword arguments will generally be merged into fields, except lists, which will be merged into updates

Undocumented

Undocumented

raw: Dict[str, Any] = (source)

Undocumented