Jira SQL query

Nehru Saini November 26, 2013

need sql query to list all jira id with their reporter name not updated from last 15 days.

3 answers

0 votes
Pablo Beltran
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.
November 21, 2015

If you need SQL you can use SQL for JIRA 

select * from issues i where i.jql='updated < -15d'
0 votes
Nehru Saini November 26, 2013

Infact I want to create a shell script which will run first sql query and one by one comment in those jira id that "Last 15 days that id is not updated."

Therefore I want to run mysql query which will give me info of jira id which are not udpated since last 15 days.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 26, 2013

Ok. I assume you will be commenting via REST, as you can't do it with SQL. Ideally, you should probably be fetching the data with REST as well. (Or you could just use the script runner to do this and do the whole thing internally instead)

I also suspect your criteria are wrong. You probably need to exclude closed/resolved/ended/done issues from the updates at the very least, or you'll quickly end up with piles of issues with pointless comments on them.

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 26, 2013

I'm sorry, but that reads as you want to report on people who have not changed their name in the last 15 days?

That doesn't sound useful, could you explain what I have misunderstood?

Nehru Saini November 26, 2013

Infact, I want to run a sql query in jira database, which will give me jira id number and name of person who has created that jira id and not updated last 15 days.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 26, 2013

I'm sorry, I still don't understand.

I understand that you want a Jira ID and the name of the person who created it. But I don't grasp how the 15 days criteria is attached to it. Do you mean the issue has not been updated in the last 15 days?

There is actually a problem with "creator" too - Jira allows a person to create an issue and name a different *reporter* to themselves, so you won't actually know who created it.

This also leads me to ask why you don't just use Jira to do it. The JQL "updated < -15d" will give you all the issues that haven't been updated, and when you look at the issue navigator, you get Issue ID and Reporter as columns by default.

Suggest an answer

Log in or Sign up to answer