diff --git a/src-ui/messages.xlf b/src-ui/messages.xlf
index 133d1ae96..76c4a4fb9 100644
--- a/src-ui/messages.xlf
+++ b/src-ui/messages.xlf
@@ -653,8 +653,8 @@
11
-
- Match
+
+ Matching pattern
src/app/components/manage/correspondent-list/correspondent-edit-dialog/correspondent-edit-dialog.component.html
12
@@ -875,21 +875,42 @@
Correspondent:
src/app/components/document-list/filter-editor/filter-editor.component.ts
- 28
+ 29
+
+
+
+ Without correspondent
+
+ src/app/components/document-list/filter-editor/filter-editor.component.ts
+ 31
Type:
src/app/components/document-list/filter-editor/filter-editor.component.ts
- 31
+ 36
+
+
+
+ Without document type
+
+ src/app/components/document-list/filter-editor/filter-editor.component.ts
+ 38
Tag:
src/app/components/document-list/filter-editor/filter-editor.component.ts
- 34
+ 42
+
+
+
+ Without any tag
+
+ src/app/components/document-list/filter-editor/filter-editor.component.ts
+ 46
@@ -1582,22 +1603,43 @@
97
-
- Any
+
+ Any word
src/app/data/matching-model.ts
12
-
- All
+
+ Any: Document contains any of these words (space separated)
+
+ src/app/data/matching-model.ts
+ 12
+
+
+
+ All words
src/app/data/matching-model.ts
13
-
- Literal
+
+ All: Document contains all of these words (space separated)
+
+ src/app/data/matching-model.ts
+ 13
+
+
+
+ Exact match
+
+ src/app/data/matching-model.ts
+ 14
+
+
+
+ Exact: Document contains this string
src/app/data/matching-model.ts
14
@@ -1610,15 +1652,29 @@
15
-
- Fuzzy match
+
+ Regular expression: Document matches this regular expression
+
+ src/app/data/matching-model.ts
+ 15
+
+
+
+ Fuzzy word
src/app/data/matching-model.ts
16
-
- Auto
+
+ Fuzzy: Document contains a word similar to this word
+
+ src/app/data/matching-model.ts
+ 16
+
+
+
+ Auto: Learn matching automatically.
src/app/data/matching-model.ts
17
diff --git a/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.ts b/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.ts
index 4b62d6a51..b160ae073 100644
--- a/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.ts
+++ b/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.ts
@@ -25,13 +25,26 @@ export class FilterEditorComponent implements OnInit, OnDestroy {
switch(this.filterRules[0].rule_type) {
case FILTER_CORRESPONDENT:
- return $localize`Correspondent: ${this.correspondents.find(c => c.id == +rule.value)?.name}`
+ if (rule.value) {
+ return $localize`Correspondent: ${this.correspondents.find(c => c.id == +rule.value)?.name}`
+ } else {
+ return $localize`Without correspondent`
+ }
case FILTER_DOCUMENT_TYPE:
- return $localize`Type: ${this.documentTypes.find(dt => dt.id == +rule.value)?.name}`
+ if (rule.value) {
+ return $localize`Type: ${this.documentTypes.find(dt => dt.id == +rule.value)?.name}`
+ } else {
+ return $localize`Without document type`
+ }
case FILTER_HAS_TAG:
return $localize`Tag: ${this.tags.find(t => t.id == +rule.value)?.name}`
+
+ case FILTER_HAS_ANY_TAG:
+ if (rule.value == "false") {
+ return $localize`Without any tag`
+ }
}
}
diff --git a/src/documents/migrations/1010_auto_20210101_2159.py b/src/documents/migrations/1010_auto_20210101_2159.py
new file mode 100644
index 000000000..4c30125be
--- /dev/null
+++ b/src/documents/migrations/1010_auto_20210101_2159.py
@@ -0,0 +1,18 @@
+# Generated by Django 3.1.4 on 2021-01-01 21:59
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('documents', '1009_auto_20201216_2005'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='savedviewfilterrule',
+ name='value',
+ field=models.CharField(blank=True, max_length=128, null=True),
+ ),
+ ]
diff --git a/src/documents/models.py b/src/documents/models.py
index 168dd8c7b..bf59fb1f0 100755
--- a/src/documents/models.py
+++ b/src/documents/models.py
@@ -351,7 +351,10 @@ class SavedViewFilterRule(models.Model):
rule_type = models.PositiveIntegerField(choices=RULE_TYPES)
- value = models.CharField(max_length=128)
+ value = models.CharField(
+ max_length=128,
+ blank=True,
+ null=True)
# TODO: why is this in the models file?