1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-21 17:58:47 +02:00
Commit graph

370 commits

Author SHA1 Message Date
epriestley
6982bded71 Remove ancient "Holiday" storage
Summary:
Ref T11809. This came out of Facebook many years ago for computing the number of business days that revisions had been stale.

We removed the little staleness marker a few months ago and haven't seen complaints about it.

If we did holidays now it would make sense to integrate them more directly with Calendar as real events, but I have no plans to pursue this anytime soon. It's easy enough to add the federal holidays manually (~5 minutes of work per year?) if you want them, and they're commentable/editable and you can add local holidays if you're not in the US.

Test Plan:
  - Ran `bin/storage upgrade -f`.
  - Grepped for `CalendarHoliday`.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11809

Differential Revision: https://secure.phabricator.com/D16788
2016-11-01 16:03:44 -07:00
epriestley
191b9398a5 Fix some minor Calendar issues, including a paging issue on imports
Summary:
Fixes T11808. I couldn't reproduce the issue there locally so I'm just cheating a little bit until a better reproduction case shows up.

We don't need to do a full load here anyway, and testing for any row is more efficient.

Test Plan: Poked around imports without issues, but couldn't reproduce this problem locally.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11808

Differential Revision: https://secure.phabricator.com/D16787
2016-11-01 14:40:30 -07:00
epriestley
3e15e0b980 Store more datetime information on Calendar transactions and improve rendering behaviors
Summary:
Fixes T11805. Depends on D16785. This generally tries to smooth out transactions:

  - All-day stuff now says "Nov 3" instead of "Nov 3 12:00:00 AM".
  - Fewer weird bugs / extra transactions.
  - No more silly extra "yeah, you definitely set that event time" transaction on create.

Test Plan: Edited events; changed from all-day to not-all-day and back again, viewed transaction log.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11805

Differential Revision: https://secure.phabricator.com/D16786
2016-11-01 13:36:46 -07:00
epriestley
6b16f930c4 Automatically send (not-so-great) email notifications for upcoming events
Summary: Ref T7931. This is still quite rough, but should technically send vaguely-useful email as part of the standard trigger infrastructure.

Test Plan: Ran `bin/phd start`, created an event shortly, saw reminder email send in `bin/mail list-outbound`.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T7931

Differential Revision: https://secure.phabricator.com/D16784
2016-11-01 13:24:40 -07:00
epriestley
6e6ae36dcf Add a skeleton for Calendar notifications
Summary:
Ref T7931. I'm going to do this separate from existing infrastructure because:

  - events start at different times for different users;
  - I like the idea of being able to batch stuff (send one email about several upcoming events);
  - triggering on ghost/recurring events is a real complicated mess.

This puts a skeleton in place that finds all the events we need to notify about and writes some silly example bodies to stdout, marking that we notified users so they don't get notified again.

Test Plan:
Ran `bin/calendar notify`, got a "great" notification in the command output.

{F1891625}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T7931

Differential Revision: https://secure.phabricator.com/D16783
2016-11-01 10:41:15 -07:00
epriestley
a0ea31f47f When users edit recurring events, prompt to "Edit This Event" or "Edit All Future Events"
Summary:
Fixes T11804. This probably isn't perfect but seems to work fairly reasonably and not be as much of a weird nonsense mess like the old behavior was.

When a user edits a recurring event, we ask them what they're trying to do. Then we more or less do that.

Test Plan:
  - Edited an event in the middle of a series.
  - Edited the first event in a series.
  - Edited "just this" and "all future" events in various places in a series.
  - Edited normal events.
  - Cancelled various events.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11804

Differential Revision: https://secure.phabricator.com/D16782
2016-10-31 16:38:32 -07:00
epriestley
208f8ed526 Support "Edit just this event" on the parent event in a series
Summary:
Ref T11804. This one is messy because we have to fork the //next// event, possibly creating it first.

Then we can edit the parent normally.

Test Plan: Cancelled the first event in a series, only that one cancelled.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11804

Differential Revision: https://secure.phabricator.com/D16781
2016-10-31 15:30:53 -07:00
epriestley
b084efb362 Record a "series parent PHID" on Calendar events that retains relationships after forks
Summary:
When you edit "X and all future events", X becomes the new parent of an event series.

