carekit-apple / CareKit

CareKit is an open source software framework for creating apps that help people better understand and manage their health.
https://www.researchandcare.org
Other
2.41k stars 443 forks source link

ORKCarePlanStore.setEndDate doesn't take effect on the activity's schedule #60

Closed ninoguba closed 8 years ago

ninoguba commented 8 years ago

I added an activity to the store without an endDate set initially.

I use the setEndDate function of the CarePlanStore to set it to today and it returned successful.

BUT the activity's endDate remained nil.

Documentation below says what I'm doing is suppose to work:

Once an activity has been added to a store, only the endDate can be changed by using the setEndDate:forActivity:completion: method.

Bug?

ninoguba commented 8 years ago

I'm looking to use this endDate property to only show a custom task when the activity is still active (endDate == nil or endDate < today), otherwise don't show the task.

YuanZhu-apple commented 8 years ago

Get a copy from store again, then you can find end date set.

On Friday, June 3, 2016, Nino Guba notifications@github.com wrote:

I added an activity to the store without an endDate set initially.

I use the setEndDate function of the CarePlanStore to set it to today and it returned successful.

BUT the activity's endDate remained nil.

Bug?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/carekit-apple/CareKit/issues/60, or mute the thread https://github.com/notifications/unsubscribe/AK730GfvQosbkabKOJnruLNrUWayn5h8ks5qINfPgaJpZM4IuBeB .