• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kobotoolbox / kpi / 25687037878
81%
master: 76%

Build:
Build:
LAST BUILD BRANCH: dev-2394-user-names-and-metadata-refactor
DEFAULT BRANCH: master
Ran 11 May 2026 05:48PM UTC
Jobs 10
Files 912
Run time 3min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

11 May 2026 05:44PM UTC coverage: 81.903% (+0.01%) from 81.893%
25687037878

push

github

web-flow
feat(metadata): ensure extra metadata fields are nested in asset settings DEV-2072  (#7027)

### đŸ“Ŗ Summary
Added extra project metadata fields to the asset settings under a
dedicated section to ensure a more organized and reliable data structure

### 💭 Notes
This backend update expects custom metadata fields to be passed from the
frontend under `settings.extra_metadata`. This avoids collisions when a
custom field has the same name as a core setting, such as `country`.

### 👀 Preview steps
To see the changes, test asset creation via the Django shell, as the
frontend isn't implemented yet.

1. â„šī¸ have an account
2. Open the Django shell
3. Get your user and create new asset with extra metadata:
```
user = User.objects.get(username='your_username')
asset = Asset.objects.create(
    name='test survey',
    owner=user,
    asset_type='survey',
    settings={
        'description': 'test',
        'country': [{'label': 'Canada', 'value': 'ca'}],
        'extra_metadata': {
            'ProjectManager': 'Alex',
            'Department': 'Research',
            'country': 'USA'
        }
    }
)
```
4. Obtain the newly created asset's uid and check out the endpoint:
`/api/v2/assets/{asset_uid}`
5. đŸŸĸ [on PR] Notice that the extra metadata is nicely nested under
settings. Should look something like:
```
"settings": {
    "sector": {},
    "country": [
      {
        "label": "Canada",
        "value": "ca"
      }
    ],
    "description": "test",
    "organization": "",
    "country_codes": [
      "ca"
    ],
    "extra_metadata": {
      "country": "USA",
      "Department": "Research",
      "ProjectManager": "Alex"
    }
  },
```
6. đŸŸĸ notice that we have two of the same keys 'country' that are not
colliding
7. Test filtering:
`api/v2/assets/?q=settings__extra_metadata__icontains:Alex` and ensure
that the correct asset is returned
8. Also test that library items are created with the correct nested
`extra_metadata`

9131 of 12290 branches covered (74.3%)

14 of 16 new or added lines in 1 file covered. (87.5%)

491 existing lines in 25 files now uncovered.

30079 of 36725 relevant lines covered (81.9%)

5.75 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
92.62
0.21% kpi/models/asset.py

Coverage Regressions

Lines Coverage ∆ File
81
0.0
-93.1% kobo/apps/stripe/serializers.py
75
0.0
-41.9% kobo/apps/stripe/views.py
63
0.0
-51.64% kobo/apps/stripe/models.py
60
26.05
-50.42% kobo/apps/stripe/utils/subscription_limits.py
52
60.5
-26.0% kpi/utils/xml.py
36
20.21
-38.3% kobo/apps/stripe/utils/billing_dates.py
19
0.0
-65.52% kobo/apps/stripe/admin.py
19
38.24
-55.88% kpi/parsers.py
14
31.82
-31.82% kobo/apps/stripe/utils/limit_enforcement.py
12
35.0
-60.0% kobo/apps/stripe/utils/import_management.py
11
0.0
-44.0% kobo/apps/stripe/signals.py
10
30.12
-12.05% kpi/utils/storage.py
8
0.0
-100.0% kobo/apps/stripe/urls.py
7
0.0
-100.0% kobo/apps/stripe/apps.py
6
0.0
-37.5% kobo/apps/stripe/utils/view_utils.py
4
75.12
-1.95% kpi/utils/mongo_helper.py
3
61.21
-1.82% kobo/apps/organizations/models.py
3
60.53
-7.89% kobo/apps/organizations/utils.py
2
44.14
-0.37% kobo/apps/openrosa/libs/utils/logger_tools.py
1
40.85
-1.41% kobo/apps/organizations/admin/organization.py
1
92.31
-7.69% kobo/apps/user_reports/utils/migrations.py
1
50.7
-0.47% kpi/renderers.py
1
75.0
-4.17% kpi/urls/__init__.py
1
75.0
-6.25% kpi/utils/drf_exceptions.py
1
86.67
-0.95% kpi/utils/object_permission.py
Jobs
ID Job ID Ran Files Coverage
1 25687037878.1 11 May 2026 05:48PM UTC 908
52.27
2 25687037878.2 11 May 2026 05:49PM UTC 908
53.92
3 25687037878.3 11 May 2026 05:50PM UTC 908
52.56
4 25687037878.4 11 May 2026 05:51PM UTC 910
53.47
5 25687037878.5 11 May 2026 05:51PM UTC 910
55.15
6 25687037878.6 11 May 2026 05:51PM UTC 908
59.8
7 25687037878.7 11 May 2026 05:52PM UTC 910
65.88
8 25687037878.8 11 May 2026 05:53PM UTC 910
60.91
9 25687037878.9 11 May 2026 05:53PM UTC 912
68.08
10 25687037878.10 11 May 2026 05:54PM UTC 910
53.88
Source Files on build 25687037878
  • Tree
  • List 912
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • fdcfbb3f on github
  • Prev Build on main (#25685067958)
  • Next Build on main (#25693939151)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc