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

kobotoolbox / kpi / 12436502161
81%
master: 76%

Build:
Build:
LAST BUILD BRANCH: beccagraber/dev-1452-new_action
DEFAULT BRANCH: master
Ran 20 Dec 2024 07:01PM UTC
Jobs 1
Files 622
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

20 Dec 2024 06:24PM UTC coverage: 80.462% (+0.02%) from 80.445%
12436502161

push

github

web-flow
feat(projectHistoryLogs): log duplicated submissions TASK-1342 (#5387)

### đŸ“Ŗ Summary
Record when submissions are duplicated. Record it just as a regular
submission.

### 💭 Notes
Add submission information to the request, then process as usual in
`ProjectHistoryLogs.create_from_request`.


### 👀 Preview steps

1. â„šī¸ have at least 2 accounts and a project. Log in to the first
account
2. Give the second account the Manage Project permission
3. add a submission to the project and take note of the id
4. from the terminal, run `curl -X POST -H 'Authorization: Token
<account1_token>'
kf.kobo.local/api/v2/assets/<asset_uid>/data/<submission_id>/duplicate/`
5. reload the data table to make sure the submission was duplicated
6. go to `api/v2/assets/<asset_uid>/history`
7. đŸŸĸ there should be a new PH log with action=`add-submission` and the
usual metadata, plus
```
"submission": {
    "submitted_by": <account1_username>
}
```
8. from the terminal, run `curl -X POST -H 'Authorization: Token
<account2_token>'
kf.kobo.local/api/v2/assets/<asset_uid>/data/<submission_id>/duplicate/`
(notice this is using account2's token)
9. reload the data table to make sure the submission was duplicated
again, with the new submission's "submitted_by" being account2.
10. go to `api/v2/assets/<asset_uid>/history`
11. đŸŸĸ there should be a new PH log with action=`add-submission` and the
usual metadata, plus
```
"submission": {
    "submitted_by": <account2_username>
}
```

5791 of 9278 branches covered (62.42%)

8 of 8 new or added lines in 3 files covered. (100.0%)

22160 of 27541 relevant lines covered (80.46%)

0.8 hits per line

Jobs
ID Job ID Ran Files Coverage
1 12436502161.1 20 Dec 2024 07:01PM UTC 622
80.46
Source Files on build 12436502161
  • Tree
  • List 622
  • Changed 5
  • Source Changed 0
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 570046de on github
  • Prev Build on main (#12436492430)
  • Next Build on main (#12436706854)
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

© 2025 Coveralls, Inc