Custom Views, displaying only failed builds when NOT_BUILT is present

Jenkins setup:

Just a typical docker container, Version 2.514 on JDK17. Create a view and add the filter to show your builds. Add the following filters:

Job Status Filter → Stable/Disabled → Exclude
Build Status Filter → Never Built → Exclude

The resulting view will show both broken and NOT_BUILT builds. In our system NOT_BUILT doesn’t necessarily mean broken, it may just mean skipped.

Now you may think, why don’t I just include only stable builds? That doesn’t work, because Job status considers NOT_BUILT as also being Stable.

I want to make the view not show NOT_BUILT, is there a way to do this or do I need to add my own modification to the Job Status Filter?

Hello and welcome to this community, @rchennafi. :waving_hand:

This is a known limitation in Jenkins’ built-in filtering capabilities. Unfortunately, there’s no native way to exclude NOT_BUILT jobs directly using the standard Job Status Filter, since Jenkins tends to treat NOT_BUILT as a kind of “stable” state, which can be a bit counterintuitive.

One of the easier paths could be using the View Job Filters plugin. It adds more detailed filtering options, and based on what others have done, it seems to handle NOT_BUILT more explicitly. You might find this gives you exactly the control you’re looking for without too much setup.

Unfortunately View Job Filters doesn’t have the capability either as far as I am aware, it is just able to filter out builds that have never built. In my case, the builds have ran, they just sometimes mark their status as NOT_BUILT.

1 Like

It should be easy to extend the class JobStatusFilter of the View Job Filters plugin so that it also supports not_built status.

1 Like
1 Like