Skip to main content

Quickly create jira issues from the command line

Project description

jira-issue

This script allows users to quickly create Jira issues from the command line. The script is python3 based and uses the jira-python. The goal is to minimize the effor needed to put in simple Jira issues.

If prerequisites are not automatically installed, run: sudo pip3 install jira python-editor

Configuration

The configuration is stored in ~/.jira_config. This file uses ini format with a DEFAULT section for items like the Jira credentials and custom sections that can be used to create templates that can be easily called. Here are the common fields for the configuration file:

username, token, server = Data needed to connect to github. Go to https://id.atlassian.com/manage/api-tokens to create a token.

assignee = github assignee ID
board = Board name to add this issue to ( or use board_id ).
board_id = Scrum board to add this issue to ( or use board).
issue = issue key to process ( leave blank to create a new issue).
key = the key for the project that issues will be created in.
type = Issue type to create.
labels = labels to assign. Labels can be in comma or space separated format. Labels can not contain spaces or commas.
close = Close the issue?
work = Time Spent string for the amount of work done (Examples: 30m, 1h ).

Custom Fields
Custom fields can be mapped to an alias name for more readable configuration. The following examples maps customfile_11135 to the alias squad and then assigns it the value of Alpha.

customfield_11135 = {"alias":"squad","type":"list"}
squad = Alpha

Custom Field Notes

  • Custom fields can only be configured in the DEFAULT section.
  • An alias can be specified in any section
  • A custom field can be configured but not used ( i.e. an the alias field not specified). In this case, the custom field will not be set
  • By default custom fields are of type text. Currently the only other option is a list. Use comma or space separation between list items

Usage

These examples are based on the jira_config.example file. The title field does not need to be quoted. This means that if you update an existing ticket that the title field has to be sent, but will be ignored.

Create an Ops Request and close it with 1.5 hours worked
jira-issue -u opsc -w 1.5h More evidence needed for soc2

Create a Support request with the tag ProdSupport and 30 minutes worked
jira-issue -u ps -w 30m Investigate deploy failure on core-api-prod-1a

Update the issue DC-1788 with hours
jira-issue -w 30m -i DC-1788 x

Update the issue DC-1788 with hours and close
jira-issue -w 30m -c -i DC-1788 x

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jira-issue-0.0.3.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

jira_issue-0.0.3-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file jira-issue-0.0.3.tar.gz.

File metadata

  • Download URL: jira-issue-0.0.3.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for jira-issue-0.0.3.tar.gz
Algorithm Hash digest
SHA256 5c4f3316c71d2d0abf46932893f23fae1243b052db4b00faaa902188eb8301ec
MD5 bd7666ba4849811c74183ea010329ff4
BLAKE2b-256 64a2f8b9336b21bbc042a6a66aa47ff2960710264150688b43890f5ab9f4ab64

See more details on using hashes here.

File details

Details for the file jira_issue-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for jira_issue-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2d64b71c30e200fa5ed7b6611ed0c9f6c5b5ca5071fc6e43eb8a8715aea6d7ea
MD5 d8cb98c7ab4426a927fc925a7c43c1f8
BLAKE2b-256 a97f979c3da68090021bfb9e21a6ae4e8dfca74b3a628944458bcfd80625830a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page