Currently, it loses its relationship to its original parent. Instead, retain that relationship -- it's separate from the normal "parent", but we can use it to make the UI more clear or tweak behaviors later.

This mostly just keeps us from losing/destroying data that we might need/want later.

Test Plan:
  - Ran migrations.
  - Cancelled "X and all future events", saw sensible-appearing beahvior in the database for "seriesParentPHID".

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D16780
2016-10-31 15:30:34 -07:00
epriestley
f44a9a4e48 Remove "isCancelledEvent()" wrapper on Calendar Events
Summary: Ref T11804. The field now reads the correct value directly and we don't need this wrapper.

Test Plan: Poked around Calendar without explosions.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11804

Differential Revision: https://secure.phabricator.com/D16779
2016-10-31 15:30:21 -07:00
epriestley
91089acbe5 Begin navigating the mess that is edits to recurring events
Summary:
Ref T11804. This puts us on a path toward some kind of reasonable behavior here.

Currently, cancelling recurring events makes approximately zero sense ever in any situation.

Instead, give users the choice to cancel just the instance, or all future events. This is similar to Calendar.app. (Google Calendar has a third option, "All Events", which I may implement).

When the user picks something, basically do that.

The particulars of "do that" are messy. We have to split the series into two different series, stop the first series early, then edit the second series. Then we need to update any concrete events that are now part of the second series.

This code will get less junk in the next couple of diffs (I hope?) since I need to make it apply to edits, too, but this was a little easier to get started with.

Test Plan:
Cancelled an instance of an event; cancelled "All future events".

Both of them more or less worked in a reasonble way.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11804

Differential Revision: https://secure.phabricator.com/D16778
2016-10-31 14:20:55 -07:00
epriestley
8e5437226f Make calendar intepret all-day dates in a more consistent way
Summary:
In ICS, an event on "Nov 1" starts on "2016-11-01" and ends on "2016-11-02".

This is convenient for computers, but this isn't what users expect to enter in date controls. They expect to enter "nov 1" to "Nov 1" for a one-day, all-day event. This is consistent with other applications.

Store the value the user entered, but treat it as the first second of the next day when actually using it if the event is an all day event.

Test Plan:
Mucked around with multi-day all-day events, recurring all-day events, imports, etc. Couldn't catch any weird/unintuitive stuff anymore offhand.

