Dear all,
Would it be possible to count comment by space list, such as the address : https://drive.google.com/file/d/0BxriXuT0xeaFLWlUM2J5MzQwZjQ/view?usp=sharing
Thank you.
There's probably a way using the database, but I know the API better, so here's a method using that. Just paste the following code in your browser console and you'll get a comma separated list
jQuery.ajax({ contentType: "application/json", type: "POST", url: contextPath + "/rpc/json-rpc/confluenceservice-v1/getSpaces", success: function( response ) { jQuery(response).each(function() { var space = this; jQuery.ajax({ url: contextPath + "/rest/searchv3/1.0/search?type=comment&where=" + space.key, success: function(results) { console.log(results.total + ", " + space.name + ", " + space.key); } }); }); } });
But I tried add these code as listed as above by html macro, it does not show anything. How can we separate the list by month /week? Thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It doesn't run in the HTML macro, you have to copy/paste it into the browser console (usually pulled up by pressing F12). As for listing by month/week, what did you have in mind? all months/weeks in 2015? you have to run a separate query for each space and for each week/month, so let me know.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Stephen ,
Thank you for your kindly assistance.
Just make sure how can we execute the code as listed as above , because we have pasted the code into google chrome browser and then how can we run it ? Thank you.
comment.jpg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You should just be able to press Enter and it should run
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.