Mail rule issues with Notes/Domino mail template

Technote (troubleshooting)


Problem

Users upgrading from a Lotus Notes/Lotus Domino 6 mail template to a release 7 or 8 mail template may observe an issue where a rule executes twice or a deleted rule continues to execute.

This issue is not observed in earlier Lotus Domino Web Access (DWA) versions but may be observed in DWA 7.0.3 and 8.0 or earlier releases that perform the correction advised in Document #1260708, "Mail rules become disabled after upgrading to Domino 7.x."

A rule numbering issue can also occur if you use a pre-7.0 beta version of the Notes/Domino mail template.


Resolving the problem

This issue was reported to Quality Engineering in SPR #MGAN6GLT7L.

Workaround:
1. Switch to the Calendar view.
2. In the lower-left corner, click Configure to enable the Miniview Rule.

    (Note: If you have already set up the Miniview, you will not see the Configure link. See the Help topics "Calendar miniview" or "New Notices miniview" for more information and menu options.)
3. Switch back to the Mail view and into the Rules folder.
4. Create a temporary enabled rule and click OK.
5. Delete the dummy rule.
6. Close and reopen the database.

Once you complete these steps, the issue cannot reoccur.

Administrators may choose to revise the mail template so the issue is avoided. In the Rules script library, revise the CompactMailRules function to allow removal of the $FilterFormula_0 entry (in cases where the Calendar and Scheduling Miniview rule is not enabled).

Original code (line 30):
If Not (Lcase( Left( items.name,16 ) ) = "$filterformula_0" ) Then

Revised code:
NOTE: The code below should be entered as a single line with no carriage return.

If Not (Lcase(Left(items.name,16))="$filterformula_0" And Calprofile.getitemvalue("Use_CalendarRule")(0) = "1") Then

    Rule numbering issue
    This technote originally advised a modification to revise the rule numbering logic. The modifications are not necessary in shipped versions of the Notes/Domino 7.x and 8.x mail templates. The initialization of the "nrulenum" parameter was actually corrected to be based on a value returned by the CompactMailRules subroutine in the Notes/Domino 7.0 mail templates.

    If you modified the ButtonOKClient and ButtonOKWeb subroutines found in the Rules script library in the mail template, then you should correct the revision back to the original logic:

    1. Correction one:
      -- lines 73 and 74 in the ButtonOKClient subroutine
      -- lines 64 and 65 in the ButtonOKWeb subroutine

      Correct code:
      Call note.replaceitemvalue("OrderNum", Cstr(nrulenum +1))
      strfilteritem = $FilterFormula_"+Cstr(nrulenum +1)
    2. Correction two:
      -- line 134 in the ButtonOKClient subroutine
      -- line 125 in the ButtonOKWeb subroutine

      Correct code:
      call profile.replaceitemvalue($FilterFormulaCount", Cstr(nRuleNum+2))

    Supporting information:
    Using the Notes/Domino beta (pre-gold) version of the 7.0 mail template, you notice that the OrderNum field for rules does not set as expected. The values for the rules should be sequential and there are gaps in the numbering. The Calendar Profile document also indicates that the $FilterFormulaCount value is one more than expected.

    For example, if you create one rule, its OrderNum field is 2. If you create a second rule, its OrderNum is 3, and the first rule's OrderNum field is now 1. The $FilterFormulaCount value is 4, when it is expected to be 3.

    The issue does not affect rule execution and was fixed in the Notes/Domino 7.0 mail template.

    NOTE: The $FilterFormulaCount value is expected to be one more than the total number of rules since it also counts the Calendar and Scheduling Miniview Rule, whether or not it was enabled.

    Related information

    An enabled Mail Rule is not executing in Notes 6.5.4/6.
    Mail rules become disabled after upgrading to Domino 7.
    A simplified Chinese translation is available

    Rate this page:

    (0 users)Average rating

    Document information


    More support for:

    IBM Notes
    Mail

    Software version:

    7.0, 8.0

    Operating system(s):

    Linux, Windows

    Software edition:

    All Editions

    Reference #:

    1217940

    Modified date:

    2008-11-21

    Translate my page

    Machine Translation

    Content navigation