Jira SQL query

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

3 answers

0 votes

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?

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.

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.

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.

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.

If you need SQL you can use SQL for JIRA 

select * from issues i where i.jql='updated &lt; -15d'

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 29, 2018 in Jira

How to set up an incident workflow from the VP of Engineering at Sentry

Hey Atlassian community, I help lead engineering at Sentry, an open-source error-tracking and monitoring tool that integrates with Jira. We started using Jira Software Cloud internally last year, a...

1,121 views 0 8
Read article

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