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

kobotoolbox / kpi / 14452689498
81%
master: 76%

Build:
Build:
LAST BUILD BRANCH: dev-1266-remove-kpi-v1-endpoints
DEFAULT BRANCH: master
Ran 14 Apr 2025 06:50PM UTC
Jobs 2
Files 647
Run time 2min
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

14 Apr 2025 06:13PM UTC coverage: 80.978% (-0.02%) from 80.994%
14452689498

push

github

web-flow
refactor(attachments): expose uid instead of pk in the data API endpoint TASK-1522  (#5642)

### 💭 Notes

Exposes `uid` field in the attachments API response and also removed
`instance`, `xform`, and `id` fields.
The data API response for attachments now looks like this:

```
_attachments": [
        {
            "download_url": "<http://kf.kobo.local/api/v2/assets/amgRCC32PRBWSuxtthtvro/data/23/attachments/attund5vyh8rSr5QM86uPwUj/>",
            "download_large_url": "<http://kf.kobo.local/api/v2/assets/amgRCC32PRBWSuxtthtvro/data/23/attachments/attund5vyh8rSr5QM86uPwUj/large/>",
            "download_medium_url": "<http://kf.kobo.local/api/v2/assets/amgRCC32PRBWSuxtthtvro/data/23/attachments/attund5vyh8rSr5QM86uPwUj/medium/>",
            "download_small_url": "<http://kf.kobo.local/api/v2/assets/amgRCC32PRBWSuxtthtvro/data/23/attachments/attund5vyh8rSr5QM86uPwUj/small/>",
            "mimetype": "image/jpeg",
            "filename": "test/attachments/6c8611aa5ed349cc88da7d32fe4a9933/39e76a6d-380d-424c-b6f9-2d0a15a6985d/IMG_8891-12_10_59.jpg",
            "uid": "attund5vyh8rSr5QM86uPwUj",
            "question_xpath": "Point_and_shoot_Use_camera_to_take_a_photo"
        }
]

```

### 👀 Preview steps

1. â„šī¸ have account and a project
2. Make some submissions with attachments
3. Check out the data attachments api:
`https://[kpi]/api/v2/assets/<asset_uid>/data/<data_id>/attachments/<attachment_id>/`
4. Notice that on main the `<attachment_id>` uses the `pk`
5. Checkout this branch
6. đŸŸĸ now notice that the `<attachment_id>` uses the `uid`
7. Make sure that you can still access the attachment using the `pk`
8. Ensure you can make submissions with attachments
9. Ensure you can edit the attachment

6135 of 9743 branches covered (62.97%)

14 of 23 new or added lines in 2 files covered. (60.87%)

622 existing lines in 18 files now uncovered.

23460 of 28971 relevant lines covered (80.98%)

1.6 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
4
72.96
-0.4% kpi/deployment_backends/openrosa_backend.py
5
82.45
-0.66% kpi/deployment_backends/base_backend.py

Uncovered Existing Lines

Lines Coverage ∆ File
1
87.5
-1.39% kobo/apps/organizations/admin/organization.py
1
83.33
-5.56% kpi/urls/__init__.py
1
93.62
-2.13% kpi/utils/django_orm_helper.py
2
94.83
-1.15% kobo/apps/mass_emails/tasks.py
3
63.64
-27.27% kobo/apps/accounts/utils.py
3
84.24
-1.82% kobo/apps/organizations/models.py
3
86.67
-10.0% kobo/apps/organizations/utils.py
3
90.52
-2.59% kpi/views/environment.py
4
83.33
-8.33% kobo/apps/accounts/mfa/models.py
8
0.0
-100.0% kobo/apps/stripe/urls.py
19
0.0
-65.52% kobo/apps/stripe/admin.py
23
59.68
-37.1% kobo/apps/trackers/utils.py
25
43.94
-37.88% kobo/apps/mass_emails/user_queries.py
25
70.45
-28.41% kpi/utils/usage_calculator.py
64
0.0
-98.46% kobo/apps/stripe/serializers.py
117
0.0
-91.41% kobo/apps/stripe/models.py
154
0.0
-95.65% kobo/apps/stripe/views.py
166
20.72
-74.77% kobo/apps/stripe/utils.py
Jobs
ID Job ID Ran Files Coverage
1 14452689498.1 14 Apr 2025 06:50PM UTC 647
78.83
2 14452689498.2 14 Apr 2025 06:52PM UTC 647
80.96
Source Files on build 14452689498
  • Tree
  • List 647
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 708db308 on github
  • Prev Build on main (#14452645680)
  • Next Build on main (#14453649286)
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