Create a report of all confluence space with the below details using scriptrunner
Hi @Mohammed Siyad ,
Welcome to Atlassian community.
I am not sure about script runner as i have never used it. But I think we can get the info from the dabase by writing a SQL query. If you are interested then i can write one for you. It should be achieve-able.
Have a good day!
Thanks,
Srinath T
@Mohammed Siyad ,
I just went through script runner docs and I think below doc has the info you are looking for.
I hope the info helps. have a good day
Probably SQL query would work fine, as I can get the data all fetched out by puting SQL in script and return as a report.
I just wrote one and seems like it does the job. You can always customise as per your need.
SELECT t1.spacename, t1.spacekey, t1.creationdate, t1."Total Attachments Size", t1."Total Number of Attachments", t2."Pages Size", t1."Last Modified Date"FROM (SELECT s.spacekey, s.creationdate, (ROUND(SUM(longval)/1048576,2) || 'MB' )AS "Total Attachments Size", COUNT(*)AS "Total Number of Attachments", s.spacename,MAX(c.lastmoddate) AS "Last Modified Date"FROM contentproperties cpJOIN content cON cp.contentid = c.contentidJOIN spaces sON s.spaceid = c.spaceidWHERE propertyname = 'FILESIZE'GROUP BY s.spacekey, s.spacename, s.creationdate) t1JOIN (SELECT s.spacekey, (ROUND(SUM(char_length(bc.body))/1048576,2) || 'MB')AS "Pages Size"FROM content cJOIN bodycontent bcON c.contentid = bc.contentidJOIN spaces sON s.spaceid = c.spaceidGROUP BY s.spacekey) t2ON t1.spacekey = t2.spacekey;
Thanks Srinath, but seems like it is not fetching the result and throwing up error. @Srinatha Tondihal
@Srinatha Tondihal Could you please help me with the queries. Seems like it throws up error.
Hi @Srinatha Tondihal
Is it possible we can get the count of active users tagged to a space (extranet users) along with this data, then it would be fine. And also the query you have posted, just wanted to tell, that it doesnt retreive the spaces which has 0 attachment size. Can that be also setup?
Hi @Srinatha Tondihal , I would like to get the SQL query to get the list of all confluence spaces with the following details:
Also, if you could point me to where I can run this SQL query would also be greatly appreciated.
ThanksSam
Thanks for the reply, can you clarify couple of questions too.
Appreciate your help in here!!
I have tested the query in my test environment and works fine for me. Not sure why it did not work for you.
Since you have other requirements now. You might want to go for some third party plugin's which will fetch the details for you. Like Example:
https://community.atlassian.com/t5/Confluence-Cloud-Admins-articles/See-and-learn-about-all-of-your-spaces-with-the-new-Space/ba-p/2703423
It looks like you're new here. Sign in or register to get started.