Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Idea: Simplify record keys #116

Closed
FelixTheodor opened this issue Jun 11, 2021 · 4 comments · Fixed by #131
Closed

Idea: Simplify record keys #116

FelixTheodor opened this issue Jun 11, 2021 · 4 comments · Fixed by #131
Assignees
Labels
enhancement New feature or request

Comments

@FelixTheodor
Copy link
Contributor

FelixTheodor commented Jun 11, 2021

Currently, the only way to reference a record is its key: the specific time it has been started. This is laborious to write down number by number, or you need to copy paste it every time. We already have the latest alias, but maybe we could simplify this even more by letting the user reference a record of the current day by entering its "ID", that is already created on the fly via

timetrace list records today
+-----+------------------+-----------+---------+-----------+------------+
|  #  |       KEY        |  PROJECT  |  START  |    END    |  BILLABLE  |
+-----+------------------+-----------+---------+-----------+------------+
|   1 | 2021-06-11-12-52 | test1     | 12:52   | 12:55     | no         |
|   2 | 2021-06-11-12-51 | test3     | 12:51   | 12:53     | no         |
|   3 | 2021-06-11-12-49 | test2     | 12:49   | 12:51     | no         |
|   4 | 2021-06-11-12-48 | test1     | 12:48   | 12:49     | no         |
+-----+------------------+-----------+---------+-----------+------------+

I imagine it like this:

timetrace edit record #1 -p 5m

@dominikbraun dominikbraun added the enhancement New feature or request label Jun 11, 2021
@dominikbraun
Copy link
Owner

I had the exact same idea in mind since copying the record key can be a bit tedious.

The only concern I have is that if you list the records, stop tracking and start again and then edit a record based on the output of list records, the edited record will be a different one. Same goes for repeating an edit record command if a new record has been created in the meantime.

The solution to this problem could be to numerate the records with a descending index (oldest is #1).

@FelixTheodor
Copy link
Contributor Author

Ah, nice!
Yes, I see your point. Would you say 'to reverse the numeration of the records' should be handled as an own issue, or shall we keep both in this one, since they are closely related?
Either way, I have some spare time this weekend and would like to work on the feature :)

@FelixTheodor
Copy link
Contributor Author

Okay, since the reverse of the records is (as it seems) just a one-line-change, I guess we don't need a special issue for it - unless you know of some other parts of the code that rely on the numeration.

@dominikbraun
Copy link
Owner

Yap, the numeration can be changed as a part of that issue.

@dominikbraun dominikbraun added this to the timetrace v0.13.0 milestone Jun 19, 2021
@dominikbraun dominikbraun modified the milestones: timetrace v0.13.0, timetrace v0.14.0 Jul 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants