Bug 503417 -- Message searches and saved searches with tags broken. (Mozmill test_verify_saved_mail_view fails.) r+sr=Neil, blocking-tb3b3+, a=KaiRo for SM2.0b1
authorKent James <kent@caspia.com>
Sun, 12 Jul 2009 19:26:12 +0530
changeset 3055 c5192d9f86c2f4d875b7fe9e063754a03bd0ef7b
parent 3054 1a171a63a9a32df59201c7a85c68f5a4a8c31bce
child 3056 53f9c5558d5adb31de9765e9cb1e51bb46f3555b
push id2488
push usersid.bugzilla@gmail.com
push dateSun, 12 Jul 2009 13:59:17 +0000
treeherdercomm-central@c5192d9f86c2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersKaiRo
bugs503417
Bug 503417 -- Message searches and saved searches with tags broken. (Mozmill test_verify_saved_mail_view fails.) r+sr=Neil, blocking-tb3b3+, a=KaiRo for SM2.0b1
mail/base/content/mailWidgets.xml
suite/mailnews/mailWidgets.xml
--- a/mail/base/content/mailWidgets.xml
+++ b/mail/base/content/mailWidgets.xml
@@ -1424,16 +1424,17 @@
       <method name="save">
         <body>
           <![CDATA[
             var searchValue = this.value;
             var searchAttribute = this.searchAttribute;
             var nsMsgSearchAttrib = Components.interfaces.nsMsgSearchAttrib;
             var children = document.getAnonymousNodes(this);
 
+            searchValue.attrib = searchAttribute;
             if (searchAttribute == nsMsgSearchAttrib.Priority) {
                searchValue.priority = children[1].selectedItem.value;
             }
             else if (searchAttribute == nsMsgSearchAttrib.MsgStatus)
                searchValue.status = children[2].value;
             else if (searchAttribute == nsMsgSearchAttrib.AgeInDays)
                searchValue.age = children[0].value;
             else if (searchAttribute == nsMsgSearchAttrib.Date)
@@ -1459,27 +1460,23 @@
             else if (searchAttribute == nsMsgSearchAttrib.JunkPercent)
                searchValue.junkPercent = children[0].value;
             else if (searchAttribute == nsMsgSearchAttrib.Size)
                searchValue.size = children[0].value;
             else if (searchAttribute == nsMsgSearchAttrib.HasAttachmentStatus)
                searchValue.status = 0x10000000;  // 0x10000000 is MSG_FLAG_ATTACHMENT;
             else if (searchAttribute == nsMsgSearchAttrib.JunkScoreOrigin)
                searchValue.str = children[8].value;
-
-            if (isNaN(searchAttribute)) //  a custom term
+            else if (isNaN(searchAttribute)) //  a custom term
             {
               searchValue.attrib = nsMsgSearchAttrib.Custom;
               searchValue.str = children[9].getAttribute("value");
             }
             else
-            {
-              searchValue.attrib = searchAttribute;
               searchValue.str = children[0].value;
-            }
           ]]>
         </body>
       </method>
       <method name="saveTo">
         <parameter name="searchValue"/>
         <body>
           <![CDATA[
             this.internalValue = searchValue;
--- a/suite/mailnews/mailWidgets.xml
+++ b/suite/mailnews/mailWidgets.xml
@@ -1400,16 +1400,17 @@
       <method name="save">
         <body>
           <![CDATA[
             var searchValue = this.value;
             var searchAttribute = this.searchAttribute;
             var nsMsgSearchAttrib = Components.interfaces.nsMsgSearchAttrib;
             var children = document.getAnonymousNodes(this);
 
+            searchValue.attrib = searchAttribute;
             if (searchAttribute == nsMsgSearchAttrib.Priority) {
                searchValue.priority = children[1].selectedItem.value;
             }
             else if (searchAttribute == nsMsgSearchAttrib.MsgStatus)
                searchValue.status = children[2].value;
             else if (searchAttribute == nsMsgSearchAttrib.AgeInDays)
                searchValue.age = children[0].value;
             else if (searchAttribute == nsMsgSearchAttrib.Date)
@@ -1435,27 +1436,23 @@
             else if (searchAttribute == nsMsgSearchAttrib.JunkPercent)
                searchValue.junkPercent = children[0].value;
             else if (searchAttribute == nsMsgSearchAttrib.Size)
                searchValue.size = children[0].value;
             else if (searchAttribute == nsMsgSearchAttrib.HasAttachmentStatus)
                searchValue.status = 0x10000000;  // 0x10000000 is MSG_FLAG_ATTACHMENT;
             else if (searchAttribute == nsMsgSearchAttrib.JunkScoreOrigin)
                searchValue.str = children[8].value;
-
-            if (isNaN(searchAttribute)) //  a custom term
+            else if (isNaN(searchAttribute)) //  a custom term
             {
               searchValue.attrib = nsMsgSearchAttrib.Custom;
               searchValue.str = children[9].getAttribute("value");
             }
             else
-            {
-              searchValue.attrib = searchAttribute;
               searchValue.str = children[0].value;
-            }
           ]]>
         </body>
       </method>
       <method name="saveTo">
         <parameter name="searchValue"/>
         <body>
           <![CDATA[
             this.internalValue = searchValue;