Exceed MeasureFilter pageSize limit of 250

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Exceed MeasureFilter pageSize limit of 250

Johannes Zink
This post was updated on .
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
        filter.load_criteria_from_data
        if !filter.require_authentication? || logged_in?		
        filter.set_criteria_value('display', 'list')
        filter.set_criteria_value('pageSize', '')		
		
        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.
Best regards,

Johannes Zink
Software Developer
1&1
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Exceed MeasureFilter pageSize limit of 250

Johannes Zink
What was the decision to set a maximum of 250? Performance?

I think it would be useful to request all projects, if wanted/needed!

Setting pageSize to -1 requests more than 250 projects, but always removes the last project from the display list. Is this a known bug?


Looking forward for a response
Best regards,

Johannes Zink
Software Developer
1&1
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Exceed MeasureFilter pageSize limit of 250

Johannes Zink
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...
Best regards,

Johannes Zink
Software Developer
1&1
Loading...