Hi,
I am working on a script to auto archive the Jira projects in Jira Cloud. Part of the script require identifying projects that are not updated in last 3 months. Is there a way to extract this information via JQL?
Hello @Susheela_Kushwaha
JQL is for getting lists of issues, not lists of projects. There is no searchable fields at the project level for the last time overall that an issue in that project was updated.
You can, however, extract a list of all projects using the REST API. The data returned for each project includes the last date an issue in the project was updated.
Thank you Trudy! Let me explore the REST API option. Appreciate your quick response.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Trudy, I tried the REST API to filter projects by last updated time but it does not seem to work. Could you please help me fix it?
/rest/api/3/project/search?orderBy=lastIssueUpdatedTime
Both of the queries below are giving the same output:
/rest/api/3/project/search?orderBy=+lastIssueUpdatedTime
/rest/api/3/project/search?orderBy=-lastIssueUpdatedTime
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Are you actually getting the lastIssueUpdatedTime attribute in your results? I am not.
I also now notice that the API says the expansion of the insight attribute where lastIssueUpdatedTime is contained is experimental, so perhaps it doesn't actually work yet. I have not actually tried it before. I don't actually spend much time working directly with the API.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That is correct, the attribute is not listed in the JSON output for me too.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So, I was able to figure out how to extract the last updated time per project using following REST API call: /rest/api/3/project/search?expand=insight
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.