This is absolutely brilliant stuff!

Can I be as bold as to make a minor suggestion?  Would it help if the
openchangeclient returned the new ID on a create event?  Scenario for me
is calling this from a web application... if I can grab the ID at the
point of save I can store it to the database (and it's sufficient if
it's just output to the terminal, I can grab that no problem).  Then, if
the user subsequently edits via the web application, I can call update
instead of create if an ID is present (or create if not).

I guess I could list back as per below - but some of these people have
busy schedules and I'm willing to bet more than one meeting with the
same name!

What do you think?  Great work again Julien, really liking this.  :-)

Cheers,
Gary

On Thu, 2008-02-21 at 13:47 +0100, Julien Kerihuel wrote:

> Hi List,
> 
> Following some user requests - and also cause I'll be able to reuse
> pieces of this code in backup tools - I've implemented the --update
> feature which gives user the ability to edit existing items. The patch
> attached applies to calendars, tasks, contacts and notes. Feedback
> before commit would be appreciated (so it prevents from introducing
> bugs). You should be able to change any existing openchangeclient
> parameters but the private flag which needs to be migrated from bool to
> uint8.
> 
> The update feature requires to know the "unique ID" of the message. You
> will get it when you run openchangeclient --fetch-items=*
> 
> Below is a sample scenario for appointments:
> 
> [0x1] Create an appointment
> ===========================
>         $ openchangeclient --sendappointment \
>         --subject="OpenChange Development session" \
>         --location="Home Sweet Home" --body="This is a sample
>         appointment"\ --dtstart="2008-02-21 14:00:00"
>         --dtend="2008-02-21 18:00:00" --busystatus=BUSY
>         --label=IMPORTANT
> 
> [0x2] Retrieve the unique ID
> ============================
> $ openchangeclient --fetch-items=Appointment
> MAILBOX (1 messages)
> |==OpenChange Development session==| :AA13000000000001/FAE9000000000001
>         Location: Home Sweet Home
>         Start time     :   Thu Feb 21 14:00:00 2008 CET
>         End time       :   Thu Feb 21 18:00:00 2008 CET
>         Private: False
>         Status: Completed
> fetchitems               : MAPI_E_SUCCESS (0x0)
> 
> The Unique ID for this message is AA13000000000001/FAE9000000000001
> 
> [0x3] Update the appointment
> ============================
>         Update only the location
>         ------------------------
>         $ openchangeclient --sendappointment \
>         --update=AA13000000000001/FAE9000000000001 --location="Office"
>         
>         Update the start date from 2PM to 4PM
>         --------------------------------------
>         $ openchangeclient --sendappointment \
>         --update=AA13000000000001/FAE9000000000001 \
>         --dtstart="2008-02-21 16:00:00"
> 
> This patch doesn't check for existing message properties and overwrite
> them without any checks. In the example above, if you specify an updated
> dtstart > existing dtend, then the appointment will disappear from
> Outlook view. It will only be displayed again if you fix dtstart-dtend
> and set dtstart > dtend.
> 
> 
> The other planned features intend to remove some limitations:
>         * --property feature will let the user specify its own
>         properties/values on cmdline.
>         * --delete-items will let the user delete a specific message
>         from calendars,contacts,tasks or notes given its unique ID.
>         * propagate the --folder option to mailbox folders to users can
>         add/edit/delete items from custom calendar,tasks etc. folders.
> 
> Cheers,
> Julien.
> 
> _______________________________________________
> devel mailing list
> [email protected]
> http://mailman.openchange.org/listinfo/devel
_______________________________________________
devel mailing list
[email protected]
http://mailman.openchange.org/listinfo/devel

Reply via email to