From version < 13.1 >
edited by Vincent Massol
on 2014/07/22 10:58
To version < 14.1 >
edited by Vincent Massol
on 2014/07/22 11:01
< >
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,18 +1,22 @@
1 1  Shows how many extensions have been created between 2 dates.
2 2  
3 -Use ##confirm=1## to execute.
3 +Supported parameters:
4 +* Use ##confirm=1## to execute.
5 +* Pass ##start## and ##end## parameters to specify the dates.
6 +* Pass ##nocommitters## to exclude extensions created by the XWiki Dev Team
4 4  
5 -Pass ##start## and ##end## parameters to specify the dates.
6 -
7 7  For example: ##start=2013-06-30&end=2014-06-30##.
8 8  
9 9  {{groovy}}
10 10  if (request.confirm == '1') {
11 11   def total = 0
12 - services.query.xwql("from doc.object(ExtensionCode.ExtensionClass) as extension where doc.space = 'Extension' and doc.creationDate >= :start and doc.creationDate < :end ").bindValue('start', Date.parse('yyyy-MM-dd', request.start)).bindValue('end', Date.parse('yyyy-MM-dd', request.end)).execute().each() {
13 -//def mydoc = xwiki.getDocument(it)
14 -//mydoc.use("ExtensionCode.ExtensionClass")
15 -// println "* ${it} - ${mydoc.getValue('authors')}"
13 + def xwql
14 + if (request.nocommitters) {
15 + xwal = "from doc.object(ExtensionCode.ExtensionClass) as extension where doc.space = 'Extension' and doc.creationDate >= :start and doc.creationDate < :end and extension.authors not in ('xwiki:XWiki.XWikiTeam')"
16 + } else {
17 + xwal = "from doc.object(ExtensionCode.ExtensionClass) as extension where doc.space = 'Extension' and doc.creationDate >= :start and doc.creationDate < :end"
18 + }
19 + services.query.xwql(xwql).bindValue('start', Date.parse('yyyy-MM-dd', request.start)).bindValue('end', Date.parse('yyyy-MM-dd', request.end)).execute().each() {
16 16   println "* ${it}"
17 17   total++
18 18   }

Shows how many extensions have been created between 2 dates.

Use confirm=1 to execute.

Pass start and end parameters to specify the dates.

Supported parameters:

  • Use confirm=1 to execute.
  • Pass start and end parameters to specify the dates.
  • Pass nocommitters to exclude extensions created by the XWiki Dev Team

For example: start=2013-06-30&end=2014-06-30.

Get Connected