Page MenuHomePhabricator

Track how many columns use a particular trigger
ClosedPublic

Authored by epriestley on Mar 22 2019, 3:09 PM.
Tags
None
Referenced Files
F15475216: D20308.id48505.diff
Sun, Apr 6, 5:38 PM
F15475215: D20308.id48462.diff
Sun, Apr 6, 5:38 PM
F15475214: D20308.id.diff
Sun, Apr 6, 5:37 PM
F15458968: D20308.id48505.diff
Mon, Mar 31, 8:46 AM
F15437509: D20308.id48462.diff
Tue, Mar 25, 7:58 PM
F15431368: D20308.id48462.diff
Mon, Mar 24, 11:58 AM
F15427188: D20308.id.diff
Sun, Mar 23, 1:15 PM
F15424376: D20308.diff
Sat, Mar 22, 9:53 PM
Subscribers
Restricted Owners Package

Details

Summary

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

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable