List Info

Thread: Setting default version for bug creation




Setting default version for bug creation
country flaguser name
United States
2007-05-17 20:07:49

Hi,

 

I’m making quite a few visual and UI modifications to a Bugzilla 3.0 installation. Currently I’m looking at making the ‘Version’ field set the latest (highest) version to ‘selected’; by default.

 

I’m pretty certain what I need to change in create.html.tmpl is here…;

 

<td align=&quot;right&quot; valign=&quot;top";>

 &nbsp; &nbsp;  <strong&gt;Version:</strong>

 &nbsp;  </td>;

 &nbsp;  <td>

 &nbsp; &nbsp;  <select name=&quot;version&quot; size=";5">;

 &nbsp; &nbsp; &nbsp;  [%- FOREACH v = version %]

 &nbsp; &nbsp; &nbsp; &nbsp;  <option value=&quot;[% v FILTER html %]"

 &nbsp; &nbsp; &nbsp;  &nbsp; &nbsp; [% " selected=&quot;selected"&quot; IF v == default.version %]>[% v FILTER html -%]

 &nbsp; &nbsp; &nbsp; &nbsp;  </option>

 &nbsp; &nbsp; &nbsp;  [%- END %]

 &nbsp; &nbsp;  </select>

 &nbsp;  </td>;

 

For example if I have the versions (they show up in this order, with ‘Pre 4.1.3̵7; selected by default):

 

4.1.3

4.2.0

4.2.1

4.2.2

N/A

Pre 4.1.3

 

In this case I would like 4.2.2 to be selected by default.

 

I have no idea what default.version is or where to set it… Any ideas would be much appreciated.

 

Cheers,

Jarrad Lee



This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.

Re: Setting default version for bug creation
country flaguser name
United States
2007-05-24 23:35:17

Well I had a less than overwhelming response to this problem. None the less I have found a solution without having to modify Bugzilla&#8230;

 

I’m not sure whether this is Bugzilla functionality or not but if you prefix a product version with a blank space (e.g. ‘ 4.2.2̵7;) the version will be selected by default when you navigate to the page, it will appear in the list without the space and in it’s correct numeric order in the list.

 

Jarrad

 


From: developers-ownerbugzilla.org [mailto:developers-ownerbugzilla.org] On Behalf Of Lee, Jarrad (Outsourcing)
Sent: Friday, 18 May 2007 11:08 AM
To: developersbugzilla.org
Subject: Setting default version for bug creation

 

Hi,

 

I’m making quite a few visual and UI modifications to a Bugzilla 3.0 installation. Currently I’m looking at making the ̵6;Version&#8217; field set the latest (highest) version to ‘;selected&#8217; by default.

 

I’m pretty certain what I need to change in create.html.tmpl is here…;

 

<td align=&quot;right&quot; valign=&quot;top";>

 &nbsp; &nbsp;  <strong&gt;Version:</strong>

 &nbsp;  </td>;

 &nbsp;  <td>

 &nbsp; &nbsp;  <select name=&quot;version&quot; size=";5">;

 &nbsp; &nbsp; &nbsp;  [%- FOREACH v = version %]

 &nbsp; &nbsp; &nbsp; &nbsp;  <option value=&quot;[% v FILTER html %]"

 &nbsp; &nbsp; &nbsp;  ; &nbsp; &nbsp;[% " selected=&quot;selected&quot;" IF v == default.version %]>[% v FILTER html -%]

 &nbsp; &nbsp; &nbsp; &nbsp;  </option>

 &nbsp; &nbsp; &nbsp;  [%- END %]

 &nbsp; &nbsp;  </select>

 &nbsp;  </td>;

 

For example if I have the versions (they show up in this order, with ‘Pre 4.1.3̵7; selected by default):

 

4.1.3

4.2.0

4.2.1

4.2.2

N/A

Pre 4.1.3

 

In this case I would like 4.2.2 to be selected by default.

 

I have no idea what default.version is or where to set it… Any ideas would be much appreciated.

 

Cheers,

Jarrad Lee

 

This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.

Re: Setting default version for bug creation
country flaguser name
United States
2007-05-24 23:44:29

Ok scratch that, doesn̵7;t seem to be as easy as that…;

 

For some reason though version is now defaulting to the one I want for one product230; maybe I inadvertently set this mysterious default.version somehow230;?

 


From: developers-ownerbugzilla.org [mailto:developers-ownerbugzilla.org] On Behalf Of Lee, Jarrad (Outsourcing)
Sent: Friday, 25 May 2007 2:35 PM
To: developersbugzilla.org
Subject: Re: Setting default version for bug creation

 

Well I had a less than overwhelming response to this problem. None the less I have found a solution without having to modify Bugzilla&#8230;

 

I’m not sure whether this is Bugzilla functionality or not but if you prefix a product version with a blank space (e.g. ‘ 4.2.2̵7;) the version will be selected by default when you navigate to the page, it will appear in the list without the space and in it’s correct numeric order in the list.

 

Jarrad

 


From: developers-ownerbugzilla.org [mailto:developers-ownerbugzilla.org] On Behalf Of Lee, Jarrad (Outsourcing)
Sent: Friday, 18 May 2007 11:08 AM
To: developersbugzilla.org
Subject: Setting default version for bug creation

 

Hi,

 

I’m making quite a few visual and UI modifications to a Bugzilla 3.0 installation. Currently I’m looking at making the ̵6;Version&#8217; field set the latest (highest) version to ‘;selected&#8217; by default.

 

I’m pretty certain what I need to change in create.html.tmpl is here…;

 

<td align=&quot;right&quot; valign=&quot;top";>

 &nbsp; &nbsp;  <strong>Version:</strong>

 &nbsp;  </td>;

 &nbsp;  <td>

 &nbsp; &nbsp;  <select name=&quot;version&quot; size=";5">;

 &nbsp; &nbsp; &nbsp;  [%- FOREACH v = version %]

 &nbsp; &nbsp; &nbsp; &nbsp;  <option value=&quot;[% v FILTER html %]"

 &nbsp; &nbsp; &nbsp;  ; &nbsp; &nbsp;[% " selected=&quot;selected&quot;" IF v == default.version %]>[% v FILTER html -%]

 &nbsp; &nbsp; &nbsp; &nbsp;  </option>

 &nbsp; &nbsp; &nbsp;  [%- END %]

 &nbsp; &nbsp;  </select>

 &nbsp;  </td>;

 

For example if I have the versions (they show up in this order, with ‘Pre 4.1.3̵7; selected by default):

 

4.1.3

4.2.0

4.2.1

4.2.2

N/A

Pre 4.1.3

 

In this case I would like 4.2.2 to be selected by default.

 

I have no idea what default.version is or where to set it… Any ideas would be much appreciated.

 

Cheers,

Jarrad Lee

 

This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.

Re: Setting default version for bug creation
country flaguser name
United States
2007-05-25 00:45:11

# IF this is a cloned bug,

# AND the clone's product is the same as the parent's

# &nbsp; THEN use the version from the parent bug

# ELSE IF a version is supplied in the URL

# &nbsp; THEN use it

# ELSE IF there is a version in the cookie

# &nbsp; THEN use it (Posting a bug sets a cookie for the current version.)

# ELSE

# &nbsp; The default version is the last one in the list (which, it is

# &nbsp; hoped, will be the most recent one).

#

# Eventually maybe each product should have a "current version&quot;

# parameter.

$vars->{'version'} = [map($_-&gt;name, {$product->versions})];

 

