[TIMOB-18926] iOS: Calendar events status shows wrong status number or null
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2015-11-30T02:44:01.000+0000 |
Affected Version/s | Release 3.5.1, Release 4.0.0 |
Fix Version/s | Release 5.0.0, Release 5.2.0 |
Components | iOS |
Labels | calendar, event, status |
Reporter | Shuo Liang |
Assignee | Chee Kiat Ng |
Created | 2015-05-20T01:23:50.000+0000 |
Updated | 2016-01-14T22:56:36.000+0000 |
Description
Reproduce:
1. Simple run the following codes.
Ti.API.info(Ti.Calendar.STATUS_TENTATIVE);
Ti.API.info(Ti.Calendar.STATUS_CONFIRMED);
Ti.API.info(Ti.Calendar.STATUS_CANCELLED);
Ti.API.info(Ti.Calendar.STATUS_NONE);
Expect Result:
It should show different status numbersActual Result:
The status numbers are wrong. Like this:
[INFO] : 0
[INFO] : 1
[INFO] : <null>
[INFO] : 0
PR: https://github.com/appcelerator/titanium_mobile/pull/6890
PR merged.
Reopening. Issue still occurs. Sample code will return:
0, 1, 0, 0
. Required changes: Lines 280-283 of iphone/Classes/CalendarModule.m should be:This will have the sample code return:
2, 1, 3, 0
, as expected. [~penrique] Please look into this. Should be quick.Actually, the changed property
STATUS_CANCELLED
should beSTATUS_CANCELED
again, since Apple uses the american grammatical style, not the british/canadian/australian spelling. But thats another thing. PR to fix the constants can be found here: https://github.com/appcelerator/titanium_mobile/pull/7039PR MERGED.
Closing ticket as fixed. Verified the Ti.Calendar status constants return correct numbers:
2, 1, 3, 0
. Tested on: Appc CLI NPM: 4.2.0-1 Appc CLI Core: 5.0.0-33 Arrow: 1.2.52 SDK: 5.0.0.v20150901105514 Node: v0.10.38 OS: Yosemite (10.10.5) Xcode: 7 beta 6 Device: iphone 6 (8.4.1)PR here to fix spelling of constant: https://github.com/appcelerator/titanium_mobile/pull/7509
PR merged for 5.2.0.
Verified fixed, using: MacOS 10.11.2 (15C50) Studio 4.4.0.201511241829 Ti SDK 5.2.0.v20160114021251 Appc NPM 4.2.2 Appc CLI 5.2.0-224 Xcode 7.2 (7C68) Node v0.12.7 Java 1.7.0_80 STATUS_CANCELLED is now deprecated in favor of STATUS_CANCELED. A warning message indicates so and both will return the correct property (until STATUS_CANCELLED is removed).