1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-15 03:12:41 +01:00
phorge-phorge/src/applications/herald
epriestley ef121b3e17 Fix a Herald repetition policy selection error for rule types which support only one policy
Summary:
Ref T13048. See <https://discourse.phabricator-community.org/t/configuring-commit-hook-commit-content-rules-fail-with-exception/1077/3>.

When a rule supports only one repetition policy (always "every time") like "Commit Hook" rules, we don't render a control for `repetition_policy` and fail to update it when saving.

Before the changes to support the new "if the rule did not match the last time" policy, this workflow just defaulted to "every time" if the input was invalid, but this was changed by accident in D18926 when I removed some of the toInt/toString juggling code.

(This patch also prevents users from fiddling with the form to create a rule which evaluates with an invalid policy; this wasn't validated before.)

Test Plan:
  - Created new "Commit Hook" (only one policy available) rule.
  - Saved existing "Commit Hook" rule.
  - Created new "Task" (multiple policies) rule.
  - Saved existing Task rule.
  - Set task rule to each repetition policy, saved, verified the save worked.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13048

Differential Revision: https://secure.phabricator.com/D18992
2018-02-05 13:35:36 -08:00
..
action Allow Herald rules to add comments 2017-12-18 09:10:57 -08:00
adapter Add a Herald action to trigger "Must Encrypt" for mail 2018-02-02 14:35:26 -08:00
application Move FontIcon calls to Icon 2016-01-28 08:48:45 -08:00
capability Simplify the implementation of PhabricatorPolicyCapability subclasses 2014-07-25 08:25:42 +10:00
config Remove "HeraldRepetitionPolicyConfig" and hide storage details inside HeraldRule 2018-01-26 11:03:29 -08:00
contentsource Modularize content sources 2016-03-26 11:59:45 -07:00
controller Fix a Herald repetition policy selection error for rule types which support only one policy 2018-02-05 13:35:36 -08:00
editor Remove "HeraldRepetitionPolicyConfig" and hide storage details inside HeraldRule 2018-01-26 11:03:29 -08:00
engine Implement an "only if the rule did not match last time" policy for Herald rules 2018-01-26 11:06:13 -08:00
engineextension Fully modularize DestructionEngine 2015-12-21 17:03:44 -08:00
field Mark the "Reviewer" field for Commits as deprecated 2018-01-26 11:07:02 -08:00
garbagecollector Provide bin/garbage for interacting with garbage collection 2015-10-02 09:17:24 -07:00
group Make Herald action modularization more aggressive 2015-08-03 14:33:20 -07:00
phid In Remarkup, render archived Herald rules with strikethrough for consistency 2016-12-08 12:37:54 -08:00
query Reduce application search engine results list for Dashboards 2017-02-22 12:42:43 -08:00
remarkup Rename PhutilRemarkupRule subclasses 2014-08-05 00:55:43 +10:00
state Prepare TransactionEditor for silent transactions via bulk edit 2018-01-19 13:23:38 -08:00
storage Implement an "only if the rule did not match last time" policy for Herald rules 2018-01-26 11:06:13 -08:00
typeahead Search builds based on who kicked them off 2016-07-31 20:54:44 +00:00
value Respect token limits for "Assign to" and custom datasource fields in Herald 2018-01-22 11:54:12 -08:00