Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
5760157
feat(#10904): route file attachments to correct sub-docs in report fo…
YASHSHARMAOFFICIALLY May 19, 2026
455b339
feat(#10904): route file attachments to correct sub-docs in report forms
YASHSHARMAOFFICIALLY Apr 24, 2026
6967caa
feat(#10903): route attachments per-doc in ContactSaveService
benkags Apr 22, 2026
12e59a5
feat(#10903): validate attachment size on contact save path
benkags Apr 22, 2026
5819064
test(#10903): cover sub-contact attachment routing
benkags Apr 22, 2026
84bb2d0
test(#10903): cover validateAttachments wiring on contact save path
benkags Apr 22, 2026
7b8710d
fix(#10903): match type="file" upload nodes when routing
benkags Apr 23, 2026
3a90455
feat(#10903): clean up.
benkags Apr 24, 2026
7f46c97
refactor `resolveContactOwnerDoc` signature.
benkags Apr 27, 2026
f667aff
refactor `resolveContactOwnerDoc` to reduce cognitive load
benkags Apr 27, 2026
3ac2cd5
refactor: use Set for ignored section tags
benkags Apr 28, 2026
b66a67e
refactor: use Array.find over jQuery filter()[0]
benkags Apr 28, 2026
61121a3
refactor: group contact-owner lookup params into context object
benkags Apr 28, 2026
dce22bd
test(e2e): assert sub-contact attachment routing on create and edit
benkags May 6, 2026
c32e17d
test(e2e): click add-repeat for the first child row, fix edit-flow re…
benkags May 6, 2026
26a893b
test(e2e): drop primary contact section from edit form
benkags May 6, 2026
e415ccd
test(e2e): rename main section to match contact_type so existing data…
benkags May 6, 2026
e089da1
Apply suggestions from code review
benkags May 8, 2026
9a35fe1
feat(#10904): unify inline-binary field handling with file-widget att…
benkags May 14, 2026
b4daf51
fix typo.
benkags May 16, 2026
c82dbe0
fix(#10903): route FileManager uploads by [type=file] only
benkags May 16, 2026
929b647
feat(#10904): unify media field value with attachment name
benkags May 20, 2026
fd98e6b
test(e2e): assert badge value equals attachment name minus prefix
benkags May 20, 2026
33d16f7
fix(#10904): namespace report sub-doc binaries by ownerDoc.form
benkags May 20, 2026
141ca0a
fix(#10904): resolve rebase conflict in enketo report-routing specs
benkags May 21, 2026
ed1e34f
Bump CI
jkuester May 21, 2026
8faa1f9
comments clean up.
benkags May 21, 2026
1de8643
fix failing e2e test.
benkags May 21, 2026
18f8ad4
fix failing e2e test.
benkags May 21, 2026
d3f9c15
test(#10903): add tests and clean up
benkags May 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ config/*/forms/contact/*.xlsx
tests/integration/results/
allure*
tests/config-temp
tests/utils/config-temp
.eslintcache
doc-conflicts/
cht-docker-compose.log
Expand Down
112 changes: 112 additions & 0 deletions tests/e2e/default/contacts/forms/family-with-attachments-create.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
<?xml version="1.0"?>
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:jr="http://openrosa.org/javarosa" xmlns:orx="http://openrosa.org/xforms" xmlns:odk="http://www.opendatakit.org/xforms">
<h:head>
<h:title>New Family With Attachments</h:title>
<model odk:xforms-version="1.0.0">
<itext>
<translation lang="en">
<text id="/data/family_with_attachments/name:label">
<value>Family Name</value>
</text>
<text id="/data/family_with_attachments/photo:label">
<value>Family Photo</value>
</text>
<text id="/data/contact/name:label">
<value>Primary Contact Name</value>
</text>
<text id="/data/contact/photo:label">
<value>Primary Contact Photo</value>
</text>
<text id="/data/repeat:label">
<value>Children</value>
</text>
<text id="/data/repeat/child/name:label">
<value>Child Name</value>
</text>
<text id="/data/repeat/child/photo:label">
<value>Child Photo</value>
</text>
</translation>
</itext>
<instance>
<data id="contact:family_with_attachments:create" version="2026-05-06" prefix="J1!contact:family_with_attachments:create!" delimiter="#">
<family_with_attachments>
<parent>PARENT</parent>
<type>contact</type>
<contact_type>family_with_attachments</contact_type>
<name/>
<photo/>
<badge type="binary">iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkAAIAAAoAAv/lxKUAAAAASUVORK5CYII=</badge>
<contact>NEW</contact>
</family_with_attachments>
<contact>
<parent>PARENT</parent>
<type>person</type>
<name/>
<photo/>
<badge type="binary">iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkAAIAAAoAAv/lxKUAAAAASUVORK5CYII=</badge>
</contact>
<repeat>
<child jr:template="">
<parent>PARENT</parent>
<type>person</type>
<name/>
<photo/>
<badge type="binary">iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkAAIAAAoAAv/lxKUAAAAASUVORK5CYII=</badge>
</child>
</repeat>
<meta tag="hidden">
<instanceID/>
</meta>
</data>
</instance>
<bind nodeset="/data/family_with_attachments/parent" type="string"/>
<bind nodeset="/data/family_with_attachments/type" type="string"/>
<bind nodeset="/data/family_with_attachments/contact_type" type="string"/>
<bind nodeset="/data/family_with_attachments/name" type="string" required="true()"/>
<bind nodeset="/data/family_with_attachments/photo" type="binary"/>
<bind nodeset="/data/family_with_attachments/badge" type="binary" readonly="true()"/>
<bind nodeset="/data/family_with_attachments/contact" type="string"/>
<bind nodeset="/data/contact/parent" type="string"/>
<bind nodeset="/data/contact/type" type="string"/>
<bind nodeset="/data/contact/name" type="string" required="true()"/>
<bind nodeset="/data/contact/photo" type="binary"/>
<bind nodeset="/data/contact/badge" type="binary" readonly="true()"/>
<bind nodeset="/data/repeat/child/parent" type="string"/>
<bind nodeset="/data/repeat/child/type" type="string"/>
<bind nodeset="/data/repeat/child/name" type="string"/>
<bind nodeset="/data/repeat/child/photo" type="binary"/>
<bind nodeset="/data/repeat/child/badge" type="binary" readonly="true()"/>
<bind nodeset="/data/meta/instanceID" type="string" readonly="true()" jr:preload="uid"/>
</model>
</h:head>
<h:body>
<group ref="/data/family_with_attachments">
<input ref="/data/family_with_attachments/name">
<label ref="jr:itext('/data/family_with_attachments/name:label')"/>
</input>
<upload ref="/data/family_with_attachments/photo" mediatype="image/*">
<label ref="jr:itext('/data/family_with_attachments/photo:label')"/>
</upload>
</group>
<group ref="/data/contact">
<input ref="/data/contact/name">
<label ref="jr:itext('/data/contact/name:label')"/>
</input>
<upload ref="/data/contact/photo" mediatype="image/*">
<label ref="jr:itext('/data/contact/photo:label')"/>
</upload>
</group>
<group ref="/data/repeat">
<label ref="jr:itext('/data/repeat:label')"/>
<repeat nodeset="/data/repeat/child">
<input ref="/data/repeat/child/name">
<label ref="jr:itext('/data/repeat/child/name:label')"/>
</input>
<upload ref="/data/repeat/child/photo" mediatype="image/*">
<label ref="jr:itext('/data/repeat/child/photo:label')"/>
</upload>
</repeat>
</group>
</h:body>
</h:html>
82 changes: 82 additions & 0 deletions tests/e2e/default/contacts/forms/family-with-attachments-edit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
<?xml version="1.0"?>
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:jr="http://openrosa.org/javarosa" xmlns:orx="http://openrosa.org/xforms" xmlns:odk="http://www.opendatakit.org/xforms">
<h:head>
<h:title>Edit Family With Attachments</h:title>
<model odk:xforms-version="1.0.0">
<itext>
<translation lang="en">
<text id="/data/family_with_attachments/name:label">
<value>Family Name</value>
</text>
<text id="/data/family_with_attachments/photo:label">
<value>Family Photo</value>
</text>
<text id="/data/repeat:label">
<value>Children</value>
</text>
<text id="/data/repeat/child/name:label">
<value>Child Name</value>
</text>
<text id="/data/repeat/child/photo:label">
<value>Child Photo</value>
</text>
</translation>
</itext>
<instance>
<data id="contact:family_with_attachments:edit" version="2026-05-06" prefix="J1!contact:family_with_attachments:edit!" delimiter="#">
<family_with_attachments>
<parent>PARENT</parent>
<type>contact</type>
<contact_type>family_with_attachments</contact_type>
<name/>
<photo/>
<contact/>
</family_with_attachments>
<repeat>
<child jr:template="">
<parent>PARENT</parent>
<type>person</type>
<name/>
<photo/>
</child>
</repeat>
<meta tag="hidden">
<instanceID/>
</meta>
</data>
</instance>
<bind nodeset="/data/family_with_attachments/parent" type="string"/>
<bind nodeset="/data/family_with_attachments/type" type="string"/>
<bind nodeset="/data/family_with_attachments/contact_type" type="string"/>
<bind nodeset="/data/family_with_attachments/name" type="string" required="true()"/>
<bind nodeset="/data/family_with_attachments/photo" type="binary"/>
<bind nodeset="/data/family_with_attachments/contact" type="string"/>
<bind nodeset="/data/repeat/child/parent" type="string"/>
<bind nodeset="/data/repeat/child/type" type="string"/>
<bind nodeset="/data/repeat/child/name" type="string"/>
<bind nodeset="/data/repeat/child/photo" type="binary"/>
<bind nodeset="/data/meta/instanceID" type="string" readonly="true()" jr:preload="uid"/>
</model>
</h:head>
<h:body>
<group ref="/data/family_with_attachments">
<input ref="/data/family_with_attachments/name">
<label ref="jr:itext('/data/family_with_attachments/name:label')"/>
</input>
<upload ref="/data/family_with_attachments/photo" mediatype="image/*">
<label ref="jr:itext('/data/family_with_attachments/photo:label')"/>
</upload>
</group>
<group ref="/data/repeat">
<label ref="jr:itext('/data/repeat:label')"/>
<repeat nodeset="/data/repeat/child">
<input ref="/data/repeat/child/name">
<label ref="jr:itext('/data/repeat/child/name:label')"/>
</input>
<upload ref="/data/repeat/child/photo" mediatype="image/*">
<label ref="jr:itext('/data/repeat/child/photo:label')"/>
</upload>
</repeat>
</group>
</h:body>
</h:html>
Loading
Loading