Open Bug 825642 Opened 12 years ago Updated 12 years ago

Do not ask the admin to confirm the deletion of a custom field if it cannot be deleted

Categories

(Bugzilla :: Administration, task)

task
Not set
normal

Tracking

()

People

(Reporter: LpSolit, Unassigned)

Details

Attachments

(1 file)

When a custom field is marked as obsolete, you can click the "delete" link to delete this custom field. The confirmation page asks you if you are sure, and if you are, you get an error that this custom field cannot be deleted because there are entries in the bugs_activity table for this field. So it doesn't make sense to ask the admin if he is sure; the error message should be thrown immediately.
Attached patch patch v1Splinter Review
Assignee: administration → koosha.khajeh
Status: NEW → ASSIGNED
Attachment #696801 - Flags: review?(LpSolit)
Comment on attachment 696801 [details] [diff] [review] patch v1 >+ ThrowUserError('customfield_has_contents', {'name' => $name }) if $field->has_bugs; This check is not enough. If there has been any activity about this custom field, then the deletion is impossible.
Attachment #696801 - Flags: review?(LpSolit) → review-
Assignee: koosha.khajeh → administration
Status: ASSIGNED → NEW
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: