1. superemily
  2. jiratools

Overview

JIRA tools

Overview

Command-line tool to update JIRA. Right now it just generates diverse test issues, but I'm sure it's future is very bright!

Usage

usage: jiratools.py [-h] [-c CREATE] [-li] config_file

positional arguments:
    config_file           path to config file

optional arguments:
    -h, --help            show this help message and exit

    -c CREATE, --create CREATE
                           create CREATE sample issues

    -li, --loremipsum
                           flag used with -c or --create that puts filler text in the summary and description fields of created issues

Config File Format

JIRA config information is specified in config_file. Here is a sample configuration file. All fields are required except create_issue_data unless you are using the --create flag.

    [server_settings]
    server = http://localhost:2990/jira
    username = admin
    password = admin
    create_issue_data = /home/emily/create_issue_data.json

create_issue_data File Format

The JSON file referenced in the main config file under create_issue_data contains data to populate issues you generate with the --create flag.

projectkey, issuetype, and description can all contain one value and will be the same for each created issue.

summary contains a list of strings, and will randomly select one of the strings when creating an issue.

customfields must be named with their id (e.g. customfield_10001), and contain a type, and a list of options. Just like summary, an option will be selected at random when an issue is created.

{
    "projectkey": "TEST",
    "issuetype": "Task",
    "summary": ["Intricate urban teleportation system",
                "Flying cars - why not",
                "How about we build a submarine?",
                "Implement space invaders",
                "Settle some Jupiter moons",
                "Develop Martian hang glider",
                "Time travel?",
                "Space elevator!"],
    "description": "A sample description...",
    "customfield_10001": {"type": "select",
                          "options": ["Q1","Q2","Q3","Q4"]},
    "customfield_10003": {"type": "text",
                          "options": ["2013","2014","2015","2016","2017","2018"]},
    "customfield_10000": {"type": "text",
                          "options": ["Because I said so.",
                                      "It is self-evident.",
                                      "To be determined - we just really should do this!"]}
}

Examples

Soon… I'm committed enough to make a heading!

Requirements

Runs for me on python 2.7 in a virtualenv with the following packages installed with pip install.

At the time of writing (2013-01-10), all of these libraries were the most recent versions except Requests. Requests must be the version listed here. You can specify its version during install with:

pip install requests==0.13.6

Packages:

distribute==0.6.28
ipython==0.13.1
jira-python==0.12
libmagic==1.0
loremipsum==1.0.2
python-magic==0.4.2
requests==0.13.6
tlslite==0.4.1
wsgiref==0.1.2