(Previously, entering "Nov 1" to "Nov 2" created a one-day event, which was unclear.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D16777
2016-10-31 14:19:35 -07:00
epriestley
f7b0c09ac4 Make the "All Day Event" control use a checkbox instead of a dropdown
Summary:
This feels a little cleaner:

  - Clean up transaction log a bit.
  - Use a checkbox instead of a two-option dropdown.

This is a little messy because the browser doesn't send anything if the user submits a form with an un-clicked checkbox.

We now send a dummy value ("Hey, there's definitely a checkbox in this form!") so the server can figure out what to do.

Test Plan:
  - Edited all-dayness of an event.
  - Viewed transaction log.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D16776
2016-10-31 14:18:59 -07:00
epriestley
182611ef7e Schedule monthly events on the 29th, 30th or 31st relative to the end of the month
Summary:
Ref T11326. If you scheudle a monthly event on the 31st, the default behavior of RRULE means that it only occurs in months with 31 days.

This is actually how Google Calendar and Calendar.app both work: if you schedule a monthly event on the 31st, you get about six events per year.

This seems real confusing and bad to me?

Instead, if the user schedules a monthly event on the 29th, 30th or 31st, pretend they scheduled it on the "last day of the month" or "second-to-last day of the month" or similar, so they always get 12 events per year.

This could be slightly confusing too, but seems way less weird than not getting an event every month.

Test Plan: Scheduled events on the 31st of October, saw them occur in November too after the patch.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11326

Differential Revision: https://secure.phabricator.com/D16775
2016-10-31 14:13:50 -07:00
epriestley
850fcf0207 Move event recurrence controls to a separate page on the workflow
Summary:
Ref T11326. Currently, the "Create Event" form is pretty wordy. One particular culprit is the "recurring" controls, which are (presumably) rarely used and visually complex.

  - Reflow the default form to hopefully feel a little better.
  - Move recurrence stuff to a separate workflow.

Test Plan:
{F1891355}

{F1891356}

{F1891357}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11326

Differential Revision: https://secure.phabricator.com/D16774
2016-10-31 14:13:36 -07:00
epriestley
e1a9b76945 Give organizers in ICS exports a dummy email address to placate Gmail
Summary:
Ref T10747. In the in-email ICS event card that Gmail shows, it has a "Who" field which reads "Unknown Organizer*" if the URI for the organizer isn't email-address-like.

Previously, we used a URI like `https://phabricator.install.com/p/username`, which I think is OK as far as RFC 5545 is concerned, but Gmail doesn't like it.

Instead, use `PHID-USER-asdfa@phabricator.install.com`, which doesn't go anywhere, but makes Gmail happy. Users don't normally see this URI anyway.

Test Plan:
Got a readable "Who" in Gmail when importing an event exported from Calendar:

{F1890571}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10747

Differential Revision: https://secure.phabricator.com/D16772
2016-10-30 09:20:54 -07:00
epriestley
d9c91f857c Apply a TYPE_CREATE transaction when importing events to improve strings in timeline
Summary: Ref T10747. This turns on the newer EditEngine behavior so we get a nice "X created this event." transaction, instead of an "X renamed this from <nothing> to Event Name."

Test Plan: Imported an event, saw a nice timeline.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10747

Differential Revision: https://secure.phabricator.com/D16771
2016-10-30 09:20:15 -07:00
epriestley
96b064b7e9 Properly import all-day events in Calendar
Summary: Ref T10747. The transaction version of this copies the "all day" flag over properly, but this non-transaction version needs to copy it explicitly.

Test Plan: Imported an all-day event, saw it come in as all-day.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10747

Differential Revision: https://secure.phabricator.com/D16770
2016-10-30 09:19:58 -07:00
epriestley
1e488e9277 When importing events, delete events which have been removed on the other end
Summary: Ref T10747. If stuff has been deleted on the other calendar, delete it on ours.

Test Plan:
Imported with deletion, saw deletions:

{F1889689}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10747

Differential Revision: https://secure.phabricator.com/D16768
2016-10-28 18:14:50 -07:00
epriestley
1014a27717 Document Calendar imports
Summary:
Ref T10747.

  - Adds import documentation.
  - Adds import/export docs to the help menu.
  - Removes some weird/old/out-of-date information from the general user guide, which I'll rewrite later.

Test Plan: Read documentation somewhat thoroughly.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10747

Differential Revision: https://secure.phabricator.com/D16766
2016-10-28 18:14:08 -07:00
epriestley
09775279a9 Support arbitary event invitees when importing events
Summary:
Ref T10747. When we import a ".ics" file, represent any attendees as simple external references.

For consistency with other areas of the product, I've avoided disclosing email addresses. We'll try to get a real name if we can.

(We store addresses and could expose or use them later, or do some kind of masking junk like "epr...ley@g...l.com" which is utterly impossible to figure out.)

Test Plan: {F1888367}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10747

Differential Revision: https://secure.phabricator.com/D16759
2016-10-27 13:27:58 -07:00
epriestley
8e9c20c9ae Make event invitees behave a little better for stub/ghost events
Summary:
Ref T11326. Currently:

  - The month view and day view (ghosts) don't show that you're invited to a child event.
  - The detail view copies the invite list, including attending status, but only //after// it shows the page for the first time.

Instead, for now, just do this:

  - Ghosts/stubs use the parent invite list, but treat everyone as "invited".
  - Materializing a stub just saves the list as-is (i.e., invited, not a copy of attending/declined/etc).

This behavior may need some refining eventually but is at least reasonable (not obviously bad/buggy).

Test Plan:
  - Viewed month/day views, now shown as "invited".
  - Viewed detail view, now invitee list shows up properly.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11326

Differential Revision: https://secure.phabricator.com/D16758
2016-10-27 13:08:56 -07:00
epriestley
4c3f09a6a6 Suggest better start/end datetimes for Calendar events
Summary:
Fixes T11638.

  - Fix a regression: I broke this "round to the nearest hour" code a while ago while fiddling with datetimes.
  - Improve a beahvior: from the day view, make the menu-bar "Create Event" button default to creating an event on the day you were viewing.

Test Plan: Created events from month and day views, got nice round numbers and proper day suggestions.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11638

Differential Revision: https://secure.phabricator.com/D16754
2016-10-26 13:10:29 -07:00
epriestley
7cb44bcee6 Don't allow "Start Time" / "End Time" in Calendar event forms to be locked or have defaults assigned
Summary: Fixes T11733. This fixes the issue by working around it, but it isn't useful to set these fields to a default value anyway.

Test Plan: Created a default Calendar form, set some other defaults, created an event, stuff no longer exploded.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11733

Differential Revision: https://secure.phabricator.com/D16753
2016-10-26 13:10:18 -07:00
epriestley
2d7f574b9d Allow Calendar imports to be configured with hourly or daily auto-updates
Summary:
Ref T10747. For URI-based (and, in the future, Google-based) imports, we can automatically refresh them periodically.

(In the general case there's no way to get a push notification for an ICS file, so we just have to do this every-so-often.)

Test Plan:
  - Set an ICS file to update hourly.
  - Used `bin/trigger fire --id ...` to fire it artificially.
  - Saw Calendar update.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10747

Differential Revision: https://secure.phabricator.com/D16752
2016-10-26 12:19:14 -07:00
epriestley
48666839fe Support RRULE "COUNT" for recurring events
Summary:
Ref T10747. RRULE events can repeat "UNTIL" a certain time, or a certain "COUNT" of times.

In the UI, we only support "UNTIL". Also support "COUNT".

Test Plan: Imported an event which repeats every other day, 5 times. Got 5 instances.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10747

Differential Revision: https://secure.phabricator.com/D16749
2016-10-25 10:38:30 -07:00
epriestley
f4a3887b6b Add an explicit "Reload Import" action to imports
Summary: Ref T10747. This makes development/debugging/testing easier and moves us closer to triggered imports (e.g., keep in sync with Google once per day).

Test Plan:
  - Reloaded an event import.
  - Edited an event in Google Calendar, reloaded, got updated event.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10747

Differential Revision: https://secure.phabricator.com/D16747
2016-10-25 10:33:14 -07:00
epriestley
314dc30017 Add a URI-based ICS import source engine
Summary: Ref T10747. This doesn't have a "keep up to date" option yet, but can, e.g., fetch a Google Calendar URI

Test Plan: Fetched a Google Calendar URI, got some events imported.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10747

Differential Revision: https://secure.phabricator.com/D16730
2016-10-19 10:55:29 -07:00
epriestley
c3de8f8305 When generating Calendar event stubs, inherit import properties
Summary:
Ref T10747. Previously, importing a recurring event failed to mark the instnaces of the event as imported.

Now, we copy the source/UID/importer over.

Test Plan: Imported a recurring event, viewed event series, saw all of them marked imported.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10747

Differential Revision: https://secure.phabricator.com/D16728
2016-10-19 09:59:24 -07:00
epriestley
d860008b6a Make event detail view more user-friendly for imported events
Summary:
Ref T10747. When viewing an imported event:

  - Make it more clear that it is imported and where it is from.
  - Add some explicit "this is imported" help.

Test Plan: Viewed imported and normal events.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10747

Differential Revision: https://secure.phabricator.com/D16727
2016-10-19 09:58:57 -07:00
epriestley
5039b9ca28 Add some descriptive properties when viewing a Calendar import
Summary: Ref T10747. When viewing an import detail page, show a little more information about what you're looking at.

Test Plan: {F1876957}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10747

Differential Revision: https://secure.phabricator.com/D16726
2016-10-19 09:58:37 -07:00
epriestley
cc0f0b3865 Don't publish feed stories or send mail about imported events
Summary: Ref T10747. Although I could possibly imagine some very selective cases where we do this eventually, these are read-only for now and not interesting to publish/mail about. The presumption is that the original/authoritative system has already notified relevant parties or they're subscribing passively.

Test Plan: Imported some name changes for events, saw no more mail/feed stuff.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10747

Differential Revision: https://secure.phabricator.com/D16723
2016-10-18 16:00:57 -07:00
epriestley
f9f25c1e4d Allow users to drop .ics files on calendar views to import them
Summary:
Ref T10747. When a user drops a ".ics" file or a bunch of ".ics" files into a calendar view, import the events.

(Possibly we should just do this if you drop ".ics" files into any application, but we can look at that later.)

Test Plan: Dropped some .ics files into calendar views, got imports.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10747

Differential Revision: https://secure.phabricator.com/D16722
2016-10-18 15:26:44 -07:00
epriestley
67cb277bed When import fails because we can't parse an ICS file, show it nicely
Summary:
Ref T10747. When we hit an ICS parser error, render it into a log instead of fataling.

(This will be more important in the future with subscription-based URL ICS import.)

Test Plan: {F1875292}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10747

Differential Revision: https://secure.phabricator.com/D16721
2016-10-18 15:24:47 -07:00
epriestley
b47a42bf55 Allow events from a particular import source to be bulk-deleted
Summary:
Ref T10747. If you accidentally import the wrong thing, you can clean up the big mess you made.

These imported events are read-only so it's OK to destroy them completely (vs disable/hide/archive).

Test Plan: Destroyed some imported events.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10747

Differential Revision: https://secure.phabricator.com/D16720
2016-10-18 15:24:06 -07:00
epriestley
94a5a09d75 Add a SearchEngine for Calendar import logs
Summary:
Ref T10747.

  - Look at more than 25 logs!
  - Review your favorite logs. Heartwarming! :)

Test Plan: Looked at logs. Wow! Logs!

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10747

Differential Revision: https://secure.phabricator.com/D16719
2016-10-18 15:23:37 -07:00
epriestley
860809ae79 Reject high-frequency and out-of-range events during import
Summary: Ref T10747. Don't let users import SECONDLY events, or events outside of the range of a signed 32-bit integer (these are likely not too hard to support, but they're more headaches than we need right now).

