]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
toastergui: builds and projects outcome filter
authorAlexandru DAMIAN <alexandru.damian@intel.com>
Fri, 13 Mar 2015 17:32:34 +0000 (17:32 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 21 Mar 2015 00:00:01 +0000 (00:00 +0000)
This patch fixes the Outcome filter in the all builds and
all projects pages in Build mode.

[YOCTO #7450]

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
lib/toaster/toastergui/views.py

index fa34e5622f364f39105be9fd4a4f1aa44426da22..e87c9f2890adab49b938db0de0a3ce896a7be951 100755 (executable)
@@ -1924,8 +1924,8 @@ if toastermain.settings.MANAGED:
                      'filter' : {'class' : 'outcome',
                                  'label': 'Show:',
                                  'options' : [
-                                             ('Successful builds', 'state:' + str(BuildRequest.REQ_COMPLETED), queryset_all.filter(state=str(BuildRequest.REQ_COMPLETED)).count()),  # this is the field search expression
-                                             ('Failed builds', 'state:'+ str(BuildRequest.REQ_FAILED), queryset_all.filter(state=str(BuildRequest.REQ_FAILED)).count()),
+                                             ('Successful builds', 'build__outcome:' + str(Build.SUCCEEDED), queryset_all.filter(build__outcome = Build.SUCCEEDED).count()),  # this is the field search expression
+                                             ('Failed builds', 'build__outcome:NOT'+ str(Build.SUCCEEDED), queryset_all.exclude(build__outcome = Build.SUCCEEDED).count()),
                                              ]
                                 }
                     },