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

kobotoolbox / kpi / 12037464032
82%
master: 76%

Build:
Build:
LAST BUILD BRANCH: dev-1665-scim-get-list-api-endpoints
DEFAULT BRANCH: master
Ran 26 Nov 2024 07:48PM UTC
Jobs 1
Files 608
Run time 1min
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

26 Nov 2024 07:13PM UTC coverage: 80.064% (+0.006%) from 80.058%
12037464032

push

github

web-flow
feat(projectHistoryLogs): project history logs for bulk actions TASK-1229  (#5270)

### 📖 Description
This PR adds support for bulk actions logging.

### 👀 Preview steps
1. Create two new projects
2. Deploy the projects
3. Execute the bulk actions for the 2 projects (archive, unarchive) 
4. To test the archive and unarchive, the UI may not allow you to
perform these actions, however you can use curl:
```
$ curl -X POST -H "Authorization: Token xxx" -d "{\"payload\": {\"action\": \"unarchive\", \"asset_uids\": [\"ae6hQt9s2phfjRnsNphLdA\", \"auYiwftdP2g8axKkiUB8cE\"]}}" -H "Content-Type: application/json"  http://kf.kobo.local/api/v2/assets/bulk/ 

{"detail":"2 projects have been unarchived"}

$ curl -X POST -H "Authorization: Token xxx" -d "{\"payload\": {\"action\": \"archive\", \"asset_uids\": [\"ae6hQt9s2phfjRnsNphLdA\", \"auYiwftdP2g8axKkiUB8cE\"]}}" -H "Content-Type: application/json"  http://kf.kobo.local/api/v2/assets/bulk/ 

{"detail":"2 projects have been archived"}

```
5. Check the logs were created through the django shell
```
$ ./run.py -cf exec kpi bash 
$ ./manage.py shell_plus
...
In[]: us = User.objects.get(username="super_admin")
In[]:  for log in ProjectHistoryLog.objects.filter(user=us).order_by('-date_created')[0:8]: print(log.date_created, log.action, log.metadata['asset_uid'])

2024-11-14 23:50:19.482422+00:00 archive auYiwftdP2g8axKkiUB8cE
2024-11-14 23:50:19.468558+00:00 archive ae6hQt9s2phfjRnsNphLdA
2024-11-14 23:50:03.891367+00:00 unarchive auYiwftdP2g8axKkiUB8cE
2024-11-14 23:50:03.848762+00:00 unarchive ae6hQt9s2phfjRnsNphLdA
2024-11-14 18:36:23.187022+00:00 archive ae6hQt9s2phfjRnsNphLdA
...
```


### 💭 Notes

5645 of 9111 branches covered (61.96%)

23 of 24 new or added lines in 3 files covered. (95.83%)

2 existing lines in 1 file now uncovered.

21598 of 26976 relevant lines covered (80.06%)

0.8 hits per line

Jobs
ID Job ID Ran Files Coverage
1 12037464032.1 26 Nov 2024 07:48PM UTC 0
80.06
Source Files on build 12037464032
Detailed source file information is not available for this build.
  • Back to Repo
  • a11ca28e on github
  • Prev Build on main (#12037005943)
  • Next Build on main (#12037744252)
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