Page MenuHomePhabricator

Review and rename our existing Herald rules
Closed, ResolvedPublic

Description

We have way more than 100 active Herald rules in our installation: https://phabricator.wikimedia.org/herald/

It's currently hard to recognize patterns in Herald as folks create Herald rules with rather ambiguous/vague names (like "Notify me" or "My Herald Rule").

As a benevolent Phabricator dictadmin, rename rules so it becomes possible to recognize patterns (and ideally, functionality better to be provided by different means).
This has become possible in T386703: Allow admins to rename personal Herald rules.

May come handy:

SELECT CONCAT("https://phabricator.wikimedia.org/H",hr.id) AS rule_uri, CONCAT("https://phabricator.wikimedia.org/p/",u.username) AS rule_author, hr.name, hr.ruleType, ha.action, ha.target FROM phabricator_herald.herald_action ha INNER JOIN phabricator_herald.herald_rule hr ON hr.id = ha.ruleID INNER JOIN phabricator_user.user u ON hr.authorPHID = u.phid WHERE hr.isDisabled = 0 AND hr.contentType = "HeraldManiphestTaskAdapter" ORDER BY hr.ruleType,ha.action;

Event Timeline

Note to myself: Rule UI shows "Send an email to rule author" as action. In "Edit Rule" mode that action says "Send me an email".
I only realized after removing a literally duplicate action in H87 created by Sadads. I assume that rule still works as expected.
But I should probably verify that locally before doing anything else here (that's the only action I've taken so far).

NOTE: As Personal Rules are personal, the UI shows "Send an email to rule author" as action. In "Edit Rule" mode that action says "Send me an email". Same applies for "Assign task to me" or "Send me an email". This is only the UI being misleading due to our local hack. The rules still work as expected, these "me" actions apply to the actual rule author and not to the admin. (I tested this locally.)