--You received this message because you are subscribed to the Google Groups "JMAP" group.To unsubscribe from this group and stop receiving emails from it, send an email to jmap-discuss...@googlegroups.com.To post to this group, send email to jmap-d...@googlegroups.com.To view this discussion on the web visit https://groups.google.com/d/msgid/jmap-discuss/13bee244-a7a7-43cf-8d0e-65d5227083e6%40googlegroups.com.For more options, visit https://groups.google.com/d/optout.
I'm generally adverse to sending calculated values like this through the API.
I would be happy with an API call to get the server's current time value
--You received this message because you are subscribed to the Google Groups "JMAP" group.To unsubscribe from this group and stop receiving emails from it, send an email to jmap-discuss...@googlegroups.com.To post to this group, send email to jmap-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jmap-discuss/83408ce5-cf57-45ee-a2b1-9527acc918c3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
So you really think we should recode the time-checking logic on all clients? Isn't that simpler to implement only at the server-level?
Moreover, Isn't keeping time up to date across sever and client also difficult in a distributed system, as it may also become out of sync ? Isn't it just moving the problem ?
I am also in favour of clarifying this.
Do we agree that, as a client, I can update from / to dates even if the vacation is not enabled ?
As such, I can first disable the vacation by sending an update with :
{
isEnabled : false,
fromDate : null,
toDate : null
}
Then modify the dates :
{
fromDate: "date in one week",
toDate : "date in two weeks"
}
After this I will get this as a result from the GetVacationResponse :
{
isEnabled: false,
fromDate: "date in one week",
toDate : "date in two weeks",
textBody : "My so desired vacation text"
}
Now, if I sended this as an update :
{
isEnabled: true,
fromDate: "date in one week",
toDate : "date in two weeks"
}
I will end up with the exact same result, as we are out of the date range, so isEnabled is false. We can no more differenciate a vacation in one week from a vacation that will never happen, but happen to have some fromDate and toDate specified.
With such a specification, the client can just know if the vacation is active right now. But can not know about not yet active vacations. UX scenari like displaying the vacation in a calendar are no more possible...
That's why I am reluctant to modify the isEnabled value, and propose to add an other value (isActivated) that prevents from this ambiguity.
Regards,
Benoit
On Monday, June 27, 2016 at 3:54:48 PM UTC+7, Neil Jenkins wrote:Right, I see where the misunderstanding is; we need to clarify this in the spec. The isEnabled property is combined with the from/to dates, which are both optional/nullable (if the vacation response should be enabled until manually turned off), to decide whether to send a vacation response or not.Neil.
--
You received this message because you are subscribed to the Google Groups "JMAP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jmap-discuss...@googlegroups.com.
To post to this group, send email to jmap-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jmap-discuss/302e77c1-9fb1-4152-96cb-1a1c0e09e0d5%40googlegroups.com.
Ok, I fully understand your post.
So we agree isEnabled should be immutable and not computed.
This is not what David proposed. To take his own words :
> My original proposal was to allow isEnabled to be computed by the backend
My previous answer was just about saying if isEnabled is a computed value, then we will have troubble. If ever we want to return a computed value, we should do it on an other field to avoid ambiguous scenari.
To view this discussion on the web visit https://groups.google.com/d/msgid/jmap-discuss/3a907799-0d85-4022-8703-c335ef2a136c%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jmap-discuss/3a907799-0d85-4022-8703-c335ef2a136c%40googlegroups.com.
On Fri, 24 Jun 2016, at 08:44 PM, Bron Gondwana wrote:I'm generally adverse to sending calculated values like this through the API.Yes, I agree. This doesn't fit with the JMAP model, which as far as possible tries to avoid sending calculated values due to the difficulty in keeping them in sync.
The computed text is not time dependent. The "is vacation active right at this moment" flag is time dependent. It gets stale.
--
You received this message because you are subscribed to the Google Groups "JMAP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jmap-discuss...@googlegroups.com.
To post to this group, send email to jmap-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jmap-discuss/33505393-192e-4627-94ee-6acd121bdf5a%40googlegroups.com.
The computed text is not time dependent. The "is vacation active right at this moment" flag is time dependent. It gets stale.