calopter / googlecl

Automatically exported from code.google.com/p/googlecl
0 stars 0 forks source link

Calendar reminders only work if the user's calendar already has a default reminder #495

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Make sure your calendar does NOT have a default reminder:
  - Go to Calendar website, http://www.google.com/calendar
  - Navigate to Settings
  - Click "Calendars" tab
  - Click "Notifications" link next to your calendar
  - Near the top, make sure it says, "No reminders set."
    If it doesn't, then remove any existing reminders.
2. From the google command line, add a calendar event with a reminder:
        google calendar add "7pm dinner" --reminder 1h
3. On the website, look at that event. Although you will see an alarm-clock 
icon when you hover over the event, if you click it, you will NOT see any 
reminders. If you actually wait until the designated time, you will see that no 
reminders are sent.
4. Now repeat step 1, but this time, do add a default reminder: Pop-up, 10 
minutes.
5. Add another event with a reminder:
        google calendar add "9pm movie" --reminder 1h
6. Look at that event on the website; now, the reminder is set correctly, and 
it will work.

What is the expected output? What do you see instead?
Expected behavior: If there is no default reminder set, the "--reminder" flag 
should either work (picking perhaps "Pop-up" as the default reminder method), 
or else it should report back an error, and tell the user they must specify a 
method (pop-up, sms, or email).

The problem seems to be the lack of a "method".  googlecl creates an instance 
of a GData "Reminder" object, and it passes in a "minutes" parameter, but it 
does not pass in a "method" parameter.  GData then posts that to the website.  
If your calendar already has a default reminder, then it knows what "method" to 
use; but if your calendar does not have a default reminder, then I guess the 
"method" stays blank, so the reminder doesn't work.

Maybe the "--reminder" option should require a "method" part?  Not sure.

What version of the product are you using? On what operating system? What
version of gdata-python-client (aka python-gdata)?
OS X Mountain Lion
googlecl 0.9.13
python-gdata 2.0.17

Original issue reported on code.google.com by m...@morearty.com on 7 Sep 2012 at 11:50