l had view "https://community.atlassian.com/t5/Confluence-questions/User-macro-with-CQL-result/qaq-p/721816" and used the contentbylabel macro.
But max result of contentbylabel macro is 500.
I wanna more cql search result.
Do you have any idea?
I used this code.
## @param CQL:title=CQL Query|type=string|required=true|default=type = page and |desc=Enter CQL Query here, use pageId() to refer to current page ID and spaceKey() to refer to current space key.
## @param STARTDATE:title=StartDate|type=string|required=true|desc=From Date.
## @param ENDDATE:title=EndDate|type=string|required=true|desc=To date
#set ( $day1 = $paramSTARTDATE )
#set ( $day2 = $paramENDDATE )
#set ( $cql = $paramCQL.replace("pageId()", $content.id.toString()).replace("spaceKey()", $space.key) )
#set ( $cql = $cql +' and created >= "' + $day1 + '" and created <= "' + $day2 +'"' )
#set ( $htmlString = $action.getHelper().renderConfluenceMacro("{contentbylabel:showLabels=false|showSpace=false|max=1000|cql=$cql}") )
#set ( $results = 0)
#foreach ( $linkPart in $htmlString.split('href="') )
#set ( $results = $results +1 )
#end
<p> $day1 ~ $day2 Found $results results.</p>
Hello @KRAFTON Inc. ,
As mentioned in the Content By Label macro page, the max results limit is indeed set to 500 and there is no way to increase it.
However, I can see that in a previous community post another user pasted the code to create a user macro that returns the full list of results:
Please review above thread and let us know if it helps.
Cheers,
Dario
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.