Allow multi-select fields to show up in buglist.cgi

RESOLVED FIXED in Bugzilla 4.0

Status

()

P1
enhancement
RESOLVED FIXED
11 years ago
8 years ago

People

(Reporter: mkanat, Assigned: mkanat)

Tracking

3.1.1
Bugzilla 4.0
Dependency tree / graph
Bug Flags:
approval +

Details

(Whiteboard: [3.6 Focus])

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

11 years ago
Right now multi-select fields can't be shown in buglist.cgi, because they're not in the bugs table.

Ideally this should be fixed before 3.2, but if it's just too hard or requires too much re-arch, then it can wait for 4.0.
(Assignee)

Updated

11 years ago
Priority: -- → P1
(Assignee)

Comment 1

11 years ago
Bugzilla 3.2 is now frozen. Only enhancements blocking 3.2 or specifically approved for 3.2 may be checked in to the 3.2 branch. If you would like to nominate your enhancement for Bugzilla 3.2, set the "blocking3.2" flag to "?", and either the target milestone will be changed back, or the blocking3.2 flag will be granted, if we will accept this enhancement for Bugzilla 3.2.
Target Milestone: Bugzilla 3.2 → Bugzilla 4.0

Updated

10 years ago
Duplicate of this bug: 473977
(Assignee)

Updated

9 years ago
Whiteboard: [3.6 Focus]

Updated

9 years ago
Duplicate of this bug: 504538

Updated

9 years ago
Depends on: 509497

Updated

9 years ago
Duplicate of this bug: 510577
(Assignee)

Updated

9 years ago
Target Milestone: Bugzilla 4.0 → Bugzilla 3.6

Comment 5

9 years ago
We no longer accept new features for Bugzilla 3.6. Retargetting to 3.8.
Target Milestone: Bugzilla 3.6 → Bugzilla 3.8

Comment 6

9 years ago
Wow, this bug has been skidding from release to release for several years!

I looked at the code and it's not clear how to go about this.  I tried changing colchange.cgi, but that only allows you to add it to the list of columns.  It doesn't get it displayed.
(Assignee)

Comment 7

9 years ago
(In reply to comment #6)
> Wow, this bug has been skidding from release to release for several years!

  Yeah. It could have made it for 3.6, just nobody worked on it. It's actually not all that hard, now.

> I looked at the code and it's not clear how to go about this.  I tried changing
> colchange.cgi, but that only allows you to add it to the list of columns.  It
> doesn't get it displayed.

  It's mostly Search.pm that needs to be updated, so you'll want to look at that. Feel free to find me or justdave on IRC if you need help with its code.
(Assignee)

Comment 8

9 years ago
Created attachment 431701 [details] [diff] [review]
v1

  Easy enough.
Assignee: query-and-buglist → mkanat
Status: NEW → ASSIGNED
Attachment #431701 - Flags: review?(dkl)
Comment on attachment 431701 [details] [diff] [review]
v1

Couple things I noticed when reviewing the patch:

1) There doesn't seem to be a way to turn on buglist = 1 in fielddefs for multi-select custom fields. So even though they show up now in the list in colchange.cgi, they never appear in buglist.cgi since they are still set to buglist = 0 in fielddefs. Also editfields.cgi has code to make sure that it is always buglist = 0 for multi select fields.

2) After manually updating to buglist = 1 in fielddefs (see above), the fields do appear in buglist.cgi. But selected values always show up multiple times for a single bug row. For example if I set a multi-select field to "A" and "B" in a bug, the value that displays for that bug in the buglist.cgi column is "B,B,A,A".
Attachment #431701 - Flags: review?(dkl) → review-
(Assignee)

Comment 10

9 years ago
  I can't reproduce the problem with the values multiplying. Is there some specific search you're doing?
(Assignee)

Comment 11

9 years ago
Created attachment 433031 [details] [diff] [review]
v2

Even though I can't reproduce the multiplying-values problem, I know the fix, so I added it (I added DISTINCT in the group_concat).

Existing multi-select fields have buglist = 1 set by checksetup.pl, in the patch.

I fixed editfields.cgi.

The patch to colchange.cgi is no longer necessary, thanks to another patch I just checked in that has colchange.cgi select all non-obsolete buglist-able columns from the database.
Attachment #431701 - Attachment is obsolete: true
Attachment #433031 - Flags: review?(dkl)
Comment on attachment 433031 [details] [diff] [review]
v2

Ok, works now as expected. User needs to remember to run checksetup.pl after but normally this happens with an upgrade anyway. Also made sure the new multi-select custom fields show up in buglist columns as well. My only nit is that maybe the delimiter should be changed to ", " instead of "," so that it can wrap properly in buglist.cgi. If you agree you can fix on checking. r=dkl
Attachment #433031 - Flags: review?(dkl) → review+

Updated

9 years ago
Flags: approval?
(Assignee)

Comment 13

9 years ago
  Oh yeah, I do agree about the delimiter. I'll fix it on checkin.
Flags: approval? → approval+
(Assignee)

Comment 14

9 years ago
  I did the fix on checkin. I also fixed the execute bit on contrib/fixperms.pl during this checkin, so that it stops showing up as modified in all our patches.

Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/trunk/                                                                                    
modified editfields.cgi
modified Bugzilla/Search.pm
modified Bugzilla/Install/DB.pm
modified contrib/fixperms.pl
Committed revision 7072.
Status: ASSIGNED → RESOLVED
Last Resolved: 9 years ago
Keywords: relnote
Resolution: --- → FIXED
(Assignee)

Comment 15

8 years ago
Added to the release notes in bug 604256.
Keywords: relnote
You need to log in before you can comment on or make changes to this bug.