Add additional option for build sorting within a jobgroup
There has been a reset of the JeOS build counter for SLE15SP3 which brings some challanges to the openQA webui because sorting by build number is not feasible anymore. There is an option to sort by the newest job that is contained in a build but that has flaws as well.
Eg at https://openqa.suse.de/admin/job_templates/131 I can select in the jobgroup settings the following sorting options: Sort by build value (as a version) and Sort by time job most recently created. It would produce more stable results if there was a 3rd option Sort by time job least recently created. That would not mess with the build order if there is a rebuild of a job in an older build triggered.
So I want to sort the builds in the jobgroup by the oldest job that this testsuite contains.
This will make the sorting order much more resilient against manual rebuilds of single jobs in older builds.
This would require:
- A database migration to convert the column we're currently storing the sort order from boolean to integer (to allow more than 2 options).
- A 3rd radio button within the UI.
compute_build_resultsdepending on the setting. Likely changing
max => 'id'to
min => 'id'in case of the new option would work.