Uploaded image for project: 'ManifoldCF'
  1. ManifoldCF
  2. CONNECTORS-1368

Date filtering doesn't work for email connector

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: ManifoldCF 2.6
    • Fix Version/s: ManifoldCF 2.7
    • Component/s: Email connector
    • Labels:
      None

      Description

      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:

      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+"'");
            }
          }
      

      I think it should be filtered by date range.

        Attachments

          Activity

            People

            • Assignee:
              kwright@metacarta.com Karl Wright
              Reporter:
              cguzel Cihad Guzel
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: