Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

JIRA CLI runfromsql error

Prakash Ganeshan February 2, 2015

I am running the below query from JIRA CLI.  I am getting result of the query along with some error.

I am using JIRA 6.3.11, CLI 3.0.0 and oracle database.

Below is the CLI command I am running.

jira --action runFromSql --sql "select count(*) from jiraissue" --host "hostname" --driver "oracle" --database "databasename" --dbUser "username" --dbPassword "password"

I am getting the result of the query along with the error message.

Run: --cOUNT(*) "169347"

Error: Unknown flag 'cOUNT(*)'.
Error: Unexpected argument: 169347
Error: Parameter 'action' is required.

Client error: 1 actions failed

Please help me to fix this error.

1 answer

0 votes
Bob Swift
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.
February 2, 2015

runFromSql is used to run a specific CLI action for each row from the result set. What action where you intending to run for your scenario? Your query isn't producing a valid action and so your are getting an error trying run it. Examples as a simply example.

Prakash Ganeshan February 2, 2015

Hi Bob Swift, I am trying to get the count of the issues in my jira instance and I am trying to run query in DB to get the count. Please let me know how do I change the command ??

Prakash Ganeshan February 2, 2015

I don't want to run any CLI action for the value returned by the query, My query just retuns the number of tickets (169347 in my case) and I dont want to run any CLI actions on this value.

Bob Swift
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.
February 2, 2015

You don't need the CLI to run a query :)

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, loom, loom for training, loom for teaching, video training, async learning, online education, screen recording, loom tutorials, loom use cases, atlassian learning, team training tools, instructional video, virtual training tools

🛗 Elevate Your Training and Enablement with Loom

Join us June 26, 11am PT for a webinar with Atlassian Champion Robert Hean & Loom’s Brittany Soinski. Hear tips, stories, and get your burning questions answered. Learn how Loom makes training and enablement easier. Don’t miss it!

Register today
AUG Leaders

Atlassian Community Events