How to install and run JIRA Command Line Interface ?

mihan ayeshana June 3, 2012

I want to install and run JIRA Command Line Interface. Because i want to update Issue Type Scheme using client API . How can i do it?

1 answer

1 accepted

0 votes
Answer accepted
Thomas Schlegel
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 3, 2012
mihan ayeshana June 3, 2012

How to configure these two files

jira.bat

@echo off

rem remember the directory path to this bat file

set dirPath=%~dp0

rem need to reverse windows names to posix names by changing \ to /

set dirPath=%dirPath:\=/%

rem remove blank at end of string

set dirPath=%dirPath:~0,-1%

rem - Customize for your installation, for instance you might want to add default parameters like the following:

rem java -jar "%dirPath%"/lib/jira-cli-2.6.0.jar --server http://my-server --user automation --password automation %*

java -jar "%dirPath%"/lib/jira-cli-2.6.0.jar %*

rem Exit with the correct error level.

EXIT /B %ERRORLEVEL%

jira.sh

#!/bin/bash

# Comments

# - Customize for your installation, for instance you might want to add default parameters like the following:

# java -jar `dirname $0`/lib/jira-cli-2.6.0.jar --server http://my-server --user automation --password automation "$@"

java -jar `dirname $0`/lib/jira-cli-2.6.0.jar "$@"

Im running on

Server - http://localhost:8080/

User Name - userna

password - 123123

Like uzairaslam3 likes this
Thomas Schlegel
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 3, 2012
I'm sure you are able to change the URL with your URL and the tiny little words "automation" with your name and password and put all these things together.
Thomas Schlegel
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 3, 2012

An action is the thing you want to do with the CLI. Please please read the documentation and the examples: https://bobswift.atlassian.net/wiki/display/JCLI/JIRA+Command+Line+Interface;jsessionid=25FE48CCC395B2AB640C6E31E7FF5E12#JIRACommandLineInterface-Installation

mihan ayeshana June 3, 2012

i did that but it gives this error

Error: Parameter 'action' is required.

mihan ayeshana June 3, 2012

but how can i run

jira --action addComponent --project "TESTQQ" --name "hahahaha" --description "a generic description"

this command

Thomas Schlegel
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 3, 2012

Just type it at your command prompt. Are you sure you really want to use a Command Line Interface ?

mihan ayeshana June 3, 2012

It's working fine for http://localhost:8080/

but i have jira instance deploy in remote server. when im run that command it gives this error

-Dell-System-Vostro-3450:~/Downloads/atlassian-cli-2.6.0$ ./jira.sh --action updateProject --project "ALELMDEV" --workflowScheme "10020"

Remote error: '10020' not found as a workflow scheme.

Why is that suggestions ?

there exits workflow scheme for id 10020

Thomas Schlegel
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 3, 2012

what is the name of the workflow scheme ?

mihan ayeshana June 3, 2012

WorkflowScheme_*** jira v2.12

Thomas Schlegel
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 3, 2012

and did you try to enter this name instead of the id 10020 ? If you have two Jira instances, it is very likely that your workflow schemes have different ids

mihan ayeshana June 4, 2012

ya.. i tried. but its not wotking and id is correct

Bob Swift OSS (Bob Swift Atlassian Apps)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 4, 2012
Open an issue here: https://bobswift.atlassian.net/browse/JCLI and include your JIRA version and and the output of the command with --debug option specified

Suggest an answer

Log in or Sign up to answer