Open Bug 1382086 Opened 8 years ago Updated 6 years ago

No duplicate active flag names for a component should be an invariant

Categories

(bugzilla.mozilla.org :: General, enhancement, P5)

Production
enhancement

Tracking

()

People

(Reporter: dylan, Unassigned)

Details

editflagstypes.cgi must enforce as an invariant that active flags cannot have the same in the same component. We can't really enforce this at the database level (I think) because of how flags can be arbitrarily included/excluded, but we can do this in the business logic which all seems to live in editflagtypes.cgi dkl: does this seem possible?
Flags: needinfo?(dkl)
No longer blocks: 1382085
Component: Administration → General
Priority: -- → P5
Summary: New invariant: No duplicate active flag names for a component → No duplicate active flag names for a component should be an invariant
(In reply to Dylan Hardison [:dylan] (he/him) from comment #0) > editflagstypes.cgi must enforce as an invariant that active flags cannot > have the same in the same component. > > We can't really enforce this at the database level (I think) because of how > flags can be arbitrarily included/excluded, but we can do this in the > business logic which all seems to live in editflagtypes.cgi > > dkl: does this seem possible? Yes it seems like it would be possible. You would just to figure out how to do the check after submit and throw the appropriate error if the flag name is already present for a given product/component. Won't be trivial though as you will need to figure out how to do it without looping through each component of the products selected and checking for a matching name. Would be very inefficient. Would have to try out few different methods. But overall I feel it is a good idea to not allow more than one flag with the same name for a product/component.
Flags: needinfo?(dkl)
Assignee: dylan → nobody
You need to log in before you can comment on or make changes to this bug.