Page MenuHomePhabricator

Track how many columns use a particular trigger

Authored by epriestley on Mar 22 2019, 3:09 PM.
Referenced Files
F13216342: D20308.id48505.diff
Sat, May 18, 12:11 AM
F13205510: D20308.diff
Wed, May 15, 2:01 AM
F13189256: D20308.diff
Sat, May 11, 5:49 AM
Unknown Object (File)
Tue, May 7, 9:34 AM
Unknown Object (File)
Fri, May 3, 10:06 PM
Unknown Object (File)
Fri, May 3, 9:23 AM
Unknown Object (File)
Thu, Apr 25, 3:00 AM
Unknown Object (File)
Mon, Apr 22, 12:34 PM
Restricted Owners Package



Ref T5474. In 99% of cases, a separate "archived/active" status for triggers probably doesn't make much sense: there's not much reason to ever disable/archive a trigger explcitly, and the archival rule is really just "is this trigger used by anything?".

(The one reason I can think of to disable a trigger manually is because you want to put something in a column and skip trigger rules, but you can already do this from the task detail page anyway, and disabling the trigger globally is a bad way to accomplish this if it's in use by other columns.)

Instead of adding a separate "status", just track how many columns a trigger is used by and consider it "inactive" if it is not used by any active columns.

Test Plan

This is slightly hard to test exhaustively since you can't share a trigger across multiple columns right now, but: rebuild indexes, poked around the trigger list and trigger details, added/removed triggers.

Diff Detail

rP Phabricator
Lint Not Applicable
Tests Not Applicable