@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Remove obsolete Calendar event date storage fields

Summary: Ref T11809. These have been replaced with more flexible storage that accommodates a wider range of behaviors, including those in the ICS format and RRULEs.

Test Plan:
- Ran migration.
- Viewed, created, edited events.
- Grepped for all removed names/symbols.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11809

Differential Revision: https://secure.phabricator.com/D16789

+21 -91
-2
resources/celerity/map.php
··· 384 384 'rsrc/js/application/calendar/behavior-day-view.js' => '4b3c4443', 385 385 'rsrc/js/application/calendar/behavior-event-all-day.js' => 'b41537c9', 386 386 'rsrc/js/application/calendar/behavior-month-view.js' => 'fe33e256', 387 - 'rsrc/js/application/calendar/behavior-recurring-edit.js' => '5f1c4d5f', 388 387 'rsrc/js/application/config/behavior-reorder-fields.js' => 'b6993408', 389 388 'rsrc/js/application/conpherence/ConpherenceThreadManager.js' => '358c717b', 390 389 'rsrc/js/application/conpherence/behavior-conpherence-search.js' => '9bbf3762', ··· 704 703 'javelin-behavior-project-create' => '065227cc', 705 704 'javelin-behavior-quicksand-blacklist' => '7927a7d3', 706 705 'javelin-behavior-read-only-warning' => 'ba158207', 707 - 'javelin-behavior-recurring-edit' => '5f1c4d5f', 708 706 'javelin-behavior-refresh-csrf' => 'ab2f381b', 709 707 'javelin-behavior-releeph-preview-branch' => 'b2b4fbaf', 710 708 'javelin-behavior-releeph-request-state-change' => 'a0b57eb8',
+17
resources/sql/autopatches/20161101.calendar.02.removecolumns.sql
··· 1 + ALTER TABLE {$NAMESPACE}_calendar.calendar_event 2 + DROP allDayDateFrom; 3 + 4 + ALTER TABLE {$NAMESPACE}_calendar.calendar_event 5 + DROP allDayDateTo; 6 + 7 + ALTER TABLE {$NAMESPACE}_calendar.calendar_event 8 + DROP dateFrom; 9 + 10 + ALTER TABLE {$NAMESPACE}_calendar.calendar_event 11 + DROP dateTo; 12 + 13 + ALTER TABLE {$NAMESPACE}_calendar.calendar_event 14 + DROP recurrenceEndDate; 15 + 16 + ALTER TABLE {$NAMESPACE}_calendar.calendar_event 17 + DROP recurrenceFrequency;
+4 -45
src/applications/calendar/storage/PhabricatorCalendarEvent.php
··· 52 52 53 53 private $viewerTimezone; 54 54 55 - // TODO: DEPRECATED. Remove once we're sure the migrations worked. 56 - protected $allDayDateFrom; 57 - protected $allDayDateTo; 58 - protected $dateFrom; 59 - protected $dateTo; 60 - protected $recurrenceEndDate; 61 - protected $recurrenceFrequency = array(); 62 - 63 55 private $isGhostEvent = false; 64 56 private $stubInvitees; 65 57 ··· 95 87 ->setEditPolicy($edit_policy) 96 88 ->setSpacePHID($actor->getDefaultSpacePHID()) 97 89 ->attachInvitees(array()) 98 - ->setDateFrom(0) 99 - ->setDateTo(0) 100 - ->setAllDayDateFrom(0) 101 - ->setAllDayDateTo(0) 102 90 ->setStartDateTime($datetime_start) 103 91 ->setEndDateTime($datetime_end) 104 92 ->attachImportSource(null) ··· 154 142 ->setSequenceIndex($sequence) 155 143 ->setIsRecurring(true) 156 144 ->attachParentEvent($this) 157 - ->attachImportSource(null) 158 - ->setAllDayDateFrom(0) 159 - ->setAllDayDateTo(0) 160 - ->setDateFrom(0) 161 - ->setDateTo(0); 145 + ->attachImportSource(null); 162 146 163 147 return $child->copyFromParent($actor, $start); 164 148 } ··· 421 405 'importSourcePHID' => 'phid?', 422 406 'importUIDIndex' => 'bytes12?', 423 407 'importUID' => 'text?', 424 - 425 - // TODO: DEPRECATED. 426 - 'allDayDateFrom' => 'epoch', 427 - 'allDayDateTo' => 'epoch', 428 - 'dateFrom' => 'epoch', 429 - 'dateTo' => 'epoch', 430 - 'recurrenceEndDate' => 'epoch?', 431 408 ), 432 409 self::CONFIG_KEY_SCHEMA => array( 433 - 'key_date' => array( 434 - 'columns' => array('dateFrom', 'dateTo'), 435 - ), 436 410 'key_instance' => array( 437 411 'columns' => array('instanceOfEventPHID', 'sequenceIndex'), 438 412 'unique' => true, ··· 449 423 ), 450 424 ), 451 425 self::CONFIG_SERIALIZATION => array( 452 - 'recurrenceFrequency' => self::SERIALIZATION_JSON, 453 426 'parameters' => self::SERIALIZATION_JSON, 454 427 ), 455 428 ) + parent::getConfiguration(); ··· 845 818 846 819 public function newStartDateTime() { 847 820 $datetime = $this->getParameter('startDateTime'); 848 - if ($datetime) { 849 - return $this->newDateTimeFromDictionary($datetime); 850 - } 851 - 852 - $epoch = $this->getDateFrom(); 853 - return $this->newDateTimeFromEpoch($epoch); 821 + return $this->newDateTimeFromDictionary($datetime); 854 822 } 855 823 856 824 public function getStartDateTimeEpoch() { ··· 859 827 860 828 public function newEndDateTimeForEdit() { 861 829 $datetime = $this->getParameter('endDateTime'); 862 - if ($datetime) { 863 - return $this->newDateTimeFromDictionary($datetime); 864 - } 865 - 866 - $epoch = $this->getDateTo(); 867 - return $this->newDateTimeFromEpoch($epoch); 830 + return $this->newDateTimeFromDictionary($datetime); 868 831 } 869 832 870 833 public function newEndDateTime() { ··· 896 859 return $this->newDateTimeFromDictionary($datetime); 897 860 } 898 861 899 - $epoch = $this->getRecurrenceEndDate(); 900 - if (!$epoch) { 901 - return null; 902 - } 903 - return $this->newDateTimeFromEpoch($epoch); 862 + return null; 904 863 } 905 864 906 865 public function getUntilDateTimeEpoch() {
-3
src/applications/calendar/xaction/PhabricatorCalendarEventUntilDateTransaction.php
··· 18 18 $actor = $this->getActor(); 19 19 $editor = $this->getEditor(); 20 20 21 - // TODO: DEPRECATED. 22 - $object->setRecurrenceEndDate($value); 23 - 24 21 $datetime = PhutilCalendarAbsoluteDateTime::newFromDictionary($value); 25 22 $datetime->setIsAllDay($editor->getNewIsAllDay()); 26 23
-41
webroot/rsrc/js/application/calendar/behavior-recurring-edit.js
··· 1 - /** 2 - * @provides javelin-behavior-recurring-edit 3 - */ 4 - 5 - 6 - JX.behavior('recurring-edit', function(config) { 7 - var checkbox = JX.$(config.isRecurring); 8 - var frequency = JX.$(config.frequency); 9 - var end_date = JX.$(config.recurrenceEndDate); 10 - 11 - var end_date_checkbox = JX.DOM.find(end_date, 'input', 'calendar-enable'); 12 - 13 - JX.DOM.listen(checkbox, 'change', null, function() { 14 - if (checkbox.checked) { 15 - enableRecurring(); 16 - } else { 17 - disableRecurring(); 18 - } 19 - }); 20 - 21 - JX.DOM.listen(end_date, 'change', null, function() { 22 - if (end_date_checkbox.checked) { 23 - enableRecurring(); 24 - } 25 - }); 26 - 27 - function enableRecurring() { 28 - checkbox.checked = true; 29 - frequency.disabled = false; 30 - end_date.disabled = false; 31 - } 32 - 33 - function disableRecurring() { 34 - checkbox.checked = false; 35 - frequency.disabled = true; 36 - end_date.disabled = true; 37 - end_date_checkbox.checked = false; 38 - 39 - JX.DOM.alterClass(end_date, 'datepicker-disabled', true); 40 - } 41 - });