aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bzpage.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bzpage.js')
-rw-r--r--lib/bzpage.js17
1 files changed, 15 insertions, 2 deletions
diff --git a/lib/bzpage.js b/lib/bzpage.js
index 2aeaf51..5a1751a 100644
--- a/lib/bzpage.js
+++ b/lib/bzpage.js
@@ -1002,9 +1002,22 @@ BZPage.prototype.queryInNewTab = function(text, component, product) {
urlStr += "&product=" + product.trim();
}
if (component) {
- urlStr += "&field0-0-0=component&type0-0-0=substring&value0-0-0="
- + component.trim();
+ if ("equivalentComponents" in this.constantData) {
+ var equivCompsArr = this.constantData["equivalentComponents"].
+ filter(function (REstr) {
+ return new RegExp(REstr).test(this.getComponent());
+ }, this);
+ if (equivCompsArr.length > 0) {
+ component = equivCompsArr[0];
+ }
+ urlStr += "&field0-0-0=component&type0-0-0=regexp&value0-0-0="
+ + component.trim();
+ } else {
+ urlStr += "&field0-0-0=component&type0-0-0=substring&value0-0-0="
+ + component.trim();
+ }
}
+
// using more complicated query tables here, because they can be more easily
// edited
// for further investigative searches