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 hashes)

Uploaded Source

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