moic.plugins.jira package

Submodules

moic.plugins.jira.api module

Jira Api custom calls module

moic.plugins.jira.api.get_project_status(projectIdOrKey: str, url: str = None, login: str = None, password: str = None) → dict[source]

Get project status using a given project Key or ID

Parameters:
  • projectIdOrKey (str) – The Jira project ID or Key
  • url (str) – The base url of the Jira instance
  • login (str) – The login credential to access the API
  • password (str) – The passowrd credential to access the API
Returns:

Dict of status existing for the given project

Return type:

dict

moic.plugins.jira.api.get_project_story_status(projectIdOrKey: str, url: str = None, login: str = None, password: str = None) → dict[source]

Get project status using a given project Key or ID which correspond to issue type stories

Parameters:
  • projectIdOrKey (str) – The Jira project ID or Key
  • url (str) – The base url of the Jira instance
  • login (str) – The login credential to access the API
  • password (str) – The passowrd credential to access the API
Returns:

Dict of status existing for the given project

Return type:

dict

moic.plugins.jira.base module

This module represents the the Jira Instance class

class moic.plugins.jira.base.Instance[source]

Bases: moic.cli.base.MoicInstance

Instance class which allow you to access Jira’s API using basic auth credentials It allows to setup several configuration such as: - Default project, custom fields, sprint workflow etc…

add_context(name: str, force: bool = False) → dict[source]

Setup the main configuration and saved it: Instance, credentials and default project

Parameters:force (bool) – Force configuration to be setup even if it exists
Returns:None
create_session_instance() → None[source]

Setup the instance if it doesn’t exist yet

Returns:None
custom_config(project: str, force: bool = False) → None[source]

Configure the agile settings It configured several custom fields: * Story point custom field * Peer custom field

Parameters:
  • project (str) – Jira Project key which should be configured
  • force (bool) – Force configuration to be setup even if it exists
Returns:

None

custom_config_label = 'Would you like to configure Jira Agile'
instance = None
session

Session object which represents a JIRA API session

Returns:A Jira API session
Return type:JIRA

moic.plugins.jira.core module

This module is used to build objects which could be used by moic.cli.utils method For example the print_issue function

class moic.plugins.jira.core.JiraComment(raw: jira.resources.Comment)[source]

Bases: object

JiraComment Class represents a normalized issue comment based on Jira.Comment resource

class moic.plugins.jira.core.JiraIssue(raw: jira.resources.Issue)[source]

Bases: object

JiraIssue Class represents a normalized issue based on a Jira.Issue resource

class moic.plugins.jira.core.JiraIssueType(raw: jira.resources.IssueType)[source]

Bases: object

JiraIssueType Class represents a normalized issue type based on Jira.IssueType resource

class moic.plugins.jira.core.JiraStatus(raw: jira.resources.Status)[source]

Bases: object

JiraStatus Class represents a normalized status based on a Jira.Status resource

Module contents

Moic Jira Package