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. When a custom section is called, the DEFAULT is merged with the custom section and custom section items override DEFAULT. 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.4.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for jira-issue-0.0.4.tar.gz
Algorithm Hash digest
SHA256 12c2c1af4b97d439aff32e2314a6b8db9d7eb01427ed1658bd5f8eeb5de3693a
MD5 80cb896db2f4b9fc688c783152334dd0
BLAKE2b-256 9cf5c0276b2ec3cd409001ec5ef3ed9a4edaa02a176408bbc48c8320143859d3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jira_issue-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 4ffafa6ae67df6fd3942bda87cf439b4e40f77cd4b3af6b6ec78ce12dc4dde4a
MD5 50673264aca69d9f8367f5e4c5308df6
BLAKE2b-256 014206755f4266e699b3916b3e24f3f942f58c15bdc79bb26cab10ebe58f08dd

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