summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2023-05-15 18:20:57 +0200
committerMilan Crha <mcrha@redhat.com>2023-05-15 18:20:57 +0200
commita4da2895b8518d5d563a817618978ec6609b0426 (patch)
treecb9ef606461b4a7ce15248a66e72efcb4017c662
parent7f569307978ca7bf86bccfb0ec0159b95aea4c26 (diff)
downloadevolution-data-server-a4da2895b8518d5d563a817618978ec6609b0426.tar.gz
I#477 - Add search folder condition for overdue messagesHEADmaster
This makes it possible to ask for a `due-by` user tag and search by it. It also adds parse of a date/time from a header-like value, not only from ISO 8601 or an integer. Related to https://gitlab.gnome.org/GNOME/evolution-data-server/-/issues/477
-rw-r--r--src/camel/camel-folder-search.c2
-rw-r--r--src/camel/camel-search-sql-sexp.c5
2 files changed, 6 insertions, 1 deletions
diff --git a/src/camel/camel-folder-search.c b/src/camel/camel-folder-search.c
index a0cd8c77e..d571ce92c 100644
--- a/src/camel/camel-folder-search.c
+++ b/src/camel/camel-folder-search.c
@@ -2668,6 +2668,8 @@ camel_folder_search_util_make_time (gint argc,
num = atoi (argv[0]->value.string);
res = folder_search_num_to_timet (num);
+ } else {
+ res = camel_header_decode_date (argv[0]->value.string, NULL);
}
} else if (argc == 1 && argv[0]->type == CAMEL_SEXP_RES_INT) {
res = folder_search_num_to_timet (argv[0]->value.number);
diff --git a/src/camel/camel-search-sql-sexp.c b/src/camel/camel-search-sql-sexp.c
index c6a79825f..7276a45e5 100644
--- a/src/camel/camel-search-sql-sexp.c
+++ b/src/camel/camel-search-sql-sexp.c
@@ -546,8 +546,11 @@ user_tag (struct _CamelSExp *f,
r->value.string = g_strdup ("(followup_completed_on IS NULL OR followup_completed_on='')");
else if (g_strcmp0 (argv[0]->value.string, "follow-up") == 0)
r->value.string = g_strdup ("(followup_flag IS NULL)");
- else
+ else {
+ gboolean *pcontains_unknown_column = (gboolean *) data;
+ *pcontains_unknown_column = TRUE;
r->value.string = g_strdup ("usertags");
+ }
return r;
}