Test Plan: Tried to import these no-good problem events, got helpful import errors.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10747

Differential Revision: https://secure.phabricator.com/D16716
2016-10-18 10:48:05 -07:00
epriestley
3d98558593 Add import log messages to Calendar imports
Summary: Ref T10747. When stuff goes wrong (or right) let the user know what happened.

Test Plan: {F1870139}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10747

Differential Revision: https://secure.phabricator.com/D16704
2016-10-14 07:57:48 -07:00
epriestley
c2411e3dcc When viewing a Calendar import, show all the events it imported
Summary: Ref T10747. Show which events a source imported, and link to the full list as a query result.

Test Plan: {F1870049}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10747

Differential Revision: https://secure.phabricator.com/D16703
2016-10-13 09:06:32 -07:00
epriestley
6e2a86470b Support disabling calendar imports
Summary: Ref T10747. This doesn't do much for ICS file imports (you can't disable them since it doesn't do anything meaningful) but will matter more for ICS-subscription imports later.

Test Plan: Clicked "Disable" on an ICS file import, got explanatory dialog.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10747

Differential Revision: https://secure.phabricator.com/D16702
2016-10-13 09:05:55 -07:00
epriestley
ced151e6f2 Use transactions when importing events in Calendar, and update existing events
Summary:
Ref T10747.

  - Apply what changes we can with transactions, so you can see how an event has changed and import actions are more explicit.
    - I'll hide these from email/feed soon: I want them to appear on the event, but not generate notifications, since that could be especially annoying for automated events.
  - When importing, try to update existing events if we can.

