/jira-export

Export all issues of a JIRA issue tracker instance into static HTML files

Primary LanguagePHP

Static JIRA issue export

Export all issues of a JIRA issue tracker instance into static HTML files.

This static files can be indexed by an intranet search engine easily, without having to setup autologin in JIRA.

The first export will take quite some time. After that initial run, only projects with modifications since the last export will get updated, which makes it possible to run the export as cronjob every 15 minutes.

Note: If you use jira 4.4, only export once a day. jira-export doesn't support partial updates with it.

Setup classic

  1. Switch to the folder you want to set this all up in, e.g. /home/myuser/
  2. Clone git repository, e.g. git clone https://github.com/netresearch/jira-export.git
  3. $ cp ./data/config.php.dist ./data/config.php
  4. Set up/edit ./data/config.php
  5. Install composer (if you don't have it already).. https://getcomposer.org/
    1. Run composer setup php composer-setup.php
    2. Check composer is working (esp behind a proxy) using php composer.phar diag
    3. If you have proxy problems, set up HTTP_PROXY, HTTPS_PROXY env variables
  6. Install dependencies
    1. Run php composer.phar install
  7. (Optional) Add proxy support to export-html.php. Go to line 191 and add..
    'proxy_host' => 'myproxy', 'proxy_port' => 8080
  8. Run the initial import: php ./bin/export-html.php
  9. Setup the web server document root to www/
  10. Setup cron to run the export every 15 minutes.

Setup with docker

  1. Clone git repository
  2. $ cp data/config.php.dist /data/config.php
  3. Adjust data/config.php
  4. Adjust docker-compose.override.yml to your needs
  5. run docker-compose run build build
  6. run docker-compose up -d
  7. Setup cron to run the export every 15 minutes.

Additional configuration

Export some projects only

If you care about only a fraction of the projects in a JIRA instance, you can choose to export those only.

Simply adjust $allowedProjectKeys in your configuration file:

$allowedProjectKeys = array('FOO', 'BAR');

Multiple JIRA instances

Use the -c command line option:

$ ./bin/export-html.php -c data/config-another.customer.php

Dependencies

  • PHP
  • Atlassian JIRA, at least version 4.4 with activated REST API. Version 5.1 or higher recommended.
  • Console_CommandLine from PEAR
  • HTTP_Request2 from PEAR

Similar tools

  • Gigan - Parse JIRA XML into CouchDB

About jira-export

License

jira-export is licensed under the AGPL v3 or later.

Author

Christian Weiske, Netresearch GmbH & Co KG