A simple tool/script to import issues from Drupal.org into a JIRA instance.
- Imports title by default in the format '#1234567 This is the issue title'
- Supports JIRA custom fields and a few available tokens for value replacement
- Adds the project's name (module/theme) as a Label to the issue in JIRA
- Adds an external link to the issue in JIRA referring to the issue at Drupal.org.
Download the PHAR somewhere in your filesystem and make it executable. If you want it globally available move it to a directory listed in your system's $PATH environment variable. You can optionally rename the file and remove the .phar extension, so it's more like a "real bin".
Below is an example using OSX or Linux:
curl -O https://github.com/larruda/dorg-to-jira/releases/download/1.0.0/dorg-to-jira.phar
chmod +x dorg-to-jira.phar
mv dorg-to-jira.phar /usr/local/bin/dorg-to-jira
Simply run dorg-to-jira passing along the ID (nid) of the issue at Drupal.org.
You can optionally set the path of the configuration file with the -c
argument. By default it looks for a config.yml
in the current directory.
./dorg-to-jira.phar 1234567 [-c|--config path/to/config.yml]
It will prompt you for your JIRA password on every usage. For security purposes we don't hold passwords or accept as argument/configuration.
This tools needs a set of configuration values in order to work. Mandatory ones are jira, user and key which are the URL to the JIRA instance, the username and project key respectively. Custom fields are optional.
jira: https://jira.company.com/
user: user@company.com
key: PROJ
fields:
customfield_12510:
value: DEV
customfield_12711:
value: %ISSUE_TYPE%
You can use the following tokens as values for custom fields in the configuration file. They will be replaced by the value according to the issue being imported.
Token name | description |
---|---|
%ISSUE_URL% | The absolute URL to the issue at Drupal.org. |
%ISSUE_NID% | The Node ID of the issue. |
%ISSUE_TYPE% | The issue type (e.g: bug, feature request, etc |
%ISSUE_BODY% | The issue body text (can contain HTML) |
I'm assuming you have *Composer *installed and globally available on your OS. If that's not the case, follow the instructions at https://getcomposer.org. With Composer properly installed and functional, clone this repository, cd into it and download all dependencies.
git clone git@github.com:larruda/dorg-to-jira.git
cd dorg-to-jira/
composer install
After that and considering no errors have been thrown, go ahead and build the PHAR archive. If you are curious about what this executes underneath or need to debug step-by-step, read the project's composer.json.
composer run-script build-phar
You should have a dorg-to-jira.phar inside a bin/ directory in the project root. If you want it globally available in your system follow the Installation instructions.
- 1.0.0
- Initial commit
- Initial commit.
- Added compiled binary.
- Changed into a single command only application.
- Replaced contents of the file to an example for reference.
- Extend Console’s Application class in order to provide a default command.
- Added support for placeholders. Added argument validation. Added support for remote links.
- Pointed “drupal-org-api” to my own fork.
- Publishing new PHAR package.
- Changed to new array notation.
- Changes dependencies to stable versions.
- Changed composer minimum stability from stable to prefer-stable.
- Changed composer minimum stability from stable to prefer-stable.
- Removed composer.lock.
- Trying a weird approach…
- Adding composer.lock back again.
- Adding initial Travis build descriptor file.
- Adding initial Travis build descriptor file.
- Trying to make this PHAR work…
- Added fork as a package dependency and generated PHAR package.
- Updated README instructions.
- Removed PHAR archive from version control.
- Updated Travis build script.
- Updated README instructions.
- Testing markdown formatting.
Distributed under the MIT license. See LICENSE
for more information.