Relevance query in web report

Hi all,

I want to run the ‘Schedulable Fixlet Compliance by Computer’ report using relevance to display only those machines that have fixlets from mime field "X-Fixlet-product-family" of it contains "Windows"

It doesn’t look like any of the built-in filters allow relevance to be used.
How can I run allow this report to capture this information?

I can run the following relevance query in the “Fixlet Compliance by Computer Group (v1.7)” report, but I don’t want to use that report as it’s not as good as the Schedulable Fixlet report imo, and it also doesn’t allow export/print to pdf, or email like the schedulable report.

bes fixlets whose (source of it is "Microsoft" AND category of it is contained by set of ("Critical Updates";"Security Update";"Security Hotfix") AND mime field "X-Fixlet-product-family" of it contains "Windows")

I will eventually want to run similar reports to allow for
mime field "X-Fixlet-product-family" of it contains "SQL" or
mime field "X-Fixlet-component" of it contains "SharePoint"

I received no response to this last year so I thought I’d try out my luck again by bumping it to see if anyone has ideas?

@lltc You can take one of two approaches here. I think the first is preferable, since it is more flexible than the second. In either approach, you need to modify the relevance query inside the source code of the Schedulable Fixlet Compliance by Computer custom report to include your whose-it filter.

I’ll demonstrate with the Windows Product Family example, but others would follow the same pattern.

Begin by opening the original custom report in Web Reports, and choosing Edit Source, if necessary, and then copying the original report’s entire source code into your favorite editor and storing it in your code repository for future reference.

Next search for line 705, which begins with:

<?relevance trs of htmls ...

Approach 1:
For the Windows Fixlet Product Family, change the end of line 705 from:

results of bes fixlets) ?> 

to

results of bes fixlets whose (mime field "X-Fixlet-product-family" of it contains "Windows")) ?>

Save this updated source code into your code repository. Next, copy the entire source code back into the Web Reports, replacing the original source code.

Now, update the Web Reports filter for the new report to account for your other conditions, including how far back you want to look.:

    Content Source              is Microsoft
and Content Category            is Critical Updates
                             or is Security Update
                             or is Security Hotfix
and Content Source Release Date is after 04/01/2020

This way you can make adjustments as needed for including or excluding categories or sources, or to account for different Computer Groups’ reporting requirements.

Click the Save Report As button to make a new Custom Report. I chose “Schedulable Fixlet Compliance By Computer - Windows Product Family”.

Approach 2:
For the Windows Fixlet Product Family, change the end of the line:

results of bes fixlets) ?> 

to

results of bes fixlets whose (source of it is "Microsoft" AND category of it is contained by set of ("Critical Updates";"Security Update";"Security Hotfix") AND mime field "X-Fixlet-product-family" of it contains "Windows")) ?>

Save this updated source code into your code repository. Next copy the entire source code back into the Web Reports, replacing the original there.

Now, update the Web Reports filter for the new report to account for your other conditions, including how far back you want to look:

    Content Source Release Date is after 04/01/2020

Click the Save Report As button to make a new Custom Report. I chose “Schedulable Fixlet Compliance By Computer - Windows Product Family”.

2 Likes