1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-25 06:50:55 +01:00

Trim transaction overload when converting events from all-day and back

Summary: Closes T8136, Trim transaction overload when converting events from all-day and back

Test Plan: Create new event, save, edit, change to all-day, save, remove all-day flag, save. Feed should not show "end date changed" transaction

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8136

Differential Revision: https://secure.phabricator.com/D12781
This commit is contained in:
lkassianik 2015-05-08 17:04:02 -07:00
parent ddb62d1ec3
commit dd8e4ff056
2 changed files with 4 additions and 3 deletions

View file

@ -51,7 +51,7 @@ final class PhabricatorCalendarEventEditor
case PhabricatorCalendarEventTransaction::TYPE_CANCEL: case PhabricatorCalendarEventTransaction::TYPE_CANCEL:
return $object->getIsCancelled(); return $object->getIsCancelled();
case PhabricatorCalendarEventTransaction::TYPE_ALL_DAY: case PhabricatorCalendarEventTransaction::TYPE_ALL_DAY:
return $object->getIsAllDay(); return (int)$object->getIsAllDay();
case PhabricatorCalendarEventTransaction::TYPE_INVITE: case PhabricatorCalendarEventTransaction::TYPE_INVITE:
$map = $xaction->getNewValue(); $map = $xaction->getNewValue();
$phids = array_keys($map); $phids = array_keys($map);
@ -89,8 +89,9 @@ final class PhabricatorCalendarEventEditor
case PhabricatorCalendarEventTransaction::TYPE_DESCRIPTION: case PhabricatorCalendarEventTransaction::TYPE_DESCRIPTION:
case PhabricatorCalendarEventTransaction::TYPE_CANCEL: case PhabricatorCalendarEventTransaction::TYPE_CANCEL:
case PhabricatorCalendarEventTransaction::TYPE_INVITE: case PhabricatorCalendarEventTransaction::TYPE_INVITE:
case PhabricatorCalendarEventTransaction::TYPE_ALL_DAY:
return $xaction->getNewValue(); return $xaction->getNewValue();
case PhabricatorCalendarEventTransaction::TYPE_ALL_DAY:
return (int)$xaction->getNewValue();
case PhabricatorCalendarEventTransaction::TYPE_STATUS: case PhabricatorCalendarEventTransaction::TYPE_STATUS:
return (int)$xaction->getNewValue(); return (int)$xaction->getNewValue();
case PhabricatorCalendarEventTransaction::TYPE_START_DATE: case PhabricatorCalendarEventTransaction::TYPE_START_DATE:

View file

@ -71,7 +71,7 @@ final class PhabricatorCalendarEvent extends PhabricatorCalendarDAO
$this->getDateEpochForTimeZone( $this->getDateEpochForTimeZone(
$this->getDateTo(), $this->getDateTo(),
new DateTimeZone('Pacific/Midway'), new DateTimeZone('Pacific/Midway'),
'Y-m-d 23:59:59', 'Y-m-d 23:59:00',
'-1 day', '-1 day',
$zone)); $zone));