Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating an event with a different "status" #55

Open
cmannfolk opened this issue Sep 1, 2015 · 1 comment
Open

Creating an event with a different "status" #55

cmannfolk opened this issue Sep 1, 2015 · 1 comment

Comments

@cmannfolk
Copy link

I am trying to create an event that has a "status" of "Free". As far as I can tell the functionality is there...
Exchange2010CalendarEvent:

def _parse_event_properties(self, response):
property_map = {
u'subject': {
u'xpath': u'//m:Items/t:CalendarItem/t:Subject',
},
u'location':
{
u'xpath': u'//m:Items/t:CalendarItem/t:Location',
},
u'availability':
{
u'xpath': u'//m:Items/t:CalendarItem/t:LegacyFreeBusyStatus',
},

I am unable to change this value to anything (my version of Outlook defaults to "Busy"). If list my events, with the list_events() function I am able to get the status/availability (free, busy, tentative,etc.) by using status = event.availability when looping through my list of events. Is this an issue with Microsoft? Or can this be fixed? Thanks for your help.

@catermelon
Copy link
Contributor

Hi @cmannfolk, you probably will have to add it to the pyexchange code. I don't officially support this project anymore (I've moved on from LI and I don't have a exchange server to test on) but I can try and point you in the right direction.

The basics are, you'll need to edit the calendar class to understand about event status, so you can access it and get/set it. Then you'll need to edit the XML it sends to Exchange to create the event, as well as edit the code that parses the response.

These are the main classes you'll need to look at:

https://github.com/linkedin/pyexchange/blob/master/pyexchange/exchange2010/__init__.py
https://github.com/linkedin/pyexchange/blob/master/pyexchange/base/calendar.py

And the XML to create the event is here:

https://github.com/linkedin/pyexchange/blob/master/pyexchange/exchange2010/soap_request.py#L280

Please also write some tests around it and promise in blood you've tested on a real exchange server. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants