Closed Bug 577054 Opened 14 years ago Closed 14 years ago

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

Categories

(Bugzilla :: Administration, task)

task
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 3.6

People

(Reporter: mkanat, Assigned: mkanat)

Details

Attachments

(2 files)

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+
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.
Attached patch v1Splinter Review
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)
Attachment #456138 - Flags: review?(bugzilla) → review?(LpSolit)
Flags: blocking4.0+
Comment on attachment 456138 [details] [diff] [review]
v1

r=LpSolit
Attachment #456138 - Flags: review?(LpSolit) → review+
Bugzilla/Field/ChoiceInterface.pm doesn't exist in 3.6.1.
Flags: approval?
Flags: approval4.0?
Attached patch v1 (3.6)Splinter Review
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 on attachment 459398 [details] [diff] [review]
v1 (3.6)

Works fine. r=LpSolit
Attachment #459398 - Flags: review?(LpSolit) → review+
Flags: approval?
Flags: approval4.0?
Flags: approval4.0+
Flags: approval3.6+
Flags: approval+
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
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: