mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-26 08:42:41 +01:00
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
This commit is contained in:
parent
6982bded71
commit
3f2f81a1c8
5 changed files with 21 additions and 91 deletions
|
@ -384,7 +384,6 @@ return array(
|
|||
'rsrc/js/application/calendar/behavior-day-view.js' => '4b3c4443',
|
||||
'rsrc/js/application/calendar/behavior-event-all-day.js' => 'b41537c9',
|
||||
'rsrc/js/application/calendar/behavior-month-view.js' => 'fe33e256',
|
||||
'rsrc/js/application/calendar/behavior-recurring-edit.js' => '5f1c4d5f',
|
||||
'rsrc/js/application/config/behavior-reorder-fields.js' => 'b6993408',
|
||||
'rsrc/js/application/conpherence/ConpherenceThreadManager.js' => '358c717b',
|
||||
'rsrc/js/application/conpherence/behavior-conpherence-search.js' => '9bbf3762',
|
||||
|
@ -704,7 +703,6 @@ return array(
|
|||
'javelin-behavior-project-create' => '065227cc',
|
||||
'javelin-behavior-quicksand-blacklist' => '7927a7d3',
|
||||
'javelin-behavior-read-only-warning' => 'ba158207',
|
||||
'javelin-behavior-recurring-edit' => '5f1c4d5f',
|
||||
'javelin-behavior-refresh-csrf' => 'ab2f381b',
|
||||
'javelin-behavior-releeph-preview-branch' => 'b2b4fbaf',
|
||||
'javelin-behavior-releeph-request-state-change' => 'a0b57eb8',
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
ALTER TABLE {$NAMESPACE}_calendar.calendar_event
|
||||
DROP allDayDateFrom;
|
||||
|
||||
ALTER TABLE {$NAMESPACE}_calendar.calendar_event
|
||||
DROP allDayDateTo;
|
||||
|
||||
ALTER TABLE {$NAMESPACE}_calendar.calendar_event
|
||||
DROP dateFrom;
|
||||
|
||||
ALTER TABLE {$NAMESPACE}_calendar.calendar_event
|
||||
DROP dateTo;
|
||||
|
||||
ALTER TABLE {$NAMESPACE}_calendar.calendar_event
|
||||
DROP recurrenceEndDate;
|
||||
|
||||
ALTER TABLE {$NAMESPACE}_calendar.calendar_event
|
||||
DROP recurrenceFrequency;
|
|
@ -52,14 +52,6 @@ final class PhabricatorCalendarEvent extends PhabricatorCalendarDAO
|
|||
|
||||
private $viewerTimezone;
|
||||
|
||||
// TODO: DEPRECATED. Remove once we're sure the migrations worked.
|
||||
protected $allDayDateFrom;
|
||||
protected $allDayDateTo;
|
||||
protected $dateFrom;
|
||||
protected $dateTo;
|
||||
protected $recurrenceEndDate;
|
||||
protected $recurrenceFrequency = array();
|
||||
|
||||
private $isGhostEvent = false;
|
||||
private $stubInvitees;
|
||||
|
||||
|
@ -95,10 +87,6 @@ final class PhabricatorCalendarEvent extends PhabricatorCalendarDAO
|
|||
->setEditPolicy($edit_policy)
|
||||
->setSpacePHID($actor->getDefaultSpacePHID())
|
||||
->attachInvitees(array())
|
||||
->setDateFrom(0)
|
||||
->setDateTo(0)
|
||||
->setAllDayDateFrom(0)
|
||||
->setAllDayDateTo(0)
|
||||
->setStartDateTime($datetime_start)
|
||||
->setEndDateTime($datetime_end)
|
||||
->attachImportSource(null)
|
||||
|
@ -154,11 +142,7 @@ final class PhabricatorCalendarEvent extends PhabricatorCalendarDAO
|
|||
->setSequenceIndex($sequence)
|
||||
->setIsRecurring(true)
|
||||
->attachParentEvent($this)
|
||||
->attachImportSource(null)
|
||||
->setAllDayDateFrom(0)
|
||||
->setAllDayDateTo(0)
|
||||
->setDateFrom(0)
|
||||
->setDateTo(0);
|
||||
->attachImportSource(null);
|
||||
|
||||
return $child->copyFromParent($actor, $start);
|
||||
}
|
||||
|
@ -421,18 +405,8 @@ final class PhabricatorCalendarEvent extends PhabricatorCalendarDAO
|
|||
'importSourcePHID' => 'phid?',
|
||||
'importUIDIndex' => 'bytes12?',
|
||||
'importUID' => 'text?',
|
||||
|
||||
// TODO: DEPRECATED.
|
||||
'allDayDateFrom' => 'epoch',
|
||||
'allDayDateTo' => 'epoch',
|
||||
'dateFrom' => 'epoch',
|
||||
'dateTo' => 'epoch',
|
||||
'recurrenceEndDate' => 'epoch?',
|
||||
),
|
||||
self::CONFIG_KEY_SCHEMA => array(
|
||||
'key_date' => array(
|
||||
'columns' => array('dateFrom', 'dateTo'),
|
||||
),
|
||||
'key_instance' => array(
|
||||
'columns' => array('instanceOfEventPHID', 'sequenceIndex'),
|
||||
'unique' => true,
|
||||
|
@ -449,7 +423,6 @@ final class PhabricatorCalendarEvent extends PhabricatorCalendarDAO
|
|||
),
|
||||
),
|
||||
self::CONFIG_SERIALIZATION => array(
|
||||
'recurrenceFrequency' => self::SERIALIZATION_JSON,
|
||||
'parameters' => self::SERIALIZATION_JSON,
|
||||
),
|
||||
) + parent::getConfiguration();
|
||||
|
@ -845,28 +818,18 @@ final class PhabricatorCalendarEvent extends PhabricatorCalendarDAO
|
|||
|
||||
public function newStartDateTime() {
|
||||
$datetime = $this->getParameter('startDateTime');
|
||||
if ($datetime) {
|
||||
return $this->newDateTimeFromDictionary($datetime);
|
||||
}
|
||||
|
||||
$epoch = $this->getDateFrom();
|
||||
return $this->newDateTimeFromEpoch($epoch);
|
||||
}
|
||||
|
||||
public function getStartDateTimeEpoch() {
|
||||
return $this->newStartDateTime()->getEpoch();
|
||||
}
|
||||
|
||||
public function newEndDateTimeForEdit() {
|
||||
$datetime = $this->getParameter('endDateTime');
|
||||
if ($datetime) {
|
||||
return $this->newDateTimeFromDictionary($datetime);
|
||||
}
|
||||
|
||||
$epoch = $this->getDateTo();
|
||||
return $this->newDateTimeFromEpoch($epoch);
|
||||
}
|
||||
|
||||
public function newEndDateTime() {
|
||||
$datetime = $this->newEndDateTimeForEdit();
|
||||
|
||||
|
@ -896,12 +859,8 @@ final class PhabricatorCalendarEvent extends PhabricatorCalendarDAO
|
|||
return $this->newDateTimeFromDictionary($datetime);
|
||||
}
|
||||
|
||||
$epoch = $this->getRecurrenceEndDate();
|
||||
if (!$epoch) {
|
||||
return null;
|
||||
}
|
||||
return $this->newDateTimeFromEpoch($epoch);
|
||||
}
|
||||
|
||||
public function getUntilDateTimeEpoch() {
|
||||
$datetime = $this->newUntilDateTime();
|
||||
|
|
|
@ -18,9 +18,6 @@ final class PhabricatorCalendarEventUntilDateTransaction
|
|||
$actor = $this->getActor();
|
||||
$editor = $this->getEditor();
|
||||
|
||||
// TODO: DEPRECATED.
|
||||
$object->setRecurrenceEndDate($value);
|
||||
|
||||
$datetime = PhutilCalendarAbsoluteDateTime::newFromDictionary($value);
|
||||
$datetime->setIsAllDay($editor->getNewIsAllDay());
|
||||
|
||||
|
|
|
@ -1,41 +0,0 @@
|
|||
/**
|
||||
* @provides javelin-behavior-recurring-edit
|
||||
*/
|
||||
|
||||
|
||||
JX.behavior('recurring-edit', function(config) {
|
||||
var checkbox = JX.$(config.isRecurring);
|
||||
var frequency = JX.$(config.frequency);
|
||||
var end_date = JX.$(config.recurrenceEndDate);
|
||||
|
||||
var end_date_checkbox = JX.DOM.find(end_date, 'input', 'calendar-enable');
|
||||
|
||||
JX.DOM.listen(checkbox, 'change', null, function() {
|
||||
if (checkbox.checked) {
|
||||
enableRecurring();
|
||||
} else {
|
||||
disableRecurring();
|
||||
}
|
||||
});
|
||||
|
||||
JX.DOM.listen(end_date, 'change', null, function() {
|
||||
if (end_date_checkbox.checked) {
|
||||
enableRecurring();
|
||||
}
|
||||
});
|
||||
|
||||
function enableRecurring() {
|
||||
checkbox.checked = true;
|
||||
frequency.disabled = false;
|
||||
end_date.disabled = false;
|
||||
}
|
||||
|
||||
function disableRecurring() {
|
||||
checkbox.checked = false;
|
||||
frequency.disabled = true;
|
||||
end_date.disabled = true;
|
||||
end_date_checkbox.checked = false;
|
||||
|
||||
JX.DOM.alterClass(end_date, 'datepicker-disabled', true);
|
||||
}
|
||||
});
|
Loading…
Reference in a new issue