Simplest Enterprise Continuous Integration Solutions

Saturday, January 7, 2012

JIRA: cli interface

Creating JIRA Issue using JIRA cli interface – a minimal effort solution, easy use and maintain

1.       JDK1.6 installed
2.       Download atlassian-cli-2.4.0-distribution.zip from atlassian website
3.       Unzip atlassian-cli-2.4.0-distribution.zip, such as C:\atlassian-cli-2.4.0
4.       Edit C:\atlassian-cli-2.4.0\jira.bat
from
      java -jar "%dirPath%"/lib/jira-cli-2.4.0.jar %*
               to
      java -jar "%dirPath%"/lib/jira-cli-2.4.0.jar --server http://<my_jira_server>:8080 --user <submitter_username> --password <submitter_password> %*

Example creating an issue in JIRA

Under Dos Prompt executing command as below :
C:\atlassian-cli-2.4.0\jira.bat --action createIssue --project "MY_JIRA_PROJECT_KEY" --type "defect" --summary "Created from cli" --priority "Priority 2" --affectsVersions "3.0.1" -–components "application"
Issue JIRATST-17 created with id 10705. URL: http://<my_jira_server>:8080/browse/MY_JIRA_PROJECT_KEY -17

Note:

Priority, affectsVersdions are mandatory fields

No comments:

Post a Comment