Closed Bug 913208 Opened 6 years ago Closed 6 years ago

Allow deleting of tracking flags that do not have bug values set but have activity entries in bugs_activity

Categories

(bugzilla.mozilla.org :: Extensions, defect)

Production
x86_64
Linux
defect
Not set

Tracking

()

RESOLVED FIXED

People

(Reporter: dkl, Assigned: dkl)

Details

Attachments

(1 file)

Currently you cannot delete a tracking flag if the flag has either 1) currently set on one or more bugs and/or 2) has activity entries in the bugs_activity table from being previously set on bugs.

We should allow deletion as long as 1) is not true. We will just delete the bugs_activity entries at time of field removal.

dkl
Attached patch 913208_1.patchSplinter Review
I am pretty sure this patch is OK and will work fine but due to the possibility of unintended data loss, I just want you to take a quick look at it before commit :)

Thanks
dkl
Attachment #800409 - Flags: review?(glob)
Comment on attachment 800409 [details] [diff] [review]
913208_1.patch

r=glob

this looks fine.

rather than having the warning always visible (meaning we'll probably block it out), how about instead checking if the field has activity, and changing the text of the delete button:  "Delete Flag" / "Delete Flag and Activity".
Attachment #800409 - Flags: review?(glob) → review+
Committing to: bzr+ssh://dlawrence%40mozilla.com@bzr.mozilla.org/bmo/4.2
modified extensions/TrackingFlags/lib/Admin.pm
modified extensions/TrackingFlags/lib/Flag.pm                
modified extensions/TrackingFlags/template/en/default/hook/global/user-error-errors.html.tmpl
modified extensions/TrackingFlags/template/en/default/pages/tracking_flags_admin_edit.html.tmpl
Committed revision 8986.
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Component: Extensions: TrackingFlags → Extensions
You need to log in before you can comment on or make changes to this bug.