From etzwane at schwag.org Thu May 1 22:06:23 2003 From: etzwane at schwag.org (Sean McAfee) Date: Thu, 01 May 2003 18:06:23 -0400 Subject: More custom field revisions In-Reply-To: <3EB03EBE.6010905@mozilla.org> Message-ID: <20030501220623.1B128BCDB@diggity.schwag.org> Gervase Markham wrote: >Sean McAfee wrote: >> What concerns me is the spectre of a set of N products on the one side, >> a set of M custom fields on the other (N and M both being large), and >> some arbitrarily complicated set of has-a relationships between them. >You make it sound complex, but it's not. On every "edit custom field" >screen, you have a "Restrict to products:" multiselect. And that's all >you need. OK, that approach addresses the issue, but it doesn't scale well. Adding a new global field to an N-product installation would involve: 1. Shift-click all products visible in the multiselect (seven, say). 2. Scroll down. 3. Repeat steps 1 and 2 (ceil(N/7)-1) times. If a new field were to be shared by only half the products, the admin would have to scroll down the entire box, carefully shift-clicking the correct half. I see significant room for input errors. If named field groups were employed instead, the previous two situations are more straightforward to handle. I think it's worth shouldering some additional complexity to provide a cleaner, more intuitive interface. >> OK, I can see the utility in this. I would ask, though, that the >> administrator not be required to compose from scratch, for every field, >> a name which isn't relevant to the user interface. >> The admin interface >> could, for example, propose a reasonable default by downcasing the >> display name and replacing all nonalphanumerics with underscores, and >> twiddling the result to avoid name collision. The administrator could >> then accept this suggestion, modify it, or nuke it and make up a new one. >Hmm. We could do that. If it were me, I'd like to pick my own, but I can >see the value in Bugzilla making a suggestion. I'm not really comfortable publicly exposing what is essentially an implementation detail, of relevance only to those who sling around query URLs. This may be my own divergent experience again, but that's not really common practice here. >> I think it should be possible to modify the presentation of custom fields in >> this way, but I'd rather provide reasonable default behavior that obviates >> the need to perform template-twiddling for each and every custom field. >Oh, I agree that we should display them without intervention - note that >I said "how and where", not "if" :-) In other words, there should be a >default location, and changing it requires hacking templates, plus a >default UI widget, and changing that requires hacking templates. But you've also said that display names should reside in templates, so the simple act of defining a new custom field would require hacking templates (for small values of "hack"). -- Sean McAfee -- etzwane at schwag.org From bugreport at peshkin.net Thu May 1 22:51:49 2003 From: bugreport at peshkin.net (Joel Peshkin) Date: Thu, 01 May 2003 15:51:49 -0700 Subject: More custom field revisions In-Reply-To: <20030501220623.1B128BCDB@diggity.schwag.org> References: <20030501220623.1B128BCDB@diggity.schwag.org> Message-ID: <3EB1A505.1070505@peshkin.net> Sean McAfee wrote: > > >If a new field were to be shared by only half the products, the admin >would have to scroll down the entire box, carefully shift-clicking the >correct half. I see significant room for input errors. > > > Just don't lose the contents of custom fields when bugs are moved between products. -Joel From gerv at mozilla.org Fri May 2 07:46:35 2003 From: gerv at mozilla.org (Gervase Markham) Date: Fri, 02 May 2003 08:46:35 +0100 Subject: Gerv away until Tuesday Message-ID: <3EB2225B.20805@mozilla.org> Just a note (given that I'm in several discussions with people on these lists, and I hate auto-reply out-of-office messages, as I'm sure you all do): I'm away until Tuesday on a church weekend away. Plenty of time relaxing without the Internet and with the focus on God. :-) See you all in four days. Gerv From caseyg at chsamerica.com Fri May 2 17:42:01 2003 From: caseyg at chsamerica.com (Casey Gregoire) Date: Fri, 2 May 2003 13:42:01 -0400 Subject: Using I frame to contain the additional Comments section Message-ID: My boss wanted to see a scrollable frame that contained the additional comments section of the edit bug screen. What I did was use a template for the show_bug.cgi that only showed the comments section and put that as the src value for the Iframe that I replaced the comments section in the edit.html.tmpl. Of course that this does is every time you view a bug it queries the database twice as much for the exact same data. I was looking for a simple change that did not involve changing the cgi scripts for Bugzilla. (All of my changes are in the templates) Can anyone tell me if there was a better way to go about doing this that would query the database only once? (I don't want to have to change the actual source code of Bugzilla if I can avoid it.) I included the templates so you can see exactly what I did. <> <> Thank you, Casey Gregoire Programmer CHS of America 100 1st Ave S. Suite 601 St. Petersburg, FL 33701 Phone - (727) 824-0800 ext 1236 Every great achievement was once impossible. -- Anonymous I'd like to get started on time, if we can, inasmuch as we're late already. -- Larry Gelbart Nothing is accomplished without passion. -- My Fortune Cookie -------------- next part -------------- A non-text attachment was scrubbed... Name: show-onlycom.html.tmpl Type: application/octet-stream Size: 1772 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: edit.html.tmpl Type: application/octet-stream Size: 19077 bytes Desc: not available URL: From myk at mozilla.org Fri May 2 18:37:54 2003 From: myk at mozilla.org (Myk Melez) Date: Fri, 02 May 2003 11:37:54 -0700 Subject: Using I frame to contain the additional Comments section In-Reply-To: References: Message-ID: <3EB2BB02.30606@mozilla.org> Casey Gregoire wrote: >Can anyone tell me if there was a better way to go about doing this that >would query the database only once? (I don't want to have to change the >actual source code of Bugzilla if I can avoid it.) > Currently Bugzilla generally assumes that every template wants to display everything it can, since templates were originally ported from inline HTML in the Perl script, where only one format was ever possible. Bugzilla thus pushes all the data at the template, which decides what data to display. Now that we have templates and multiple formats, we need to change that model so that Bugzilla merely hands the template a reference to a bug object, the template requests data from the bug object, and the bug object gets data from the database on demand. The template then pulls the data it wants when it wants it, and it doesn't pull any data it doesn't want. You still incur the cost of instantiating the script a second time in this model, but that cost will be effectively eliminated when mod_perl/SpeedyCGI support gets implemented (work on this is ongoing). Unfortunately not much work is happening on switching from push to pull models, but fortunately some work has already been done, and one of the pieces that was done was comments on the "show bug" page, so when you go to the "show bug" page for a specific bug, show_bug.cgi hands the template a bug object, and that bug object doesn't pull comments from the database until the template calls its "longdesc" method. Just make sure you aren't calling that method in the main template, and you should be able to save the cost of pulling that data twice. You'll still pull other data twice, because the bug object assumes you want a base set of data that you probably don't need in the comments iframe. Perhaps you'd be interested in taking on the task of fixing that by converting it over to a pull model? -myk From caseyg at chsamerica.com Fri May 2 19:31:41 2003 From: caseyg at chsamerica.com (Casey Gregoire) Date: Fri, 2 May 2003 15:31:41 -0400 Subject: Using I frame to contain the additional Comments section Message-ID: I don't have the time allotted to me here to take on such an endeavor. As it is we want a bunch of custom fields implemented before I think the custom fields option in Bugzilla is usable so I am going to have to devote time to doing that. That's why when I make a change like today it has to be short and simple. I am not to savvy with perl yet either. Implementing Bugzilla was a small side project for me in the grand scheme of things. Thanks, Casey Gregoire -----Original Message----- From: Myk Melez [mailto:myk at mozilla.org] Sent: Friday, May 02, 2003 2:38 PM To: developers at bugzilla.org Subject: Re: Using I frame to contain the additional Comments section Casey Gregoire wrote: >Can anyone tell me if there was a better way to go about doing this that >would query the database only once? (I don't want to have to change the >actual source code of Bugzilla if I can avoid it.) > Currently Bugzilla generally assumes that every template wants to display everything it can, since templates were originally ported from inline HTML in the Perl script, where only one format was ever possible. Bugzilla thus pushes all the data at the template, which decides what data to display. Now that we have templates and multiple formats, we need to change that model so that Bugzilla merely hands the template a reference to a bug object, the template requests data from the bug object, and the bug object gets data from the database on demand. The template then pulls the data it wants when it wants it, and it doesn't pull any data it doesn't want. You still incur the cost of instantiating the script a second time in this model, but that cost will be effectively eliminated when mod_perl/SpeedyCGI support gets implemented (work on this is ongoing). Unfortunately not much work is happening on switching from push to pull models, but fortunately some work has already been done, and one of the pieces that was done was comments on the "show bug" page, so when you go to the "show bug" page for a specific bug, show_bug.cgi hands the template a bug object, and that bug object doesn't pull comments from the database until the template calls its "longdesc" method. Just make sure you aren't calling that method in the main template, and you should be able to save the cost of pulling that data twice. You'll still pull other data twice, because the bug object assumes you want a base set of data that you probably don't need in the comments iframe. Perhaps you'd be interested in taking on the task of fixing that by converting it over to a pull model? -myk ---- To view or change your list settings, click here: From jake at bugzilla.org Fri May 2 20:06:00 2003 From: jake at bugzilla.org (Jake) Date: Fri, 2 May 2003 16:06:00 -0400 (EDT) Subject: Using I frame to contain the additional Comments section In-Reply-To: References: Message-ID: <57853.208.20.196.122.1051905960.squirrel@mail.steenhagen.us> > I don't have the time allotted to me here to take on such an endeavor. As > it is we want a bunch of custom fields implemented before I think the custom > fields option in Bugzilla is usable so I am going to have to devote time > to doing that. That's why when I make a change like today it has to be short > and simple. I am not to savvy with perl yet either. Implementing Bugzilla > was a small side project for me in the grand scheme of things. > You may also wish to look at doing something like:
[%# Do whatever retrieves the comments %]
Which will, assumming I've remembered the CSS stuff correctly, work incredibly similar to an