How to install and run JIRA Command Line Interface ?

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

This widget could not be displayed.
Thomas Schlegel Community Champion Jun 03, 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

Thomas Schlegel Community Champion Jun 03, 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 Champion Jun 03, 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

i did that but it gives this error

Error: Parameter 'action' is required.

but how can i run

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

this command

Thomas Schlegel Community Champion Jun 03, 2012

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

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 Champion Jun 03, 2012

what is the name of the workflow scheme ?

WorkflowScheme_*** jira v2.12

Thomas Schlegel Community Champion Jun 03, 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

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

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
Community showcase
Posted Tuesday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

206 views 1 3
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you