Bug report #19296
Random Selection tool doesn't work correctly on a filtered layer
|Affected QGIS version:||3.0.2||Regression?:||No|
|Operating System:||Windows 10 Pro||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||27124|
The Random Selection tool, when used on a filtered layer, selects fewer features than specified. For example, if you tell the tool to select 10 features in an filtered layer, it selects fewer than 10 features. My guess is that this tool doesn't recognize when a layer is filtered, so it's choosing 10 features of the unfiltered layer.
I found this issue in QGIS 2.18.10, 3.0.2 and 3.0.3. There's a question on GIS Stackexchange where the OP had this issue in QGIS 2.18.19. https://gis.stackexchange.com/q/287737/81764