Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Developers

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-29-2007, 12:45 AM
Project Contributor
 
Posts: 52
Default Can't modify appointment via SOAP

We have cars as resources and users who see their calendars. The organizer of the appointment is set to user.

This worked fine until we upgraded to Zimbra 4.5. Now the attempt to modify appointment via SOAP gives error:
Cannot create/modify an appointment/task with organizer set to robert@abak.net when using account toyota@abak.net.

Changing account to robert@abak.net gives this error:
no such appointment or task

Changing organizer to toyota@abak.net gives this:
Changing organizer of an appointment/task is not allowed: old=robert@abak.net, new=toyota@abak.net

How can we modify these appointments?

Last edited by Abak; 01-30-2007 at 12:21 AM.. Reason: organizer is not se to car but user (mistake)
Reply With Quote
  #2 (permalink)  
Old 01-29-2007, 03:06 PM
Zimbra Employee
 
Posts: 1,434
Default Via web UI?

Does it work to login as robert via the web UI and modify the appointment in that way?

Alternatively, auth as robert and do your command via SOAP, qualifying the appointment ID that you're acting on (i.e. instead of id="777", use id="{toyota-zimbra-id}:777").

Or auth as robert and go via SOAP, adding an <account by="name">toyota@abak.net</account> element to the <context> block in the SOAP header.
__________________
Bugzilla - Wiki - Downloads - Before posting... Search!
Reply With Quote
  #3 (permalink)  
Old 01-29-2007, 06:03 PM
Zimbra Employee
 
Posts: 57
Default

Can you post more detail on the existing appointment and what you're trying to do with it?

Run the web UI with "?mode=mjsf&gzip=false&debug=1" argument in the URL to bring up the debug window, then go to the calendar and open the appointment, and cut/paste the GetMsgRequest and GetMsgResponse dumped in the debug window.

Edit and save the appointment, and cut/paste the ModifyAppointmentRequest and the error response, for both of your error cases.
__________________
Bugzilla - Wiki - Downloads - Before posting... Search!
Reply With Quote
  #4 (permalink)  
Old 01-30-2007, 12:34 AM
Project Contributor
 
Posts: 52
Default

dkarp, no matter if we login as robert or toyota, the appointment is always read only in web UI. Both solutions you suggest give "no such appointment or task" error.

jhahm, here is data you requested:

HTML Code:
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
<soap:Header>
<context xmlns="urn:zimbra">
<userAgent name="ZimbraWebClient - FF2.0 (Win)" version="4.5.0_GA_612.SuSEES9"/>
<sessionId id="370"/>
<notify seq="4"/>
<change token="5715" type="new"/>
<authToken>
0_26ad55a09e93688a4ff61aa630bc931e1a5588b3_69643d33363a33383630643766342d313566662d346334362d383530362d3331376334373639663630303b6578703d31333a313137303331333031353537313b
</authToken>
<format type="js"/>
</context>
</soap:Header>
<soap:Body>
<GetMsgRequest xmlns="urn:zimbraMail">
<m id="09610263-89f7-4927-855e-97a9a0c0e5c3:258-257" read="1" html="1"/>
</GetMsgRequest>
</soap:Body>
</soap:Envelope>
HTML Code:
Body: {
  GetMsgResponse: {
    _jsns: "urn:zimbraMail",
    m: [
      0: {
        d: 1145709514000,
        id: "09610263-89f7-4927-855e-97a9a0c0e5c3:258-257",
        inv: [
          0: {
            comp: [
              0: {
                apptId: "09610263-89f7-4927-855e-97a9a0c0e5c3:258",
                at: [
                  0: {
                    d: "Robert",
                    ptst: "NE",
                    role: "REQ",
                    rsvp: true,
                    url: "robert@abak.net"
                   },
                  1: {
                    cutype: "RES",
                    d: "Toyota",
                    ptst: "AC",
                    role: "NON",
                    rsvp: true,
                    url: "toyota@abak.net"
                   }
                 ],
                calItemId: "09610263-89f7-4927-855e-97a9a0c0e5c3:258",
                compNum: 0,
                e: [
                  0: {
                    d: "20061123T100000",
                    tz: "(GMT+01.00) Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna"
                   }
                 ],
                fb: "B",
                fba: "B",
                loc: "",
                name: "Appointment 2006000040 23.11.2006",
                or: {
                  d: "Robert",
                  url: "robert@abak.net"
                 },
                replies: [
                  0: {}
                 ],
                rsvp: true,
                s: [
                  0: {
                    d: "20061123T090000",
                    tz: "(GMT+01.00) Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna"
                   }
                 ],
                seq: 0,
                status: "CONF",
                transp: "O",
                x_uid: "5ffd0061-7afd-47a8-93b0-6da514584615"
               }
             ],
            tz: [
              0: {
                daylight: [
                  0: {
                    hour: 2,
                    min: 0,
                    mon: 3,
                    sec: 0,
                    week: -1,
                    wkday: 1
                   }
                 ],
                dayoff: 120,
                id: "(GMT+01.00) Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna",
                standard: [
                  0: {
                    hour: 3,
                    min: 0,
                    mon: 10,
                    sec: 0,
                    week: -1,
                    wkday: 1
                   }
                 ],
                stdoff: 60
               }
             ]
           }
         ],
        l: "09610263-89f7-4927-855e-97a9a0c0e5c3:10",
        mid: "<27943048.17441145709514832.JavaMail.root@linux>",
        mp: [
          0: {
            ct: "multipart/alternative",
            mp: [
              0: {
                body: true,
                content: "",
                ct: "text/plain",
                part: "1"
               },
              1: {
                ct: "text/calendar",
                filename: "meeting.ics",
                part: "2",
                s: 1657
               }
             ],
            part: "TEXT",
            s: 1969
           }
         ],
        rev: 13,
        s: 2437
       }
     ]
   }
 },
