We extended some of the default widgets and added functionality on our own. (Select a measure filter, pick up to 4 metrics, enter simple formula and get the result besides your projectname; as a table)
The widgets work fine, but the number of analyzed project in our SonarQube reached 250+ projects a while ago.
As we extended the "Measure Filter as List" widget we struggle now with the limitation of the MeasureFilter.
Default Limitation is 100 projects and maximum is 250 projects. But we need to exceed that maximum limit.
I looked at the sonar code and found a similiar post/problem with issues limitation on the mailing list. But setting the pageSize to -1 won't show all projects... In our case the result shows 301 results, but only 300 are shown in the widget...
The negative value of the pageSize is substracted from the actual result list. I tried it with -100 and 100 projects were missing in the result list. (This may be a bug...)
This is the way we load the MeasureFilter in the widget:
filter_id = widget_properties['filter']
filter = MeasureFilter.find_by_id(filter_id.to_i) if filter_id
if !filter.require_authentication? || logged_in?
filter.execute(self, :user => current_user)
filter.set_criteria_value('pageSize', '') doesn't work as intended :( I hoped it would bypass setting the value to default (100) or max value (250). But I tried it and the default value is then set to 100... Higher values than 250 are always reset to 250.
Is there ANY way to extend the maximum?? Or in case of pageSize = '' to raise the default value.
This post has NOT been accepted by the mailing list yet.
Please make the pageSize fullly adjustable (raise/remove limit of 100/250...). If the user is aware of what he is doing he should be able to load more than 100 or 250 projects.
Bypassing this mechanism results in a bug:
pageSize=-X removes X of projects from the display list (-5 removes 5 project from list).
Can't imagine a use-case for this, please fix this.
I would suggest that setting pageSize to -1 should request all projects.
Best regards and in high hopes for finally getting a response...