New in version 2019.2.0.
Execution module to manipulate JIRA tickets via Salt.
This module requires the jira
Python library to be installed.
Configuration example:
jira:
server: https://jira.atlassian.org
username: salt
password: pass
salt.modules.jira_mod.
add_comment
(issue_key, comment, visibility=None, is_internal=False, server=None, username=None, password=None)¶Add a comment to an existing ticket. Return True
when it successfully
added the comment.
None
A dictionary having two keys:
type
: is role
(or group
if the JIRA server has configured
comment visibility for groups).value
: the name of the role (or group) to which viewing of this
comment will be restricted.False
Internal
in Jira Service Desk.CLI Example:
salt '*' jira.add_comment NE-123 'This is a comment'
salt.modules.jira_mod.
assign_issue
(issue_key, assignee, server=None, username=None, password=None)¶Assign the issue to an existing user. Return True
when the issue has
been properly assigned.
CLI Example:
salt '*' jira.assign_issue NET-123 example_user
salt.modules.jira_mod.
create_issue
(project, summary, description, template_engine='jinja', context=None, defaults=None, saltenv='base', issuetype='Bug', priority='Normal', labels=None, assignee=None, server=None, username=None, password=None, **kwargs)¶Create a JIRA issue using the named settings. Return the JIRA ticket ID.
template_engine
argument is set to a proper value of an existing Salt template engine
(e.g., jinja
, mako
, etc.) it will render the summary
before
creating the ticket.template_engine
argument is set to a proper value of an existing Salt template engine
(e.g., jinja
, mako
, etc.) it will render the description
before
creating the ticket.jinja
summary
and description
arguments. Default: jinja
.None
summary
and description
.
This argument is ignored when template_engine
is set as None
None
summary
and description
arguments.
This argument is ignored when template_engine
is set as None
.base
Bug
Bug
.Normal
Normal
.None
None
CLI Examples:
salt '*' jira.create_issue NET 'Ticket title' 'Ticket description'
salt '*' jira.create_issue NET 'Issue on {{ opts.id }}' 'Error detected on {{ opts.id }}' template_engine=jinja
salt.modules.jira_mod.
issue_closed
(issue_key, server=None, username=None, password=None)¶Check if the issue is closed.
Returns:
True
: the ticket exists and it is closed.False
: the ticket exists and it has not been closed.None
: the ticket does not exist.CLI Example:
salt '*' jira.issue_closed NE-123
Docs for previous releases are available on readthedocs.org.
Latest Salt release: latest_release