Skip to content
This repository has been archived by the owner on Nov 2, 2023. It is now read-only.

new: support metadata kind email #286

Merged
merged 1 commit into from
Feb 8, 2022
Merged

Conversation

florianm
Copy link
Contributor

@florianm florianm commented Feb 7, 2022

This PR breaks the support of email out of #284.

A simple form with a metadata field "email" and a text field:

<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:jr="http://openrosa.org/javarosa" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:orx="http://openrosa.org/xforms" xmlns:odk="http://www.opendatakit.org/xforms">
  <h:head>
    <h:title>209-email</h:title>
    <model>
      <instance>
        <data id="209-email" version="1644197953">
          <meta>
            <instanceID/>
          </meta>
          <email/>
          <text1/>
        </data>
      </instance>
      <itext>
        <translation lang="English">
          <text id="/data/text1:label">
            <value>Text 1 label</value>
          </text>
          <text id="/data/text1:hint">
            <value>Text 1 hint</value>
          </text>
        </translation>
      </itext>
      <bind nodeset="/data/meta/instanceID" type="string" readonly="true()" jr:preload="uid"/>
      <bind nodeset="/data/email" type="string" jr:preload="property" jr:preloadParams="email"/>
      <bind nodeset="/data/text1" type="string"/>
    </model>
  </h:head>
  <h:body>
    <input ref="/data/text1">
      <label ref="jr:itext('/data/text1:label')"/>
      <hint ref="jr:itext('/data/text1:hint')"/>
    </input>
  </h:body>
</h:html>

Filled and submitted: The email set in Collect user metadata (noreply@email.org) shows in the submission.
image

This shows that at least the happy path works. Who knows any edge cases we should test in addition?

@florianm florianm added this to the 0.4.2 audit milestone Feb 7, 2022
@florianm florianm self-assigned this Feb 7, 2022
@florianm florianm added this to In progress in Roadmap via automation Feb 7, 2022
Roadmap automation moved this from In progress to Reviewer approved Feb 8, 2022
@florianm florianm merged commit 0b4304d into getodk:master Feb 8, 2022
Roadmap automation moved this from Reviewer approved to Done Feb 8, 2022
@florianm florianm deleted the 209-email branch February 8, 2022 21:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Development

Successfully merging this pull request may close these issues.

Support all metadata kinds: email, phoneNumber, audit, etc
2 participants