MDL-75449 reportbuilder: add no tags/exclude tags filter operators.

Allow user to filter for elements that either contain no tags, plus
those that don't contain selected tags.
This commit is contained in:
Paul Holden 2022-08-18 13:02:56 +01:00
parent 3bc792b9b8
commit fd01461b7a
3 changed files with 29 additions and 2 deletions

View file

@ -166,10 +166,17 @@ class tags_test extends core_reportbuilder_testcase {
], false],
// Tag.
'Filter tag name' => ['tag:name', [
'Filter tag name equal to' => ['tag:name', [
'tag:name_operator' => tags_filter::EQUAL_TO,
'tag:name_value' => [-1],
], false],
'Filter tag name not equal to' => ['tag:name', [
'tag:name_operator' => tags_filter::NOT_EQUAL_TO,
'tag:name_value' => [-1],
], true],
'Filter tag name empty' => ['tag:name', [
'tag:name_operator' => tags_filter::EMPTY,
], false],
'Filter tag name not empty' => ['tag:name', [
'tag:name_operator' => tags_filter::NOT_EMPTY,
], true],