Skip to main content

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

Metadata

Release files for jira-issue 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jira-issue 0.0.4
File Size Uploaded
jira-issue-0.0.4.tar.gz 5.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for jira-issue 0.0.4
File Interpreter ABI Platform
jira_issue-0.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 11.2 kB

Release files / jira-issue-0.0.4.tar.gz

Download URL jira-issue-0.0.4.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
12c2c1af4b97d439aff32e2314a6b8db9d7eb01427ed1658bd5f8eeb5de3693a
BLAKE2b-256 checksum
How to use checksums
9cf5c0276b2ec3cd409001ec5ef3ed9a4edaa02a176408bbc48c8320143859d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / jira_issue-0.0.4-py3-none-any.whl

Download URL jira_issue-0.0.4-py3-none-any.whl
Size 5.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4ffafa6ae67df6fd3942bda87cf439b4e40f77cd4b3af6b6ec78ce12dc4dde4a
BLAKE2b-256 checksum
How to use checksums
014206755f4266e699b3916b3e24f3f942f58c15bdc79bb26cab10ebe58f08dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 release files

0.0.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page