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

Event status should be uppercase #318

Closed
Kiitoksia opened this issue Sep 22, 2017 · 3 comments
Closed

Event status should be uppercase #318

Kiitoksia opened this issue Sep 22, 2017 · 3 comments

Comments

@Kiitoksia
Copy link

When supplied an iCal with a status of confirmed, the serialised string does not parse correctly.

Input:
Calendar calendar = new Calendar(); calEvent.Status = Ical.Net.EventStatus.Confirmed;

Output:

STATUS:Confirmed

After using various iCal validators, they all fail to parse as Confirmed should be in uppercase.
https://icalendar.org/iCalendar-RFC-5545/3-8-1-11-status.html

Simply doing this before calling the validators, causes it to parse correctly.

calendarString = calendarString.Replace("STATUS:Confirmed", "STATUS:CONFIRMED");

@rianjs
Copy link
Collaborator

rianjs commented Sep 24, 2017

You are quite right. Looking at the code... it seems this will be a breaking change since EventStatus (and the other statuses like TodoStatus) are enums, not strings. That's unfortunate.

@rianjs
Copy link
Collaborator

rianjs commented Sep 24, 2017

Even if the API text is unchanged, code will still have to be re-compiled. I.e., it's not binary compatible. If your application expects the old enums, and your DLL has the statuses as string constants... that's bad.

That means bumping the major versions again, for both the existing v2 and net-core (3.x) versions.

I think implementing the fix means discontinuing support for v2 (because it will, by definition, not be v2 anymore), and just continuing with net-core/v3. Hmm. I'll need to think about it some.

@rianjs
Copy link
Collaborator

rianjs commented Nov 13, 2017

Fixed in nuget version 4.0.0: https://www.nuget.org/packages/Ical.Net/4.0.0

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