question

SonalMehta-1746 avatar image
0 Votes"
SonalMehta-1746 asked SonalMehta-1746 commented

Unable to use recurrence pattern type as relative yearly & relative monthly while creating and updating ToDo Task.

When we create ToDo with recurrence pattern using Rest API (as given https://docs.microsoft.com/en-us/graph/api/resources/recurrencepattern?view=graph-rest-1.0), it doesn't take the provided values. This happen in case of recurrence pattern type: relativeYearly & relativeMonthly. Also for rest case, where dayOfMonth is required & provided then API does create the ToDo with default value i.e. 30 rather than requested value.

Sending recurrence object as
recurrence: {
pattern: {
type: 'relativeYearly',
interval: 2,
month: 12,
dayOfMonth: 4
}
}
It creates the ToDo with pattern type as "daily". It seems setting are not applied yet for the API.
Using V1.0 version here. Please guide.

microsoft-graph-todo
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Are you referring this documentation with recurrence property?


0 Votes 0 ·
Deva-MSFT avatar image
0 Votes"
Deva-MSFT answered

Interesting. Please share the payload so that i can give a try on this.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AlistairPhillips-1565 avatar image
0 Votes"
AlistairPhillips-1565 answered SonalMehta-1746 commented

Hi,

I seem to be experiencing the same issue in that a relativeMonthly recurrence pattern is saved as daily.

If I POST the following to https://graph.microsoft.com/v1.0/me/todo/lists/#list_id#/tasks

 {
     "title": "Remind me on the second Sunday of every month",
     "recurrence": {
         "pattern": {
             "type": "relativeMonthly",
             "interval": 1,
             "daysOfWeek": ["sunday"],
             "index": "second"           
         },
         "range": {
             "type": "noEnd"
         }
     },
     "dueDateTime": {
         "dateTime": "2021-07-11T09:00:00.0000000",
         "timeZone": "Australia/Sydney"        
     },
     "reminderDateTime": {
         "dateTime": "2021-07-11T09:00:00.0000000",
         "timeZone": "Australia/Sydney"        
     },
     "isReminderOn": true
 }

a reminder is created with the following recurrence pattern:

     "recurrence": {
         "pattern": {
             "type": "daily",
             "interval": 1,
             "month": 0,
             "dayOfMonth": 0,
             "daysOfWeek": [],
             "firstDayOfWeek": "sunday",
             "index": "first"
         },
         "range": {
             "type": "noEnd",
             "startDate": "2021-07-11",
             "endDate": "0001-01-01",
             "recurrenceTimeZone": "Australia/Sydney",
             "numberOfOccurrences": 0
         }
     }

According to https://docs.microsoft.com/en-us/graph/outlook-schedule-recurring-events and https://docs.microsoft.com/en-us/graph/api/resources/recurrencerange?view=graph-rest-1.0 this should work.

Any ideas?

Thanks,
Alistair

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Yes, there are so many issues wrt the payload we send & the response we get.

Microsoft To Do APIs need proper testing.


Thanks,
Sonal

0 Votes 0 ·