Note: There are a few cases of duplicates in user autocompletion which are being worked on.

Cannot delete any field value if that value's field controls any values

RESOLVED FIXED in Bugzilla 3.6

Status

()

Bugzilla
Administration
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: Max Kanat-Alexander, Assigned: Max Kanat-Alexander)

Tracking

Bugzilla 3.6
Bug Flags:
approval +
approval4.0 +
blocking4.0 +
approval3.6 +
blocking3.6.2 +

Details

Attachments

(2 attachments)

(Assignee)

Description

7 years ago
Situation:

Field A is a value controller.
Field A has Value 1 that doesn't control any values.
You try to delete Value 1, and Bugzilla will throw an error that you can't delete it, because it controls (empty list of values).
Flags: blocking3.6.2+
(Assignee)

Comment 1

7 years ago
This proves that either people don't use value controllers much, or that they don't delete field values very often. (More likely the latter.) The reason I say this is that this bug has been around for pretty much as long as we've had value controllers, and nobody's reported it.
(Assignee)

Comment 2

7 years ago
Created attachment 456138 [details] [diff] [review]
v1

Okay, this applies to HEAD at least. I'm not sure if it will also apply to 3.6--I forget when I split things out into ChoiceInterface.
Assignee: administration → mkanat
Status: NEW → ASSIGNED
Attachment #456138 - Flags: review?(bugzilla)
(Assignee)

Updated

7 years ago
Attachment #456138 - Flags: review?(bugzilla) → review?(LpSolit)
(Assignee)

Updated

7 years ago
Flags: blocking4.0+

Comment 3

7 years ago
Comment on attachment 456138 [details] [diff] [review]
v1

r=LpSolit
Attachment #456138 - Flags: review?(LpSolit) → review+

Comment 4

7 years ago
Bugzilla/Field/ChoiceInterface.pm doesn't exist in 3.6.1.
Flags: approval?
Flags: approval4.0?
(Assignee)

Comment 5

7 years ago
Created attachment 459398 [details] [diff] [review]
v1 (3.6)

Okay, I haven't tested this (I have to go to sleep right now, and setting up a testing environment was taking too long) but it compiles and it's basically just a straightforward backport. All I did was copy identical code into the right place.
Attachment #459398 - Flags: review?(LpSolit)

Comment 6

7 years ago
Comment on attachment 459398 [details] [diff] [review]
v1 (3.6)

Works fine. r=LpSolit
Attachment #459398 - Flags: review?(LpSolit) → review+

Updated

7 years ago
Flags: approval?
Flags: approval4.0?
Flags: approval4.0+
Flags: approval3.6+
Flags: approval+
(Assignee)

Comment 7

7 years ago
Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/trunk/
modified Bugzilla/Field/ChoiceInterface.pm
modified template/en/default/admin/fieldvalues/confirm-delete.html.tmpl
Committed revision 7396.

Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/4.0/
modified Bugzilla/Field/ChoiceInterface.pm
modified template/en/default/admin/fieldvalues/confirm-delete.html.tmpl
Committed revision 7340.

Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/3.6/
modified Bugzilla/Field/Choice.pm
modified template/en/default/admin/fieldvalues/confirm-delete.html.tmpl
Committed revision 7143.
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.