Skip to main content

Simple printing interface for jira

Project description

Jira does not provide a nice printable layout for tickets and nicer printing options are costly. This script just wraps the jira-api to allow formatting using jinja2 templates. This way, tickets can easily be formatted in a printer friendly way.

Getting started

The jiraprinter works on python3 only.

Jiraprinter is on pypi, so you can simply run

pip install jiraprinter

To install it. This will also create the two commands jira.py and prepare_token used below.

You can run the command line tool by calling

$ jira.py export <Ticket-Id> [<Ticket-Id> ...]

Here, angle brackets (<>) denote variable parameters and square brackets ([]) denote optional parameters. This is similar to unix man pages. You can start the web-interface for selecting tickets and printing them by calling

$ jira.py select

The web-interface will then be available at localhost:8080.

Setting your credentials

It is recommended that you put the URL of your jira server as well as your credentials into separate environment variables. Your user credentials need to be passed in base 64 encoding, which can be done using the prepare_token.py script:

$ prepare_token.py
Please enter your jira user name: myname
Please enter your jira password:
fowkeofoakjdfolai

That last name is your jira credentials in base 64 encoding. It is recommended that you set your jira credentials and the url of the server in your bashrc (if you use bash). To do so, add the following lines to your ~/.bashrc file.

export JIRAURL=https://jira.mycompany/rest/api/2
export JIRACREDENTIALS=fowkeofoakjdfolai

Obviously, both the URL and the credentials are completely made up.

Authentication error

Error messages are typically rather long and complex. If you see a 401 status code somewhere at the end of the stacktrace, that means that you’re not correctly authenticated. In that case, you might want to check your user name and password.

Travis

Test status on current master: build status

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

jiraprinter-0.0.1.tar.gz (4.3 kB view details)

Uploaded Source

File details

Details for the file jiraprinter-0.0.1.tar.gz.

File metadata

File hashes

Hashes for jiraprinter-0.0.1.tar.gz
Algorithm Hash digest
SHA256 373248e69515a0615500d5292dd582af1c6eea524262e75d0c06bbce202b3192
MD5 5c3b627321335d4c4c6cbd504720d25a
BLAKE2b-256 66a907660d3c7847d5b1ce60a55b8e2b998303a656804f945c8cfe174e709c14

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