TNO-3016 Fix exclude content filters #2236
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There are two fixes:
On line 830 there's a check on the section setting OverrideExcludeHistorical, when there's nothing to do with the exclude report content. So the feature is controlled only by the content setting ExcludeReports.
This fixes the reports using folders as data source.
On the line 854, there was a check that I believe was include by mistake on sectionSettings.RemoveDuplicates, that should be sectionSettings.OverrideExcludeHistorical (since the array is called excludeAboveAndHistorical), and also another problem that the on false was returning an empty array, and was overwriting the content that should be excluded by the excludeOnlyTheseContentIds.
This fixes the reports using filters as data source.
Report used to test content to be excluded.
Option to exclude report empty
Content
Option to exclude report filled
Content