if ( ($cloned_bug_id) &&

 &nbsp; &nbsp; ($product->name eq $cloned_bug->product ) ) {

 &nbsp;  $default{'version'} = $cloned_bug->{'version'};

} elsif (formvalue('version')) {

 &nbsp;  $default{'version'} = formvalue('version');

} elsif (defined $cgi->cookie("VERSION-&quot; . $product-&gt;name) &&

 &nbsp;  lsearch($vars->{'version'}, $cgi->cookie("VERSION-&quot; . $product-&gt;name)) != -1) {

 &nbsp;  $default{'version'} = $cgi-&gt;cookie(&quot;VERSION-" . $product-&gt;name);

} else {

 &nbsp;  $default{'version'} = $vars->{'version'}->[$#{$vars->{'version'}}];

}

 

Looks like all the answers to my questions are in here (enter_bug.cgi).

 

Sorry for the spam!

 

But I do agree with “Eventually maybe each product should have a "current version&quot; parameter.

 

Jarrad.

 

 


From: developers-ownerbugzilla.org [mailto:developers-ownerbugzilla.org] On Behalf Of Lee, Jarrad (Outsourcing)
Sent: Friday, 25 May 2007 2:44 PM
To: developersbugzilla.org
Subject: Re: Setting default version for bug creation

 

Ok scratch that, doesn̵7;t seem to be as easy as that…;

 

For some reason though version is now defaulting to the one I want for one product230; maybe I inadvertently set this mysterious default.version somehow230;?

 


From: developers-ownerbugzilla.org [mailto:developers-ownerbugzilla.org] On Behalf Of Lee, Jarrad (Outsourcing)
Sent: Friday, 25 May 2007 2:35 PM
To: developersbugzilla.org
Subject: Re: Setting default version for bug creation

 

Well I had a less than overwhelming response to this problem. None the less I have found a solution without having to modify Bugzilla&#8230;

 

I’m not sure whether this is Bugzilla functionality or not but if you prefix a product version with a blank space (e.g. ‘ 4.2.2̵7;) the version will be selected by default when you navigate to the page, it will appear in the list without the space and in it’s correct numeric order in the list.

 

Jarrad

 


From: developers-ownerbugzilla.org [mailto:developers-ownerbugzilla.org] On Behalf Of Lee, Jarrad (Outsourcing)
Sent: Friday, 18 May 2007 11:08 AM
To: developersbugzilla.org
Subject: Setting default version for bug creation

 

Hi,

 

I’m making quite a few visual and UI modifications to a Bugzilla 3.0 installation. Currently I’m looking at making the ̵6;Version&#8217; field set the latest (highest) version to ‘;selected&#8217; by default.

 

I’m pretty certain what I need to change in create.html.tmpl is here…;

 

<td align=&quot;right&quot; valign=&quot;top";>

 &nbsp; &nbsp;  <strong&gt;Version:</strong>

 &nbsp;  </td>;

 &nbsp;  <td>

 &nbsp; &nbsp;  <select name=&quot;version&quot; size=";5">;

 &nbsp; &nbsp; &nbsp;  [%- FOREACH v = version %]

 &nbsp; &nbsp; &nbsp; &nbsp;  <option value=&quot;[% v FILTER html %]"

 &nbsp; &nbsp; &nbsp;  ; &nbsp; &nbsp;[% " selected=&quot;selected&quot;" IF v == default.version %]>[% v FILTER html -%]

 &nbsp; &nbsp; &nbsp; &nbsp;  </option>

 &nbsp; &nbsp; &nbsp;  [%- END %]

 &nbsp; &nbsp;  </select>

 &nbsp;  </td>;

 

For example if I have the versions (they show up in this order, with ‘Pre 4.1.3̵7; selected by default):

 

4.1.3

4.2.0

4.2.1

4.2.2

N/A

Pre 4.1.3

 

In this case I would like 4.2.2 to be selected by default.

 

I have no idea what default.version is or where to set it… Any ideas would be much appreciated.

 

Cheers,

Jarrad Lee

 

This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.

[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )