Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-11442

Google Calendar Connector - 'Update step' not allowing single field update

    XMLWordPrintable

Details

    Description

      (Migrated from https://github.com/syndesisio/syndesis/issues/3814)

      Author: Jan Stastny
      Assignees: Andrea Cosentino,

      This is a...

      [pre][code]
      [ ] Feature request
      [ ] Regression (a behavior that used to work and stopped working in a new release)
      [x] Bug report [!-- Please search GitHub for a similar issue or PR before submitting --]
      [ ] Documentation issue or request
      [/code][/pre]

      Description

      Google Calendar connector action 'Update Event' doesn't allow partial update of an event.

      This issue applies to a use-case where Update Event is used on its own, not depending on a data input from preceding step, e.g. timer -> 'Update event'.

      When user specifies calendar and eventId, and changes only 'location' in the form, I would expect, that only that single field is being attempted to be updated.

      Pre-filling values into the form is not a valid solution, as it is valid only design time, not during runtime (event could have been updated meanwhile). Rather we'd need to handle the form input as a selective update, see https://developers.google.com/calendar/v3/reference/events/patch .

      To illustrate the issue, what I see is, that event the date/time fields are being attempted to be updated even though I set only 'location' in the form. The error I get:
      ``

      org.apache.camel.RuntimeCamelException: com.google.api.client.googleapis.json.GoogleJsonResponseException: 400 Bad Request
      {
        "code" : 400,
        "errors" : [ {
          "domain" : "global",
          "message" : "Missing end time.",
          "reason" : "required"
        } ],
        "message" : "Missing end time."
      }
      	at org.apache.camel.component.google.calendar.GoogleCalendarProducer.doInvokeMethod(GoogleCalendarProducer.java:51)
      	at org.apache.camel.util.component.AbstractApiProducer$1.run(AbstractApiProducer.java:86)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: com.google.api.client.googleapis.json.GoogleJsonResponseException: 400 Bad Request
      {
        "code" : 400,
        "errors" : [ {
          "domain" : "global",
          "message" : "Missing end time.",
          "reason" : "required"
        } ],
        "message" : "Missing end time."
      }
      	at com.google.api.client.googleapis.json.GoogleJsonResponseException.from(GoogleJsonResponseException.java:146)
      	at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:113)
      	at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:40)
      	at com.google.api.client.googleapis.services.AbstractGoogleClientRequest$1.interceptResponse(AbstractGoogleClientRequest.java:321)
      	at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1065)
      	at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:419)
      	at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:352)
      	at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:469)
      	at org.apache.camel.component.google.calendar.GoogleCalendarProducer.doInvokeMethod(GoogleCalendarProducer.java:49)
      	... 8 more
      

      ``

      Attachments

        Activity

          People

            acosenti Andrea Cosentino
            rhn-support-hbraun Heiko Braun
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: