From 0610b86f57d02c2c2ca11b5bf6cab5afbed997e8 Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 12 Jun 2017 07:44:38 -0700 Subject: [PATCH] Allow Herald rules to apply "only the first time" to Calendar events Summary: Fixes T12821. (Some events only happen once, so the default behavior doesn't let you pick this rule, and objects must opt into it by saying "yeah, I support multiple edits".) Test Plan: Note "only the first time" selected: {F4999093} Reviewers: chad Reviewed By: chad Maniphest Tasks: T12821 Differential Revision: https://secure.phabricator.com/D18117 --- .../herald/PhabricatorCalendarEventHeraldAdapter.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/applications/calendar/herald/PhabricatorCalendarEventHeraldAdapter.php b/src/applications/calendar/herald/PhabricatorCalendarEventHeraldAdapter.php index 49d5f38959..1fc3a56317 100644 --- a/src/applications/calendar/herald/PhabricatorCalendarEventHeraldAdapter.php +++ b/src/applications/calendar/herald/PhabricatorCalendarEventHeraldAdapter.php @@ -49,6 +49,13 @@ final class PhabricatorCalendarEventHeraldAdapter extends HeraldAdapter { } } + public function getRepetitionOptions() { + return array( + HeraldRepetitionPolicyConfig::EVERY, + HeraldRepetitionPolicyConfig::FIRST, + ); + } + public function getHeraldName() { return $this->getObject()->getMonogram(); }