aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2011-04-26 23:54:37 +0200
committerMatěj Cepl <mcepl@redhat.com>2011-06-05 14:46:50 +0200
commit2b19aaeb2f2af979920bc9f2dd4d8df180f25c5c (patch)
treef7bed5eb3c7b3a56817284eebc8c6ac1dd9c8afb /lib
parentea75583841912d7204a15103a7f4555bb91fb401 (diff)
downloadbugzilla-triage-2b19aaeb2f2af979920bc9f2dd4d8df180f25c5c.tar.gz
We were missing many attributes from configData.
Diffstat (limited to 'lib')
-rw-r--r--lib/libbugzilla.js19
1 files changed, 10 insertions, 9 deletions
diff --git a/lib/libbugzilla.js b/lib/libbugzilla.js
index 613dbb3..7e2398b 100644
--- a/lib/libbugzilla.js
+++ b/lib/libbugzilla.js
@@ -19,6 +19,10 @@ var JSONURLDefault = "https://fedorahosted.org/released"+
"/bugzilla-triage-scripts/Config_data.json";
var BTSPrefNS = "bugzilla-triage.setting.";
var BTSPassRealm = "BTSXMLRPCPass";
+var copiedAttributes = [ "queryButton", "upstreamButton", "parseAbrtBacktraces",
+ "submitsLogging", "XorgLogAnalysis", "objectStyle", "signature",
+ "suspiciousComponents" ];
+
var passwords = {}; // hash of passwords indexed by a hostname
var config = exports.config = {};
@@ -167,6 +171,7 @@ exports.getInstalledPackages = function getInstalledPackages(locationLoginObj, c
}
}
+
var allIdx = null;
if ((allIdx = enabledPackages.indexOf("all")) != -1) {
enabledPackages = enabledPackages.splice(allIdx,
@@ -377,15 +382,11 @@ exports.initialize = function initialize(config, callback) {
config.configData.defBugzillaMaintainerArr = config.constantData.CCmaintainer;
}
- if ("suspiciousComponents" in config.gJSONData.configData) {
- config.configData.suspiciousComponents =
- config.gJSONData.configData.suspiciousComponents;
- }
-
- if ("XorgLogAnalysis" in config.gJSONData.configData) {
- config.configData.xorglogAnalysis =
- config.gJSONData.configData.XorgLogAnalysis;
- }
+ copiedAttributes.forEach(function (attrib) {
+ if (attrib in config.gJSONData.configData) {
+ config.configData[attrib] = config.gJSONData.configData[attrib];
+ }
+ });
if ("submitsLogging" in config.gJSONData.configData &&
config.gJSONData.configData.submitsLogging) {