Test Plan:
Imported a ".ics" file several times with minor changes, saw them reflected in the UI with transactions.

{F1870027}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10747

Differential Revision: https://secure.phabricator.com/D16701
2016-10-13 09:05:09 -07:00
epriestley
86a00ee4ab Make Calendar ICS imports sort of work in a crude, approximate way
Summary: Ref T10747. This barely works, but can technically import some event data.

Test Plan: Used import flow to import a ".ics" document.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10747

Differential Revision: https://secure.phabricator.com/D16699
2016-10-12 15:29:05 -07:00
epriestley
2ab07ed29b Prepare for event imports in Calendar
Summary:
Ref T10747. Adds a bunch of stuff so we can keep track of which events we've imported from external sources.

This doesn't do anything yet: you can't actually import anything.

Test Plan:
  - Ran `bin/storage upgrade`.
  - Clicked "Imports", saw an empty wasteland.
  - Created/edited events.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10747

Differential Revision: https://secure.phabricator.com/D16696
2016-10-12 10:45:31 -07:00
epriestley
13b4b37d30 Force a couple of Conduit results to the proper types in Calendar
Summary:
Ref T11706. Add some casts so we don't return `"0"` for `false`.

Also I forgot to document one of the things.

Test Plan: Called `calendar.event.search`.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11706

