Previously it just kept the 3 most recent builds for every job (contrary to what the comment said).
HLYVEJX74DMSDR7VTGSLZCLUKQDZFDIK4FFDV4S27UPBN5JH4KDQC my @recentBuilds = $job->builds->search({ finished => 1, buildStatus => 0 # == success},{ join => 'resultInfo', order_by => 'timestamp DESC', rows => 3 # !!! should make this configurable});keepBuild $_ foreach @recentBuilds;
my @systems = $job->builds->search({ }, { select => ["system"], distinct => 1 })->all;foreach my $system (@systems) {my @recentBuilds = $job->builds->search({ finished => 1, buildStatus => 0 # == success, system => $system->system},{ join => 'resultInfo', order_by => 'id DESC', rows => 3 # !!! should make this configurable});keepBuild $_ foreach @recentBuilds;}