Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18926] iOS: Calendar events status shows wrong status number or null

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2015-11-30T02:44:01.000+0000
Affected Version/sRelease 3.5.1, Release 4.0.0
Fix Version/sRelease 5.0.0, Release 5.2.0
ComponentsiOS
Labelscalendar, event, status
ReporterShuo Liang
AssigneeChee Kiat Ng
Created2015-05-20T01:23:50.000+0000
Updated2016-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 numbers

Actual Result:

The status numbers are wrong. Like this:
[INFO] :   0
[INFO] :   1
[INFO] :   <null>
[INFO] :   0

Note:

Can be reproduce on SDK 3.5.1, 3.5.2 and 4.0.0RC2

Comments

  1. Pedro Enrique 2015-06-03

    PR: https://github.com/appcelerator/titanium_mobile/pull/6890
  2. Chee Kiat Ng 2015-06-04

    PR merged.
  3. Eric Wieber 2015-07-07

    Reopening. Issue still occurs. Sample code will return: 0, 1, 0, 0. Required changes: Lines 280-283 of iphone/Classes/CalendarModule.m should be:
       MAKE_SYSTEM_PROP(STATUS_NONE,EKEventStatusNone);
       MAKE_SYSTEM_PROP(STATUS_CONFIRMED,EKEventStatusConfirmed);
       MAKE_SYSTEM_PROP(STATUS_TENTATIVE,EKEventStatusTentative);
       MAKE_SYSTEM_PROP(STATUS_CANCELLED,EKEventStatusCanceled);
       
    This will have the sample code return: 2, 1, 3, 0, as expected. [~penrique] Please look into this. Should be quick.
  4. Hans Knöchel 2015-08-17

    Actually, the changed property STATUS_CANCELLED should be STATUS_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/7039
  5. Chee Kiat Ng 2015-08-18

    PR MERGED.
  6. Wilson Luu 2015-09-01

    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)
  7. Chee Kiat Ng 2015-11-30

    PR here to fix spelling of constant: https://github.com/appcelerator/titanium_mobile/pull/7509
  8. Hans Knöchel 2015-11-30

    PR merged for 5.2.0.
  9. Eric Wieber 2016-01-14

    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).

JSON Source