Differential Revision: https://secure.phabricator.com/D16690
2016-10-11 13:00:17 -07:00
epriestley
d79972ecb3 Provide start/end date time via Conduit for Calendar
Summary: Fixes T11706. I think this approach (roughly: provide the information in a few different formats) is generally reasonable, and should let clients choose how much date/time magic they want to do.

Test Plan: Called `calenadar.event.search`, viewed results.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11706

Differential Revision: https://secure.phabricator.com/D16688
2016-10-11 12:02:13 -07:00
epriestley
72edd36c7a Fix an issue with recurrence rules being set improperly in transaction code
Summary: Fixes T11745. I just missed this while juggling some of the internal storage.

Test Plan: Created a new event with recurrence behavior.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11745

Differential Revision: https://secure.phabricator.com/D16684
2016-10-07 08:07:57 -07:00
epriestley
bc6e6c0500 Allow Calendar exports to be disabled
Summary:
Ref T10747. This adds disable/enable to exports.

Mostly useful if you leak a URI by accident.

Test Plan:
  - Disabled and enabled exports.
  - Verified that disabled exports don't actually export any data.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10747

Differential Revision: https://secure.phabricator.com/D16681
2016-10-06 15:34:51 -07:00
epriestley
ff97ed2195 Document how to export Calendar events
Summary:
Ref T10747. This explains how exports work.

Also make mail exports use the same logic as other stuff.

Test Plan: Read documentation. Did some exports.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10747

Differential Revision: https://secure.phabricator.com/D16680
2016-10-06 15:33:01 -07:00
epriestley
4819446fe5 Export recurring events and build ICS files for configured exports
Summary:
Ref T10747. This:

  - Exports recurring events properly, with RRULE + RECURRENCE-ID.
  - When exporting a part of an event series, export the whole series to ICS so it is represented faithfully.
  - Make the subscribable URL for "Export" objects work.

Test Plan:
  - Downloaded the ".ics" for a normal event, imported it into Calendar.app and Google Calendar.
  - Downloaded the ".ics" for a recurring event, imported it into Calendar.app and Google Calendar.
  - Defined an ".ics" Export of my events, subscribed to them in Calendar.app.
    - Edited an event in Phabricator.
    - Hit {key Command R} in Calendar.app, saw changes. (MAGIC!)
    - This export included recurring events, which appeared the same way in Calendar.app and Phabricator.
  - Can't import into Google Calendar from my local install easily since Google's servers can't hit my laptop, but I'll test once we deploy.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10747

Differential Revision: https://secure.phabricator.com/D16679
2016-10-06 14:07:17 -07:00
epriestley
fa6a5a46ba Make more of the Calendar export workflow work
Summary:
Ref T10747.

  - Adds a "Use Results..." dropdown to query result pages, with actions you can take with search results (today: create export; in future: bulk edit, export as excel, make dashboard panel, etc).
  - Allows you to create an export against a query key.
    - I'm just using a text edit field for this for now.
  - Fleshes out export modes. I plan to support: public (as though you were logged out), privileged (as though you were logged in) and availability (event times, but not details).

This does not actually export stuff yet.

Test Plan: Created some exports. Viewed and listed exports.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10747

Differential Revision: https://secure.phabricator.com/D16676
2016-10-06 04:14:29 -07:00
epriestley
49448a87c1 Rough in most of Calendar exports
Summary:
Ref T10747. Rough flow is:

  - Run a query.
  - Select a new "Export Events..." action.
  - This lets you define an "Export", which has a unique URL you can paste into Google Calendar or Calendar.app or whatever.

Most of this does nothing yet but here's the boilerplate.

Test Plan: Doesn't do anything yet.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10747

Differential Revision: https://secure.phabricator.com/D16675
2016-10-06 04:06:35 -07:00