Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug 396974 - Custom fields: Ability to say "during this status, this field must have a value"

0 views
Skip to first unread message

rojanu

unread,
Nov 18, 2008, 9:39:51 AM11/18/08
to
Hi everyone!

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

Max Kanat-Alexander

unread,
Nov 19, 2008, 2:06:10 PM11/19/08
to devel...@bugzilla.org
On Tue, 18 Nov 2008 06:39:51 -0800 (PST) rojanu <aliu...@gmail.com>
wrote:

> I am trying to apply
>
> https://bugzilla.mozilla.org/show_bug.cgi?id=396974
>
> to bugzilla 3.2-rc2.

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>

0 new messages