Configuring "Commit Hook: Commit Content" rules fail with Exception


#1

Observed Behavior:
New or existing rules cannot be saved. Phabricator fails with ‘Rule repetition string constant “” is unknown’ message.

Expected Behavior:
Rule is saved and works.

Phabricator Version:
Latest stable, also on Phacility.

Reproduction Steps:

  1. Start authoring Object ‘Commit Hook: Commit Content’ rule for a repo.
  2. Click ‘Save Rule’.
  3. Observe error message.

#2

Same here. Additionally in the DB the repetition_policy is OK, so it’s not NULL as I would expect from the behaviour.
Actually, I’ve already found a workaround: if you give an extra GET parameter (repetition_policy) to the edit page, it will be okay and you can save the Herald rule. (So write this at the end of the URL: ?repetition_policy=every)
But this surely needs to be fixed.


#3

Also, here are some logs about the issue:
EXCEPTION: (Exception) Rule repetition string constant "" is unknown. at [<phabricator>/src/applications/herald/storage/HeraldRule.php:269] arcanist(head=stable, ref.master=3ae0cc8d41e2, ref.stable=886f6e6360ac), phabricator(head=stable, ref.master=aba4366020b7, ref.stable=4757ff224c7f), phutil(head=stable, ref.master=fa6519f4cea1, ref.stable=53f01ac1ae78), sprint(head=master, ref.master=2bdddf418740)
#0 <#2> HeraldRule::setRepetitionPolicyStringConstant(NULL) called at [<phabricator>/src/applications/herald/controller/HeraldRuleController.php:376]
#1 <#2> HeraldRuleController::saveRule(HeraldPreCommitContentAdapter, HeraldRule, AphrontRequest) called at [<phabricator>/src/applications/herald/controller/HeraldRuleController.php:128]
#2 <#2> HeraldRuleController::handleRequest(AphrontRequest) called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:258]
#3 phlog(Exception) called at [<phabricator>/src/aphront/handler/PhabricatorDefaultRequestExceptionHandler.php:41]
#4 PhabricatorDefaultRequestExceptionHandler::handleRequestThrowable(AphrontRequest, Exception) called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:670]
#5 AphrontApplicationConfiguration::handleThrowable(Exception) called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:263]
#6 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:181]
#7 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phabricator>/webroot/index.php:17]


#4

Thanks, see https://secure.phabricator.com/D18992.