I am trying to apply
https://bugzilla.mozilla.org/show_bug.cgi?id=396974
to bugzilla 3.2-rc2. I have applied it and trying to get it to work.
In "Show Condition" I have tried
if(document.getElementsByName('product').value== 'my_product'){
return false;
}
which doesn't work, because at the time the script runs "product"
element is not available, then I have found "getURLParam" function
from google
function getURLParam(strParamName){
var strReturn = "";
var strHref = window.location.href;
if ( strHref.indexOf("?") > -1 ){
var strQueryString = strHref.substr(strHref.indexOf
("?")).toLowerCase();
var aQueryString = strQueryString.split("&");
for ( var iParam = 0; iParam < aQueryString.length; iParam++ )
{
if (
aQueryString[iParam].indexOf(strParamName.toLowerCase
() + "=") > -1 ){
var aParam = aQueryString[iParam].split("=");
strReturn = aParam[1];
break;
}
}
}
return unescape(strReturn);
}
and used following;
if(getURLParam('product') == 'my_product'){
return false;
}
which woks. I don't know how am I supposed to code in "Advanced
Custom fields" fields, Is above OK?
Is it possible to get an example for each.
Thanks
Hi! Discussions about customizing your Bugzilla belong on the
support-bugzilla mailing list, described here:
http://www.bugzilla.org/support/
-Max
--
http://www.everythingsolved.com/
Competent, Friendly Bugzilla and Perl Services. Everything Else, too.
-
To view or change your list settings, click here:
<http://bugzilla.org/cgi-bin/mj_wwwusr?user=dev-apps...@lists.mozilla.org>