Add timers to capture
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 32/100
Research direction
No files, tests, or entry points are named. Start by locating how captures are represented in the Phoenix API and how capture requests are tested, then trace the existing UI timer state if it is part of this repository. Done means captures support associated timers, enforce one newest running timer, calculate elapsed time correctly, and keep timer state consistent when requests fail.
Written by the indexing model from the issue text.
Description
A capture can have multiple timers.
Timer fields:
- id
- started_at
- stopped_at
- created_at
- updated_at
- id_capture: create association with capture
The stopped_at value can be null, in this case it means that the timer is running.
Only one timer can run for a capture and it should be the one created the most recently.
We can calculate the time spend on a capture by
- if the most recent timer is running: sum stopped timers + (now - start_at running timer)
- if all timers are stopped: sum of stopped timers (ie sum of stopped_at - started_at)
If a timer can't be started (e.g. http error) make sure the UI representing the timer is on "stop" and same if a timer can't be stopped
- Dominant language
- Elixir
- Stars
- 3
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from dwyl/app-api
-
awaiting-review enhancement
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
phoenixframework/phoenix#6847 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
beyond-all-reason/teiserver#1584 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ash-project/ash#2954 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
membraneframework/boombox#149 ·