Header: {
  context: {
    _jsns: "urn:zimbra",
    change: {
      token: 5715
     },
    sessionId: [
      0: {
        _content: "370",
        id: "370"
       }
     ]
   }
 },
_jsns: "urn:zimbraSoap"

Last edited by Abak; 01-30-2007 at 12:38 AM.. Reason: typo
Reply With Quote
  #5 (permalink)  
Old 01-30-2007, 01:41 AM
Project Contributor
 
Posts: 52
Default How about re-creating appointments

We could write a script that would delete and re-create these appointments and this time set organizer to car instead of user.
However this would send mails to users which would confuse them and is therefore inacceptable.
Any way to temporarily disable sending mails for actions related to appointments?
Reply With Quote
  #6 (permalink)  
Old 01-30-2007, 11:19 AM
Zimbra Employee
 
Posts: 57
Default

Deleting and recreating should work. To avoid re-notifying users, just omit the <e> element for recipients under <m>. The <e> element is used to specify email recipients and usually the same users are listed in <e>'s as <at>'s (attendees), but they don't need to be the same. (see below for on-behalf-of discussion)

That should fix the problem for you, but can you tell me more about the problem so I can reproduce it and try to find a fix in a later release? The GetMsg trace seems to indicate this is what you did:

- Robert creates an appointment and invites toyota. Both robert and toyota mailboxes have a copy of the appointment.
- Robert opens toyota's calendar with manager rights.
- Robert tries to edit toyota's appointment.

Is this what's going on? That wouldn't work. Toyota is not the organizer, so its copy cannot be updated via ModifyAppointment. Robert would have to modify his own copy and send out an update email to toyota account.

In 4.5, calendar sharing is done via on-behalf-of scheduling. User would login as robert and open toyota calendar as before, but when an appointment is created with toyota as target calendar, the organizer will be set to toyota and sent-by set to robert. If there are any attendees, the invite email goes out from robert mailbox and the recipients will see that the appointment was organized by robert on behalf of toyota. (From header says toyota, Sender header says robert.)
__________________
Bugzilla - Wiki - Downloads - Before posting... Search!
Reply With Quote
  #7 (permalink)  
Old 01-31-2007, 08:30 AM
Project Contributor
 
Posts: 52
Default Solved

We deleted all appointments and re-created them (100% SOAP). It works fine now.
We noticed that some IDs of appointments, which are saved in our database, were different than those in Zimbra. It looks like upgrade to 4.5 changed around 50% of IDs, mostly the older appointments.

Our solution until 4.5 was like this:

1. Car grants read access to users.
2. Car creates an appointment with organizer set to user (the driver of the car).

We just changed part 2 to:
2. Car creates an appointment with organizer set to car. The driver is atendee.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.