Suppose I have 1000 projects in my jira instance. How can I find the list of all projects that are not active (any updation) from last one year?
Please suggest solution if we can use REST API for this?
Thanks in advance!
There is a way to find this information in Jira Cloud using the REST API.
You can make an API call to the endpoint GET /rest/api/3/project/search
However you must use the expand=insights parameter in order to see this level of detail. Also when you make this API call, the results you get back are dependent upon your level of permissions. So for example, if you're not a Jira Admin, and you don't have access to a project, the REST API won't show that project in the results.
More simplistically, if you are logged into your Jira Cloud site already, you can open a new tab and enter the address of https://[yoursitename].atlassian.net/rest/api/3/project/search?expand=insight&startAt=0
And typically most browsers would return the json format of that data. Specifically here you would be looking for the field lastIssueUpdateTime, which will indicate the time when an issue was updated in that project. These results are paginated. Currently you can only return 50 results at a time, so if you have 1000 projects, you would have to adjust the startAt parameter each time, and make this call 20 times to get back 1000 results.
Please note that these steps will not work with the endpoint GET /rest/api/3/projects as this endpoint as been deprecated AND it doesn't honor the expansion needed to find the insight section here.
This call could be scripted, if you are interested in that method it might help to review our guide in Basic Auth for REST APIs to make sure that you can authenticate properly to get back the expected results.
Regards,
Andy
There is a way to find this information in Jira Cloud using the REST API.
You can make an API call to the endpoint GET /rest/api/3/project/search
However you must use the expand=insights parameter in order to see this level of detail. Also when you make this API call, the results you get back are dependent upon your level of permissions. So for example, if you're not a Jira Admin, and you don't have access to a project, the REST API won't show that project in the results.
More simplistically, if you are logged into your Jira Cloud site already, you can open a new tab and enter the address of https://[yoursitename].atlassian.net/rest/api/3/project/search?expand=insight&startAt=0
And typically most browsers would return the json format of that data. Specifically here you would be looking for the field lastIssueUpdateTime, which will indicate the time when an issue was updated in that project. These results are paginated. Currently you can only return 50 results at a time, so if you have 1000 projects, you would have to adjust the startAt parameter each time, and make this call 20 times to get back 1000 results.
Please note that these steps will not work with the endpoint GET /rest/api/3/projects as this endpoint as been deprecated AND it doesn't honor the expansion needed to find the insight section here.
This call could be scripted, if you are interested in that method it might help to review our guide in Basic Auth for REST APIs to make sure that you can authenticate properly to get back the expected results.
Regards,
Andy
You can run below SQL on your Jira database. It'll give you list of projects which are not updated after a specific date and time. You might have to tweak the date and time part in the 'where' clause. I ran it on PostgreSQL.
select
pname,pkey,created as project_createtd,updated as project_updatetd
from
project
where updated <= '2019-10-01T02:15:00.102738Z'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Narendra Kumar ,
Under Administration > Projects there's a column where you can see the last time an issue was updated in the project.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Edwin Kyalangalilwa, is that an image from Cloud? Not sure it is and I do not have that field in my Projects page and I checked another instance as well w/o success. I wonder if this is Server specific?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You're right, i missed that this is a question related to cloud.
@Narendra Kumar Please disregard my above answer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey, just to update this old thread with new information :-)
This is now available in CLOUD! See Screenshot from one of my cloud instances... Yup, you can now see "Last Issue Updated" and sort by that in the manner @edwin mentioned above!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
ohhhh nooooooo... Premium strikes again! sorry... I'm on Premium
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.