After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 705337 - OOO message not shown
OOO message not shown
Status: RESOLVED FIXED
Product: evolution-ews
Classification: Other
Component: Miscellaneous / EWS Core
3.8.x
Other Linux
: Normal normal
: ---
Assigned To: Evolution EWS maintainer(s)
Evolution EWS maintainer(s)
Depends on:
Blocks: 703515
 
 
Reported: 2013-08-02 09:34 UTC by David Woodhouse
Modified: 2013-08-09 04:23 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description David Woodhouse 2013-08-02 09:34:03 UTC
I set an OOO message for a given time range.

On closing the prefs dialog and re-opening it, the *message* I had entered is not visible. If I check in OWA, it's there.

In fact, even with EWS_DEBUG=2 I see it. It's just not in the UI.

    <GetUserOofSettingsResponse xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">
      <ResponseMessage ResponseClass="Success">
        <ResponseCode>NoError</ResponseCode>
      </ResponseMessage>
      <OofSettings xmlns="http://schemas.microsoft.com/exchange/services/2006/types">
        <OofState>Scheduled</OofState>
        <ExternalAudience>All</ExternalAudience>
        <Duration>
          <StartTime>2013-08-02T16:00:00Z</StartTime>
          <EndTime>2013-08-12T08:00:00Z</EndTime>
        </Duration>
        <InternalReply>
          <Message>Out of office on vacation for the week of 2013-08-05. Back 2013-08-12. Email will be read occasionally but not attentively.</Message>
        </InternalReply>
        <ExternalReply>
          <Message/>
        </ExternalReply>
      </OofSettings>
      <AllowExternalOof>All</AllowExternalOof>
    </GetUserOofSettingsResponse>
Comment 1 David Woodhouse 2013-08-02 10:45:43 UTC
It looks like we completely ignore the message, if it contains neither <body> not <BodyFragment>. That is, we ignore if it's plain text — and yet we *set* it as plain text.

--- a/src/server/e-ews-oof-settings.c
+++ b/src/server/e-ews-oof-settings.c
@@ -243,7 +243,7 @@ ews_oof_settings_get_response_cb (ESoapResponse *response,
        else if (g_strrstr (string, "BodyFragment") != NULL)
                text = ews_oof_settings_text_from_html (string);
        else
-               text = NULL;
+               text = g_strdup(string);
        e_ews_oof_settings_set_internal_reply (settings, text ? text : "");
        g_free (string);
        g_free (text);

?
Comment 2 Milan Crha 2013-08-06 14:05:57 UTC
Interesting, I'm pretty sure it worked, but I might be wrong (or the playing with EWS server versions in requests might introduce it, who knows). Anyway, I can reproduce what you see now too.

You can commit the change, but only if:
a) you'll fix the coding style issue you introduced
b) you'll extend the patch to cover both internal and external replies
Comment 3 Milan Crha 2013-08-06 14:06:51 UTC
please commit to gnome-3-8 s well, the release of 3.8.5 is currently planned to the next Monday, August 12th.
Comment 4 Milan Crha 2013-08-09 04:23:11 UTC
Created commit 8406567 in ews master (3.9.90+)
Created commit 9f74b46 in ews gnome-3-8 (3.8.5+)