Bug 1131862 - mcMerge: Rename testsuiteFlag to testsuiteFlagID
authorEd Morley <emorley@mozilla.com>
Tue, 24 Feb 2015 09:30:44 +0000
changeset 1504 052e24e0e7a5b71c4654e7806fe010cb1f962bfb
parent 1503 8926d3957c552f00c7ce0e8b43577d2ec6cb9ae9
child 1505 322347863a539accc5f19d9b256c128ffb4183bc
push id872
push useremorley@mozilla.com
push dateTue, 24 Feb 2015 23:11:31 +0000
bugs1131862
Bug 1131862 - mcMerge: Rename testsuiteFlag to testsuiteFlagID
mcmerge/js/BugData.js
mcmerge/js/ConfigurationData.js
mcmerge/js/Step.js
--- a/mcmerge/js/BugData.js
+++ b/mcmerge/js/BugData.js
@@ -110,17 +110,17 @@ var BugData = {
     bug.isUnassigned = bugObj.assigned_to.name == 'nobody';
 
     bug.intestsuite = ' ';
     bug.testsuiteFlagID = -1;
     bug.canSetTestsuite = ConfigurationData.products[bug.product][bugObj.component];
     if (bug.canSetTestsuite && 'flags' in bugObj && bugObj.flags) {
       for (var i = 0; i < bugObj.flags.length; i++) {
         var f = bugObj.flags[i];
-        if (f.name == 'in-testsuite' && f.type_id == ConfigurationData.testsuiteFlag) {
+        if (f.name == 'in-testsuite' && f.type_id == ConfigurationData.testsuiteFlagID) {
           bug.intestsuite = f.status; 
           bug.testsuiteFlagID = f.id;
           break;
         }
       }
     }
 
     this.bugs[bugObj.id] = bug;
--- a/mcmerge/js/ConfigurationData.js
+++ b/mcmerge/js/ConfigurationData.js
@@ -1,14 +1,14 @@
 "use strict";
 
 var ConfigurationData = {
   milestones: {},
   products: {},
-  testsuiteFlag: -1,
+  testsuiteFlagID: -1,
 
   // useNext represents products where I'm reasonably
   // confident that the correct milestone is --- + 1
   useNext: ['Add-on SDK',
             'Android Background Services',
             'Core',
             'Fennec',
             'Firefox',
@@ -59,28 +59,28 @@ var ConfigurationData = {
       }
     }
     this.milestones = productMilestones;
 
     // Find the flag number for in-testsuite 
     if ('flag_type' in data) {
       for (var flagNumber in data['flag_type']) {
         if (data['flag_type'][flagNumber].name == 'in-testsuite') {
-          this.testsuiteFlag = parseInt(flagNumber);
+          this.testsuiteFlagID = parseInt(flagNumber);
           break;
         }
       }
     }
 
     // Find which products/components can have intestsuite set
-    if ('product' in data && this.testsuiteFlag != -1) {
+    if ('product' in data && this.testsuiteFlagID != -1) {
       for (var product in data.product) {
         this.products[product] = {};
         for (var component in data.product[product].component) {
-          var hasTestsuite = data.product[product].component[component].flag_type.indexOf(this.testsuiteFlag) != -1;
+          var hasTestsuite = data.product[product].component[component].flag_type.indexOf(this.testsuiteFlagID) != -1;
           this.products[product][component] = hasTestsuite;
         }
       }
     }
 
     loadCallback();
   }
 };
--- a/mcmerge/js/Step.js
+++ b/mcmerge/js/Step.js
@@ -177,17 +177,17 @@ Step.prototype.createBug = function Step
       if (canSetAssignee)
         bug.assigned_to = {name: assignee};
     }
 
     // Set in-testsuite if possible 
     if (BugData.bugs[bugID] && info.canSetTestsuite && info.intestsuite != BugData.bugs[bugID].intestsuite) {
       bug.flags = [{name: 'in-testsuite',
                     setter: {email: Step.username},
-                    type_id: ConfigurationData.testsuiteFlag,
+                    type_id: ConfigurationData.testsuiteFlagID,
                     status: info.intestsuite}];
       if (BugData.bugs[bugID].testsuiteFlagID != -1)
         bug.flags[0].id = BugData.bugs[bugID].testsuiteFlagID;
     }
 
     if (bugID in Step.remaps) {
       bug.id = Step.remaps[bugID];
       if ('resolution' in bug)