Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import fails, seemingly because of no end time #486

Closed
jordanmendler opened this issue Sep 25, 2019 · 4 comments · Fixed by #771
Closed

Import fails, seemingly because of no end time #486

jordanmendler opened this issue Sep 25, 2019 · 4 comments · Fixed by #771
Labels
Milestone

Comments

@jordanmendler
Copy link

jordanmendler commented Sep 25, 2019

I have an ICS file that was given by my healthcare provider (UCLA). This seems to have been generated through Epic, which is one of the main ERP systems for healthcare, as almost every hospital or clinic I have been to uses Epic regardless of which state. When I try to import it I get the error "Error: event does not have a dtstart and dtend!" Doing some debugging, DTSTART it indeed present in the ICS, but DTEND is not.

I can, however, successfully import it through Google's import page, and when they add the event to my calendar they just set the duration to 1 hour.

As such, rather than failing with an ambiguous message, I'd propose one of the following, in order of what I see as best to worst-case solution in terms of UX:

  1. If no End Time, show an event creation window with all of the other event details populated along with a default end time of 1 hour where they can then adjust accordingly
  2. Add event, assuming a 1-hour duration, the same way google does
  3. If you don't like assuming 1-hour, maybe warn them and ask if they to type y to accept or something like that
  4. Show error message asking them to specify an end day/time or event duration via command-line argument

Here is the ICS with some information redacted for privacy:

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Epic Systems Corporation//MyChart//EN
METHOD:REQUEST
BEGIN:VEVENT
UID:[email protected]
ORGANIZER;CN=myUCLAhealth:[email protected]
DTSTAMP:20190925T184136Z
DTSTART:20190925T211500Z
SUMMARY;LANGUAGE=en-US:REDACTED
LOCATION;LANGUAGE=en-US:REDACTED
DESCRIPTION;LANGUAGE=en-US:Phone: REDACTED\n
END:VEVENT
END:VCALENDAR

And here is the execution with some info redacted for privacy:

jordan@jordan-laptop:~$ gcalcli --calendar [email protected] import -v ~/downloads/Upcoming\ Appointment.ics
+----------------+
| Calendar Event |
+----------------+
Event........REDACTED
Location.....REDACTED
Error: event does not have a dtstart and dtend!

@jcrowgey
Copy link
Collaborator

Thanks for the report and the suggested fixes. I haven't used the ICS import stuff very much myself. So I don't have a strong opinion about how to proceed. We already do have a lot of prompts in our UX, so adding the prompt for user input fits with what we're already doing. I don't want to pop up "windows", however, since part of the point of gcalcli is that you can use it in a non-graphical environment.

Basically, if someone who uses the ICS stuff brings forward an implementation of (2), (3) or (4), I'd be looking to merge it.

@tschwinge
Copy link
Contributor

Does my #282 "CreateEventFromVOBJ: if there is no dtend, use the duration if available" help?

@jcrowgey
Copy link
Collaborator

jcrowgey commented Dec 18, 2019

I'm quite behind on reviewing that. Sorry! @jordanmendler, have you tried that branch to see if it's an improvement over master?

@littleyoda
Copy link

littleyoda commented Jan 24, 2024

4 years later ...

Does my #282 "CreateEventFromVOBJ: if there is no dtend, use the duration if available" help?

I had the same problem. And your PR solved it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants