We want to write a SQL to get jira project that has not updated before six months?
For example,today is 2018/01/23,that I want to get current date - 6 months that means I need to get the last issue updated before 2017/07/23,Is it possible to get the information for postgresql database?
Thank you in advance!
That is exactly the problem with SQL queries. You should dig yourself into Jira SQL database and find out how to do certain things. In the end your SQL queries will get very large and it will be difficult to support your SQL quieries especially for people who will "inherit" your code. You should use Jira Rest Api to get all the information. It will be a much cleaner solution. You can read more about Jira Rest Api here:
But answering your question about the components you should join the nodeassociation table. Here is an example:
SELECT ji.issuenum, na.sink_node_id component_id FROM jiraissue ji JOIN nodeassociation na ON na.source_node_id = ji.id AND na.sink_node_entity = 'Component' AND na.source_node_entity = 'Issue' WHERE ji.project = 19130
Concerning Scriptrunner. Yes, it is possible to update project permissions to read-only. But that would be another question. I believe that your current question was answered. Users will look for questions and answers and this question will pop up for searching project with no updates. That is why you should make another question for Scriptrunner.
Hava a good day.
Atlassian Summit is an excellent opportunity for in-person support, training, and networking.Learn more
Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in talking to 20 people planning t...
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!
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