You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@manifoldcf.apache.org by "Cihad Guzel (JIRA)" <ji...@apache.org> on 2017/01/16 11:07:26 UTC
[jira] [Created] (CONNECTORS-1368) Date filtering doesn't work for
email connector
Cihad Guzel created CONNECTORS-1368:
---------------------------------------
Summary: Date filtering doesn't work for email connector
Key: CONNECTORS-1368
URL: https://issues.apache.org/jira/browse/CONNECTORS-1368
Project: ManifoldCF
Issue Type: Bug
Components: Email connector
Affects Versions: ManifoldCF 2.6
Reporter: Cihad Guzel
The email connector uses the standard email java class to search. There are some filter fields as "from, to, subject, body, date" but the date filter isn't working. The code line:
{code}
SearchTerm searchTerm = null;
Iterator<Map.Entry<String,String>> it = findMap.entrySet().iterator();
while (it.hasNext()) {
Map.Entry<String,String> pair = it.next();
findParameterName = pair.getKey().toLowerCase(Locale.ROOT);
findParameterValue = pair.getValue();
if (Logging.connectors.isDebugEnabled())
Logging.connectors.debug("Email: Finding emails where '" + findParameterName +
"' = '" + findParameterValue + "'");
SearchTerm searchClause = null;
if (findParameterName.equals(EmailConfig.EMAIL_SUBJECT)) {
searchClause = new SubjectTerm(findParameterValue);
} else if (findParameterName.equals(EmailConfig.EMAIL_FROM)) {
searchClause = new FromStringTerm(findParameterValue);
} else if (findParameterName.equals(EmailConfig.EMAIL_TO)) {
searchClause = new RecipientStringTerm(Message.RecipientType.TO, findParameterValue);
} else if (findParameterName.equals(EmailConfig.EMAIL_BODY)) {
searchClause = new BodyTerm(findParameterValue);
}
if (searchClause != null)
{
if (searchTerm == null)
searchTerm = searchClause;
else
searchTerm = new AndTerm(searchTerm, searchClause);
}
else
{
Logging.connectors.warn("Email: Unknown filter parameter name: '"+findParameterName+"'");
}
}
{code}
I think it should be filtered by date range.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)