ODK Collect custom messaging from server response on submission

Hi All,

There is a feature request open for providing more information than the
standard messaging from ODK for a submission. "Sending failed on: "
https://github.com/opendatakit/collect/issues/112#issuecomment-244794025 .
It has also been discussed here on the forms as
well. https://groups.google.com/forum/#!msg/opendatakit-developers/GOaPRgy4oNM/zWIQO6F-XZIJ

Im going to start working on this issue. Here is what I was thinking but
just wanted to open it up for discussion before I started.

When ODK try's to sends a form to the server client for submission, the
server sends back a valid xml response which indicates based on its header
code if it was successful or not. Depending on the response code determines
the standard responses.

That should definitely not be changed, however if the server client does
send back a response with a "message" tag, Collect should use that text as
the message not the default messaging. If Collect does not receive the
message tag then carry on with business as usual with default messaging.

Example of how a custom message may look:

This form is no longer the current version, please download the latest version of the form and try again

These changes would have no interference with any server client
application, but would give the options for those who want custom messaging
the ability to pass it via the server response.

Let me know what you think.
Jon

Jon,

Seems like a simple enough option for those who can generate custom
messages on the back end. Since it's not possible for Aggregate to
spit out these messages, what backend will you be using to allow us to
test if this is working? ELMO? Ona?

Yaw

··· On Tue, Sep 6, 2016 at 2:39 PM, wrote: > Hi All, > > There is a feature request open for providing more information than the > standard messaging from ODK for a submission. "Sending failed on: and time>" > https://github.com/opendatakit/collect/issues/112#issuecomment-244794025 . > It has also been discussed here on the forms as well. > https://groups.google.com/forum/#!msg/opendatakit-developers/GOaPRgy4oNM/zWIQO6F-XZIJ > > Im going to start working on this issue. Here is what I was thinking but > just wanted to open it up for discussion before I started. > > When ODK try's to sends a form to the server client for submission, the > server sends back a valid xml response which indicates based on its header > code if it was successful or not. Depending on the response code determines > the standard responses. > > That should definitely not be changed, however if the server client does > send back a response with a "message" tag, Collect should use that text as > the message not the default messaging. If Collect does not receive the > message tag then carry on with business as usual with default messaging. > > Example of how a custom message may look: > > > This form is no longer the current version, please download the > latest version of the form and try again > > > These changes would have no interference with any server client application, > but would give the options for those who want custom messaging the ability > to pass it via the server response. > > Let me know what you think. > Jon > > -- > You received this message because you are subscribed to the Google Groups > "ODK Developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to opendatakit-developers+unsubscribe@googlegroups.com. > For more options, visit https://groups.google.com/d/optout.

Hi,

I am more familiar with Ona, I can stand up a custom instance of the open
source version of Ona (however it is now deprecated
https://github.com/onaio/onadata ). I have added Matthew Burg to this,
maybe they are willing to help test with the new version of Ona.

Maybe other custom backend groups can also help test? I know the Cadasta
group (cadasta.org) is building a custom backend that I can also test with.

Jon

··· On Thursday, September 8, 2016 at 7:05:44 AM UTC-4, Yaw Anokwa wrote: > > Jon, > > Seems like a simple enough option for those who can generate custom > messages on the back end. Since it's not possible for Aggregate to > spit out these messages, what backend will you be using to allow us to > test if this is working? ELMO? Ona? > > Yaw > > On Tue, Sep 6, 2016 at 2:39 PM, <j...@geomarvel.com > wrote: > > Hi All, > > > > There is a feature request open for providing more information than the > > standard messaging from ODK for a submission. "Sending failed on: date > > and time>" > > https://github.com/opendatakit/collect/issues/112#issuecomment-244794025 > . > > It has also been discussed here on the forms as well. > > > https://groups.google.com/forum/#!msg/opendatakit-developers/GOaPRgy4oNM/zWIQO6F-XZIJ > > > > Im going to start working on this issue. Here is what I was thinking but > > just wanted to open it up for discussion before I started. > > > > When ODK try's to sends a form to the server client for submission, the > > server sends back a valid xml response which indicates based on its > header > > code if it was successful or not. Depending on the response code > determines > > the standard responses. > > > > That should definitely not be changed, however if the server client does > > send back a response with a "message" tag, Collect should use that text > as > > the message not the default messaging. If Collect does not receive the > > message tag then carry on with business as usual with default messaging. > > > > Example of how a custom message may look: > > > > > > This form is no longer the current version, please download > the > > latest version of the form and try again > > > > > > These changes would have no interference with any server client > application, > > but would give the options for those who want custom messaging the > ability > > to pass it via the server response. > > > > Let me know what you think. > > Jon > > > > -- > > You received this message because you are subscribed to the Google > Groups > > "ODK Developers" group. > > To unsubscribe from this group and stop receiving emails from it, send > an > > email to opendatakit-developers+unsubscribe@googlegroups.com > . > > For more options, visit https://groups.google.com/d/optout. >

Jon,

Just to clarify, you are just proposing improving how Collect handles what
is already described in the OpenRosa form submission API as described here:
https://bitbucket.org/javarosa/javarosa/wiki/FormSubmissionAPI#!server-response-format

Is that correct?

Brent

··· On Thu, Sep 8, 2016 at 8:59 AM, wrote:

Hi,

I am more familiar with Ona, I can stand up a custom instance of the open
source version of Ona (however it is now deprecated
https://github.com/onaio/onadata ). I have added Matthew Burg to this,
maybe they are willing to help test with the new version of Ona.

Maybe other custom backend groups can also help test? I know the Cadasta
group (cadasta.org) is building a custom backend that I can also test
with.

Jon

On Thursday, September 8, 2016 at 7:05:44 AM UTC-4, Yaw Anokwa wrote:

Jon,

Seems like a simple enough option for those who can generate custom
messages on the back end. Since it's not possible for Aggregate to
spit out these messages, what backend will you be using to allow us to
test if this is working? ELMO? Ona?

Yaw

On Tue, Sep 6, 2016 at 2:39 PM, j...@geomarvel.com wrote:

Hi All,

There is a feature request open for providing more information than the
standard messaging from ODK for a submission. "Sending failed on: "
https://github.com/opendatakit/collect/issues/112#
issuecomment-244794025 .
It has also been discussed here on the forms as well.
https://groups.google.com/forum/#!msg/opendatakit-developers
/GOaPRgy4oNM/zWIQO6F-XZIJ

Im going to start working on this issue. Here is what I was thinking
but
just wanted to open it up for discussion before I started.

When ODK try's to sends a form to the server client for submission, the
server sends back a valid xml response which indicates based on its
header
code if it was successful or not. Depending on the response code
determines
the standard responses.

That should definitely not be changed, however if the server client
does
send back a response with a "message" tag, Collect should use that text
as
the message not the default messaging. If Collect does not receive the
message tag then carry on with business as usual with default
messaging.

Example of how a custom message may look:

This form is no longer the current version, please download

the

latest version of the form and try again

These changes would have no interference with any server client
application,
but would give the options for those who want custom messaging the
ability
to pass it via the server response.

Let me know what you think.
Jon

--
You received this message because you are subscribed to the Google
Groups
"ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send
an
email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups
"ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Yes, basically the OpenRosa form submission API response is just fine, and
im not proposing to change it. The issue is that ODK Collect does not
handle/use/display the contents of the tag.

<OpenRosaResponse xmlns="http://openrosa.org/http/response">
    <message>Form Received! You've submitted 5 forms today</message>
</OpenRosaResponse>

See this thread
https://groups.google.com/forum/#!msg/opendatakit-developers/GOaPRgy4oNM/zWIQO6F-XZIJ
where Mitch says that this is missing from ODK Collect.

The plan is to add the ability for ODK Collect to handle the tag
to display in the dialog popup, whether a error message or success message.
If no tag is given then ODK has its default messaging based on
the response code.

Best,
Jon

··· On Thursday, September 8, 2016 at 4:15:30 PM UTC-4, Brent Atkinson wrote: > > Jon, > > Just to clarify, you are just proposing improving how Collect handles what > is already described in the OpenRosa form submission API as described here: > https://bitbucket.org/javarosa/javarosa/wiki/FormSubmissionAPI#!server-response-format > > Is that correct? > > Brent > > On Thu, Sep 8, 2016 at 8:59 AM, <j...@geomarvel.com > wrote: > >> Hi, >> >> I am more familiar with Ona, I can stand up a custom instance of the open >> source version of Ona (however it is now deprecated >> https://github.com/onaio/onadata ). I have added Matthew Burg to this, >> maybe they are willing to help test with the new version of Ona. >> >> Maybe other custom backend groups can also help test? I know the Cadasta >> group (cadasta.org) is building a custom backend that I can also test >> with. >> >> Jon >> >> On Thursday, September 8, 2016 at 7:05:44 AM UTC-4, Yaw Anokwa wrote: >>> >>> Jon, >>> >>> Seems like a simple enough option for those who can generate custom >>> messages on the back end. Since it's not possible for Aggregate to >>> spit out these messages, what backend will you be using to allow us to >>> test if this is working? ELMO? Ona? >>> >>> Yaw >>> >>> On Tue, Sep 6, 2016 at 2:39 PM, wrote: >>> > Hi All, >>> > >>> > There is a feature request open for providing more information than >>> the >>> > standard messaging from ODK for a submission. "Sending failed on: >>> >> > and time>" >>> > >>> https://github.com/opendatakit/collect/issues/112#issuecomment-244794025 >>> . >>> > It has also been discussed here on the forms as well. >>> > >>> https://groups.google.com/forum/#!msg/opendatakit-developers/GOaPRgy4oNM/zWIQO6F-XZIJ >>> > >>> > Im going to start working on this issue. Here is what I was thinking >>> but >>> > just wanted to open it up for discussion before I started. >>> > >>> > When ODK try's to sends a form to the server client for submission, >>> the >>> > server sends back a valid xml response which indicates based on its >>> header >>> > code if it was successful or not. Depending on the response code >>> determines >>> > the standard responses. >>> > >>> > That should definitely not be changed, however if the server client >>> does >>> > send back a response with a "message" tag, Collect should use that >>> text as >>> > the message not the default messaging. If Collect does not receive the >>> > message tag then carry on with business as usual with default >>> messaging. >>> > >>> > Example of how a custom message may look: >>> > >>> > >>> > This form is no longer the current version, please >>> download the >>> > latest version of the form and try again >>> > >>> > >>> > These changes would have no interference with any server client >>> application, >>> > but would give the options for those who want custom messaging the >>> ability >>> > to pass it via the server response. >>> > >>> > Let me know what you think. >>> > Jon >>> > >>> > -- >>> > You received this message because you are subscribed to the Google >>> Groups >>> > "ODK Developers" group. >>> > To unsubscribe from this group and stop receiving emails from it, send >>> an >>> > email to opendatakit-developers+unsubscribe@googlegroups.com. >>> > For more options, visit https://groups.google.com/d/optout. >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "ODK Developers" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to opendatakit-developers+unsubscribe@googlegroups.com >> . >> For more options, visit https://groups.google.com/d/optout. >> > >